diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index 84094c04f6a..a475b6b6474 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -784,6 +784,231 @@ "resources": { "chrome": { "resources": { + "printServers": { + "methods": { + "batchCreatePrintServers": { + "description": "Creates multiple print servers.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers:batchCreatePrintServers", + "httpMethod": "POST", + "id": "admin.customers.chrome.printServers.batchCreatePrintServers", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printServers:batchCreatePrintServers", + "request": { + "$ref": "BatchCreatePrintServersRequest" + }, + "response": { + "$ref": "BatchCreatePrintServersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + }, + "batchDeletePrintServers": { + "description": "Deletes multiple print servers.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers:batchDeletePrintServers", + "httpMethod": "POST", + "id": "admin.customers.chrome.printServers.batchDeletePrintServers", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{customer.id}`", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printServers:batchDeletePrintServers", + "request": { + "$ref": "BatchDeletePrintServersRequest" + }, + "response": { + "$ref": "BatchDeletePrintServersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + }, + "create": { + "description": "Creates a print server.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers", + "httpMethod": "POST", + "id": "admin.customers.chrome.printServers.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printServers", + "request": { + "$ref": "PrintServer" + }, + "response": { + "$ref": "PrintServer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + }, + "delete": { + "description": "Deletes a print server.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers/{printServersId}", + "httpMethod": "DELETE", + "id": "admin.customers.chrome.printServers.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the print server to be deleted. Format: `customers/{customer.id}/chrome/printServers/{print_server.id}`", + "location": "path", + "pattern": "^customers/[^/]+/chrome/printServers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + }, + "get": { + "description": "Returns a print server's configuration.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers/{printServersId}", + "httpMethod": "GET", + "id": "admin.customers.chrome.printServers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + "location": "path", + "pattern": "^customers/[^/]+/chrome/printServers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+name}", + "response": { + "$ref": "PrintServer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers", + "https://www.googleapis.com/auth/admin.chrome.printers.readonly" + ] + }, + "list": { + "description": "Lists print server configurations.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers", + "httpMethod": "GET", + "id": "admin.customers.chrome.printServers.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Search query in [Common Expression Language syntax](https://github.com/google/cel-spec). Supported filters are `display_name`, `description`, and `uri`. Example: `printServer.displayName=='marketing-queue'`.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort order for results. Supported values are `display_name`, `description`, or `create_time`. Default order is ascending, but descending order can be returned by appending \"desc\" to the `order_by` field. For instance, `orderBy=='description desc'` returns the print servers sorted by description in descending order.", + "location": "query", + "type": "string" + }, + "orgUnitId": { + "description": "If `org_unit_id` is present in the request, only print servers owned or inherited by the organizational unit (OU) are returned. If the `PrintServer` resource's `org_unit_id` matches the one in the request, the OU owns the server. If `org_unit_id` is not specified in the request, all print servers are returned or filtered against.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of objects to return (default `100`, max `100`). The service might return fewer than this value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A generated token to paginate results (the `next_page_token` from a previous call).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printServers", + "response": { + "$ref": "ListPrintServersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers", + "https://www.googleapis.com/auth/admin.chrome.printers.readonly" + ] + }, + "patch": { + "description": "Updates a print server's configuration.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers/{printServersId}", + "httpMethod": "PATCH", + "id": "admin.customers.chrome.printServers.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Resource name of the print server. Leave empty when creating. Format: `customers/{customer.id}/printServers/{print_server.id}`", + "location": "path", + "pattern": "^customers/[^/]+/chrome/printServers/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to update. Some fields are read-only and cannot be updated. Values for unspecified fields are patched.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "admin/directory/v1/{+name}", + "request": { + "$ref": "PrintServer" + }, + "response": { + "$ref": "PrintServer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + } + } + }, "printers": { "methods": { "batchCreatePrinters": { @@ -4405,7 +4630,7 @@ } } }, - "revision": "20220913", + "revision": "20220919", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -4544,6 +4769,40 @@ }, "type": "object" }, + "BatchCreatePrintServersRequest": { + "description": "Request to add multiple new print servers in a batch.", + "id": "BatchCreatePrintServersRequest", + "properties": { + "requests": { + "description": "Required. A list of `PrintServer` resources to be created (max `50` per batch).", + "items": { + "$ref": "CreatePrintServerRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreatePrintServersResponse": { + "id": "BatchCreatePrintServersResponse", + "properties": { + "failures": { + "description": "A list of create failures. `PrintServer` IDs are not populated, as print servers were not created.", + "items": { + "$ref": "PrintServerFailureInfo" + }, + "type": "array" + }, + "printServers": { + "description": "A list of successfully created print servers with their IDs populated.", + "items": { + "$ref": "PrintServer" + }, + "type": "array" + } + }, + "type": "object" + }, "BatchCreatePrintersRequest": { "description": "Request for adding new printers in batch.", "id": "BatchCreatePrintersRequest", @@ -4579,6 +4838,40 @@ }, "type": "object" }, + "BatchDeletePrintServersRequest": { + "description": "Request to delete multiple existing print servers in a batch.", + "id": "BatchDeletePrintServersRequest", + "properties": { + "printServerIds": { + "description": "A list of print server IDs that should be deleted (max `100` per batch).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchDeletePrintServersResponse": { + "id": "BatchDeletePrintServersResponse", + "properties": { + "failedPrintServers": { + "description": "A list of update failures.", + "items": { + "$ref": "PrintServerFailureInfo" + }, + "type": "array" + }, + "printServerIds": { + "description": "A list of print server IDs that were successfully deleted.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "BatchDeletePrintersRequest": { "description": "Request for deleting existing printers in batch.", "id": "BatchDeletePrintersRequest", @@ -5394,6 +5687,21 @@ }, "type": "object" }, + "CreatePrintServerRequest": { + "description": "Request for adding a new print server.", + "id": "CreatePrintServerRequest", + "properties": { + "parent": { + "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + "type": "string" + }, + "printServer": { + "$ref": "PrintServer", + "description": "Required. A print server to create. If you want to place the print server under a specific organizational unit (OU), then populate the `org_unit_id`. Otherwise the print server is created under the root OU. The `org_unit_id` can be retrieved using the [Directory API](https://developers.google.com/admin-sdk/directory/v1/guides/manage-org-units)." + } + }, + "type": "object" + }, "CreatePrinterRequest": { "description": "Request for adding a new printer.", "id": "CreatePrinterRequest", @@ -6025,6 +6333,23 @@ }, "type": "object" }, + "ListPrintServersResponse": { + "id": "ListPrintServersResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as `page_token` in a request to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "printServers": { + "description": "List of print servers.", + "items": { + "$ref": "PrintServer" + }, + "type": "array" + } + }, + "type": "object" + }, "ListPrinterModelsResponse": { "description": "Response for listing allowed printer models.", "id": "ListPrinterModelsResponse", @@ -6503,6 +6828,104 @@ }, "type": "object" }, + "PrintServer": { + "description": "Configuration for a print server.", + "id": "PrintServer", + "properties": { + "createTime": { + "description": "Output only. Time when the print server was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Editable. Description of the print server (as shown in the Admin console).", + "type": "string" + }, + "displayName": { + "description": "Editable. Display name of the print server (as shown in the Admin console).", + "type": "string" + }, + "id": { + "description": "Immutable. ID of the print server. Leave empty when creating.", + "type": "string" + }, + "name": { + "description": "Immutable. Resource name of the print server. Leave empty when creating. Format: `customers/{customer.id}/printServers/{print_server.id}`", + "type": "string" + }, + "orgUnitId": { + "description": "ID of the organization unit (OU) that owns this print server. This value can only be set when the print server is initially created. If it's not populated, the print server is placed under the root OU. The `org_unit_id` can be retrieved using the [Directory API](/admin-sdk/directory/reference/rest/v1/orgunits).", + "type": "string" + }, + "uri": { + "description": "Editable. Print server URI.", + "type": "string" + } + }, + "type": "object" + }, + "PrintServerFailureInfo": { + "description": "Info about failures", + "id": "PrintServerFailureInfo", + "properties": { + "errorCode": { + "description": "Canonical code for why the update failed to apply.", + "enum": [ + "OK", + "CANCELLED", + "UNKNOWN", + "INVALID_ARGUMENT", + "DEADLINE_EXCEEDED", + "NOT_FOUND", + "ALREADY_EXISTS", + "PERMISSION_DENIED", + "UNAUTHENTICATED", + "RESOURCE_EXHAUSTED", + "FAILED_PRECONDITION", + "ABORTED", + "OUT_OF_RANGE", + "UNIMPLEMENTED", + "INTERNAL", + "UNAVAILABLE", + "DATA_LOSS" + ], + "enumDescriptions": [ + "Not an error; returned on success. HTTP Mapping: 200 OK", + "The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request", + "Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error", + "The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request", + "The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire. HTTP Mapping: 504 Gateway Timeout", + "Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, `NOT_FOUND` may be used. If a request is denied for some users within a class of users, such as user-based access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 Not Found", + "The entity that a client attempted to create (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict", + "The caller does not have permission to execute the specified operation. `PERMISSION_DENIED` must not be used for rejections caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` must not be used if the caller can not be identified (use `UNAUTHENTICATED` instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. HTTP Mapping: 403 Forbidden", + "The request does not have valid authentication credentials for the operation. HTTP Mapping: 401 Unauthorized", + "Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. HTTP Mapping: 429 Too Many Requests", + "The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level. For example, when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. For example, if an \"rmdir\" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. HTTP Mapping: 400 Bad Request", + "The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 409 Conflict", + "The operation was attempted past the valid range. E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to read at an offset that is not in the range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to read from an offset past the current file size. There is a fair bit of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) when it applies so that callers who are iterating through a space can easily look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 400 Bad Request", + "The operation is not implemented or is not supported/enabled in this service. HTTP Mapping: 501 Not Implemented", + "Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. HTTP Mapping: 500 Internal Server Error", + "The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable", + "Unrecoverable data loss or corruption. HTTP Mapping: 500 Internal Server Error" + ], + "type": "string" + }, + "errorMessage": { + "description": "Failure reason message.", + "type": "string" + }, + "printServer": { + "$ref": "PrintServer", + "description": "Failed print server." + }, + "printServerId": { + "description": "ID of a failed print server.", + "type": "string" + } + }, + "type": "object" + }, "Printer": { "description": "Printer configuration.", "id": "Printer", diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index bc8b42a3cef..0f6133cc97a 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -397,6 +397,7 @@ type CustomersService struct { func NewCustomersChromeService(s *Service) *CustomersChromeService { rs := &CustomersChromeService{s: s} + rs.PrintServers = NewCustomersChromePrintServersService(s) rs.Printers = NewCustomersChromePrintersService(s) return rs } @@ -404,9 +405,20 @@ func NewCustomersChromeService(s *Service) *CustomersChromeService { type CustomersChromeService struct { s *Service + PrintServers *CustomersChromePrintServersService + Printers *CustomersChromePrintersService } +func NewCustomersChromePrintServersService(s *Service) *CustomersChromePrintServersService { + rs := &CustomersChromePrintServersService{s: s} + return rs +} + +type CustomersChromePrintServersService struct { + s *Service +} + func NewCustomersChromePrintersService(s *Service) *CustomersChromePrintersService { rs := &CustomersChromePrintersService{s: s} return rs @@ -840,6 +852,72 @@ func (s *AuxiliaryMessage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BatchCreatePrintServersRequest: Request to add multiple new print +// servers in a batch. +type BatchCreatePrintServersRequest struct { + // Requests: Required. A list of `PrintServer` resources to be created + // (max `50` per batch). + Requests []*CreatePrintServerRequest `json:"requests,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Requests") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreatePrintServersRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreatePrintServersRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BatchCreatePrintServersResponse struct { + // Failures: A list of create failures. `PrintServer` IDs are not + // populated, as print servers were not created. + Failures []*PrintServerFailureInfo `json:"failures,omitempty"` + + // PrintServers: A list of successfully created print servers with their + // IDs populated. + PrintServers []*PrintServer `json:"printServers,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Failures") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Failures") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreatePrintServersResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreatePrintServersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BatchCreatePrintersRequest: Request for adding new printers in batch. type BatchCreatePrintersRequest struct { // Requests: A list of Printers to be created. Max 50 at a time. @@ -906,6 +984,73 @@ func (s *BatchCreatePrintersResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BatchDeletePrintServersRequest: Request to delete multiple existing +// print servers in a batch. +type BatchDeletePrintServersRequest struct { + // PrintServerIds: A list of print server IDs that should be deleted + // (max `100` per batch). + PrintServerIds []string `json:"printServerIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrintServerIds") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PrintServerIds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BatchDeletePrintServersRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchDeletePrintServersRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BatchDeletePrintServersResponse struct { + // FailedPrintServers: A list of update failures. + FailedPrintServers []*PrintServerFailureInfo `json:"failedPrintServers,omitempty"` + + // PrintServerIds: A list of print server IDs that were successfully + // deleted. + PrintServerIds []string `json:"printServerIds,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FailedPrintServers") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FailedPrintServers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BatchDeletePrintServersResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchDeletePrintServersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BatchDeletePrintersRequest: Request for deleting existing printers in // batch. type BatchDeletePrintersRequest struct { @@ -2176,6 +2321,44 @@ func (s *ChromeOsMoveDevicesToOu) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreatePrintServerRequest: Request for adding a new print server. +type CreatePrintServerRequest struct { + // Parent: Required. The unique ID + // (https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) + // of the customer's Google Workspace account. Format: `customers/{id}` + Parent string `json:"parent,omitempty"` + + // PrintServer: Required. A print server to create. If you want to place + // the print server under a specific organizational unit (OU), then + // populate the `org_unit_id`. Otherwise the print server is created + // under the root OU. The `org_unit_id` can be retrieved using the + // Directory API + // (https://developers.google.com/admin-sdk/directory/v1/guides/manage-org-units). + PrintServer *PrintServer `json:"printServer,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Parent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Parent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreatePrintServerRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreatePrintServerRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreatePrinterRequest: Request for adding a new printer. type CreatePrinterRequest struct { // Parent: Required. The name of the customer. Format: @@ -3162,6 +3345,42 @@ func (s *Groups) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ListPrintServersResponse struct { + // NextPageToken: A token that can be sent as `page_token` in a request + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PrintServers: List of print servers. + PrintServers []*PrintServer `json:"printServers,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListPrintServersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPrintServersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListPrinterModelsResponse: Response for listing allowed printer // models. type ListPrinterModelsResponse struct { @@ -3880,86 +4099,42 @@ func (s *OsUpdateStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Printer: Printer configuration. -type Printer struct { - // AuxiliaryMessages: Output only. Auxiliary messages about issues with - // the printer configuration if any. - AuxiliaryMessages []*AuxiliaryMessage `json:"auxiliaryMessages,omitempty"` - - // CreateTime: Output only. Time when printer was created. +// PrintServer: Configuration for a print server. +type PrintServer struct { + // CreateTime: Output only. Time when the print server was created. CreateTime string `json:"createTime,omitempty"` - // Description: Editable. Description of printer. + // Description: Editable. Description of the print server (as shown in + // the Admin console). Description string `json:"description,omitempty"` - // DisplayName: Editable. Name of printer. + // DisplayName: Editable. Display name of the print server (as shown in + // the Admin console). DisplayName string `json:"displayName,omitempty"` - // Id: Id of the printer. (During printer creation leave empty) + // Id: Immutable. ID of the print server. Leave empty when creating. Id string `json:"id,omitempty"` - // MakeAndModel: Editable. Make and model of printer. e.g. Lexmark - // MS610de Value must be in format as seen in ListPrinterModels - // response. - MakeAndModel string `json:"makeAndModel,omitempty"` - - // Name: The resource name of the Printer object, in the format - // customers/{customer-id}/printers/{printer-id} (During printer - // creation leave empty) + // Name: Immutable. Resource name of the print server. Leave empty when + // creating. Format: + // `customers/{customer.id}/printServers/{print_server.id}` Name string `json:"name,omitempty"` - // OrgUnitId: Organization Unit that owns this printer (Only can be set - // during Printer creation) + // OrgUnitId: ID of the organization unit (OU) that owns this print + // server. This value can only be set when the print server is initially + // created. If it's not populated, the print server is placed under the + // root OU. The `org_unit_id` can be retrieved using the Directory API + // (/admin-sdk/directory/reference/rest/v1/orgunits). OrgUnitId string `json:"orgUnitId,omitempty"` - // Uri: Editable. Printer URI. + // Uri: Editable. Print server URI. Uri string `json:"uri,omitempty"` - // UseDriverlessConfig: Editable. flag to use driverless configuration - // or not. If it's set to be true, make_and_model can be ignored - UseDriverlessConfig bool `json:"useDriverlessConfig,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AuxiliaryMessages") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuxiliaryMessages") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Printer) MarshalJSON() ([]byte, error) { - type NoMethod Printer - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PrinterModel: Printer manufacturer and model -type PrinterModel struct { - // DisplayName: Display name. eq. "Brother MFC-8840D" - DisplayName string `json:"displayName,omitempty"` - - // MakeAndModel: Make and model as represented in "make_and_model" field - // in Printer object. eq. "brother mfc-8840d" - MakeAndModel string `json:"makeAndModel,omitempty"` - - // Manufacturer: Manufacturer. eq. "Brother" - Manufacturer string `json:"manufacturer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3967,49 +4142,277 @@ type PrinterModel struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PrinterModel) MarshalJSON() ([]byte, error) { - type NoMethod PrinterModel +func (s *PrintServer) MarshalJSON() ([]byte, error) { + type NoMethod PrintServer raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type Privilege struct { - // ChildPrivileges: A list of child privileges. Privileges for a service - // form a tree. Each privilege can have a list of child privileges; this - // list is empty for a leaf privilege. - ChildPrivileges []*Privilege `json:"childPrivileges,omitempty"` - - // Etag: ETag of the resource. - Etag string `json:"etag,omitempty"` - - // IsOuScopable: If the privilege can be restricted to an organization - // unit. - IsOuScopable bool `json:"isOuScopable,omitempty"` - - // Kind: The type of the API resource. This is always - // `admin#directory#privilege`. - Kind string `json:"kind,omitempty"` - - // PrivilegeName: The name of the privilege. - PrivilegeName string `json:"privilegeName,omitempty"` - - // ServiceId: The obfuscated ID of the service this privilege is for. - // This value is returned with `Privileges.list()` - // (/admin-sdk/directory/v1/reference/privileges/list). - ServiceId string `json:"serviceId,omitempty"` - - // ServiceName: The name of the service this privilege is for. - ServiceName string `json:"serviceName,omitempty"` - +// PrintServerFailureInfo: Info about failures +type PrintServerFailureInfo struct { + // ErrorCode: Canonical code for why the update failed to apply. + // + // Possible values: + // "OK" - Not an error; returned on success. HTTP Mapping: 200 OK + // "CANCELLED" - The operation was cancelled, typically by the caller. + // HTTP Mapping: 499 Client Closed Request + // "UNKNOWN" - Unknown error. For example, this error may be returned + // when a `Status` value received from another address space belongs to + // an error space that is not known in this address space. Also errors + // raised by APIs that do not return enough error information may be + // converted to this error. HTTP Mapping: 500 Internal Server Error + // "INVALID_ARGUMENT" - The client specified an invalid argument. Note + // that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` + // indicates arguments that are problematic regardless of the state of + // the system (e.g., a malformed file name). HTTP Mapping: 400 Bad + // Request + // "DEADLINE_EXCEEDED" - The deadline expired before the operation + // could complete. For operations that change the state of the system, + // this error may be returned even if the operation has completed + // successfully. For example, a successful response from a server could + // have been delayed long enough for the deadline to expire. HTTP + // Mapping: 504 Gateway Timeout + // "NOT_FOUND" - Some requested entity (e.g., file or directory) was + // not found. Note to server developers: if a request is denied for an + // entire class of users, such as gradual feature rollout or + // undocumented allowlist, `NOT_FOUND` may be used. If a request is + // denied for some users within a class of users, such as user-based + // access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 + // Not Found + // "ALREADY_EXISTS" - The entity that a client attempted to create + // (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict + // "PERMISSION_DENIED" - The caller does not have permission to + // execute the specified operation. `PERMISSION_DENIED` must not be used + // for rejections caused by exhausting some resource (use + // `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` + // must not be used if the caller can not be identified (use + // `UNAUTHENTICATED` instead for those errors). This error code does not + // imply the request is valid or the requested entity exists or + // satisfies other pre-conditions. HTTP Mapping: 403 Forbidden + // "UNAUTHENTICATED" - The request does not have valid authentication + // credentials for the operation. HTTP Mapping: 401 Unauthorized + // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a + // per-user quota, or perhaps the entire file system is out of space. + // HTTP Mapping: 429 Too Many Requests + // "FAILED_PRECONDITION" - The operation was rejected because the + // system is not in a state required for the operation's execution. For + // example, the directory to be deleted is non-empty, an rmdir operation + // is applied to a non-directory, etc. Service implementors can use the + // following guidelines to decide between `FAILED_PRECONDITION`, + // `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can + // retry just the failing call. (b) Use `ABORTED` if the client should + // retry at a higher level. For example, when a client-specified + // test-and-set fails, indicating the client should restart a + // read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the + // client should not retry until the system state has been explicitly + // fixed. For example, if an "rmdir" fails because the directory is + // non-empty, `FAILED_PRECONDITION` should be returned since the client + // should not retry unless the files are deleted from the directory. + // HTTP Mapping: 400 Bad Request + // "ABORTED" - The operation was aborted, typically due to a + // concurrency issue such as a sequencer check failure or transaction + // abort. See the guidelines above for deciding between + // `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: + // 409 Conflict + // "OUT_OF_RANGE" - The operation was attempted past the valid range. + // E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, + // this error indicates a problem that may be fixed if the system state + // changes. For example, a 32-bit file system will generate + // `INVALID_ARGUMENT` if asked to read at an offset that is not in the + // range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to + // read from an offset past the current file size. There is a fair bit + // of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We + // recommend using `OUT_OF_RANGE` (the more specific error) when it + // applies so that callers who are iterating through a space can easily + // look for an `OUT_OF_RANGE` error to detect when they are done. HTTP + // Mapping: 400 Bad Request + // "UNIMPLEMENTED" - The operation is not implemented or is not + // supported/enabled in this service. HTTP Mapping: 501 Not Implemented + // "INTERNAL" - Internal errors. This means that some invariants + // expected by the underlying system have been broken. This error code + // is reserved for serious errors. HTTP Mapping: 500 Internal Server + // Error + // "UNAVAILABLE" - The service is currently unavailable. This is most + // likely a transient condition, which can be corrected by retrying with + // a backoff. Note that it is not always safe to retry non-idempotent + // operations. See the guidelines above for deciding between + // `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: + // 503 Service Unavailable + // "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping: + // 500 Internal Server Error + ErrorCode string `json:"errorCode,omitempty"` + + // ErrorMessage: Failure reason message. + ErrorMessage string `json:"errorMessage,omitempty"` + + // PrintServer: Failed print server. + PrintServer *PrintServer `json:"printServer,omitempty"` + + // PrintServerId: ID of a failed print server. + PrintServerId string `json:"printServerId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorCode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PrintServerFailureInfo) MarshalJSON() ([]byte, error) { + type NoMethod PrintServerFailureInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Printer: Printer configuration. +type Printer struct { + // AuxiliaryMessages: Output only. Auxiliary messages about issues with + // the printer configuration if any. + AuxiliaryMessages []*AuxiliaryMessage `json:"auxiliaryMessages,omitempty"` + + // CreateTime: Output only. Time when printer was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Editable. Description of printer. + Description string `json:"description,omitempty"` + + // DisplayName: Editable. Name of printer. + DisplayName string `json:"displayName,omitempty"` + + // Id: Id of the printer. (During printer creation leave empty) + Id string `json:"id,omitempty"` + + // MakeAndModel: Editable. Make and model of printer. e.g. Lexmark + // MS610de Value must be in format as seen in ListPrinterModels + // response. + MakeAndModel string `json:"makeAndModel,omitempty"` + + // Name: The resource name of the Printer object, in the format + // customers/{customer-id}/printers/{printer-id} (During printer + // creation leave empty) + Name string `json:"name,omitempty"` + + // OrgUnitId: Organization Unit that owns this printer (Only can be set + // during Printer creation) + OrgUnitId string `json:"orgUnitId,omitempty"` + + // Uri: Editable. Printer URI. + Uri string `json:"uri,omitempty"` + + // UseDriverlessConfig: Editable. flag to use driverless configuration + // or not. If it's set to be true, make_and_model can be ignored + UseDriverlessConfig bool `json:"useDriverlessConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuxiliaryMessages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuxiliaryMessages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Printer) MarshalJSON() ([]byte, error) { + type NoMethod Printer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrinterModel: Printer manufacturer and model +type PrinterModel struct { + // DisplayName: Display name. eq. "Brother MFC-8840D" + DisplayName string `json:"displayName,omitempty"` + + // MakeAndModel: Make and model as represented in "make_and_model" field + // in Printer object. eq. "brother mfc-8840d" + MakeAndModel string `json:"makeAndModel,omitempty"` + + // Manufacturer: Manufacturer. eq. "Brother" + Manufacturer string `json:"manufacturer,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PrinterModel) MarshalJSON() ([]byte, error) { + type NoMethod PrinterModel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type Privilege struct { + // ChildPrivileges: A list of child privileges. Privileges for a service + // form a tree. Each privilege can have a list of child privileges; this + // list is empty for a leaf privilege. + ChildPrivileges []*Privilege `json:"childPrivileges,omitempty"` + + // Etag: ETag of the resource. + Etag string `json:"etag,omitempty"` + + // IsOuScopable: If the privilege can be restricted to an organization + // unit. + IsOuScopable bool `json:"isOuScopable,omitempty"` + + // Kind: The type of the API resource. This is always + // `admin#directory#privilege`. + Kind string `json:"kind,omitempty"` + + // PrivilegeName: The name of the privilege. + PrivilegeName string `json:"privilegeName,omitempty"` + + // ServiceId: The obfuscated ID of the service this privilege is for. + // This value is returned with `Privileges.list()` + // (/admin-sdk/directory/v1/reference/privileges/list). + ServiceId string `json:"serviceId,omitempty"` + + // ServiceName: The name of the service this privilege is for. + ServiceName string `json:"serviceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChildPrivileges") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -8306,6 +8709,1125 @@ func (c *CustomersUpdateCall) Do(opts ...googleapi.CallOption) (*Customer, error } +// method id "admin.customers.chrome.printServers.batchCreatePrintServers": + +type CustomersChromePrintServersBatchCreatePrintServersCall struct { + s *Service + parent string + batchcreateprintserversrequest *BatchCreatePrintServersRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreatePrintServers: Creates multiple print servers. +// +// - parent: The unique ID +// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) +// of the customer's Google Workspace account. Format: +// `customers/{id}`. +func (r *CustomersChromePrintServersService) BatchCreatePrintServers(parent string, batchcreateprintserversrequest *BatchCreatePrintServersRequest) *CustomersChromePrintServersBatchCreatePrintServersCall { + c := &CustomersChromePrintServersBatchCreatePrintServersCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchcreateprintserversrequest = batchcreateprintserversrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersChromePrintServersBatchCreatePrintServersCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersBatchCreatePrintServersCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersChromePrintServersBatchCreatePrintServersCall) Context(ctx context.Context) *CustomersChromePrintServersBatchCreatePrintServersCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersChromePrintServersBatchCreatePrintServersCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersChromePrintServersBatchCreatePrintServersCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateprintserversrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printServers:batchCreatePrintServers") + 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 "admin.customers.chrome.printServers.batchCreatePrintServers" call. +// Exactly one of *BatchCreatePrintServersResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *BatchCreatePrintServersResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *CustomersChromePrintServersBatchCreatePrintServersCall) Do(opts ...googleapi.CallOption) (*BatchCreatePrintServersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &BatchCreatePrintServersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates multiple print servers.", + // "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers:batchCreatePrintServers", + // "httpMethod": "POST", + // "id": "admin.customers.chrome.printServers.batchCreatePrintServers", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "admin/directory/v1/{+parent}/chrome/printServers:batchCreatePrintServers", + // "request": { + // "$ref": "BatchCreatePrintServersRequest" + // }, + // "response": { + // "$ref": "BatchCreatePrintServersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.chrome.printers" + // ] + // } + +} + +// method id "admin.customers.chrome.printServers.batchDeletePrintServers": + +type CustomersChromePrintServersBatchDeletePrintServersCall struct { + s *Service + parent string + batchdeleteprintserversrequest *BatchDeletePrintServersRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchDeletePrintServers: Deletes multiple print servers. +// +// - parent: The unique ID +// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) +// of the customer's Google Workspace account. Format: +// `customers/{customer.id}`. +func (r *CustomersChromePrintServersService) BatchDeletePrintServers(parent string, batchdeleteprintserversrequest *BatchDeletePrintServersRequest) *CustomersChromePrintServersBatchDeletePrintServersCall { + c := &CustomersChromePrintServersBatchDeletePrintServersCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchdeleteprintserversrequest = batchdeleteprintserversrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersChromePrintServersBatchDeletePrintServersCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersBatchDeletePrintServersCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersChromePrintServersBatchDeletePrintServersCall) Context(ctx context.Context) *CustomersChromePrintServersBatchDeletePrintServersCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersChromePrintServersBatchDeletePrintServersCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersChromePrintServersBatchDeletePrintServersCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeleteprintserversrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printServers:batchDeletePrintServers") + 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 "admin.customers.chrome.printServers.batchDeletePrintServers" call. +// Exactly one of *BatchDeletePrintServersResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *BatchDeletePrintServersResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *CustomersChromePrintServersBatchDeletePrintServersCall) Do(opts ...googleapi.CallOption) (*BatchDeletePrintServersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &BatchDeletePrintServersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes multiple print servers.", + // "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers:batchDeletePrintServers", + // "httpMethod": "POST", + // "id": "admin.customers.chrome.printServers.batchDeletePrintServers", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{customer.id}`", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "admin/directory/v1/{+parent}/chrome/printServers:batchDeletePrintServers", + // "request": { + // "$ref": "BatchDeletePrintServersRequest" + // }, + // "response": { + // "$ref": "BatchDeletePrintServersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.chrome.printers" + // ] + // } + +} + +// method id "admin.customers.chrome.printServers.create": + +type CustomersChromePrintServersCreateCall struct { + s *Service + parent string + printserver *PrintServer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a print server. +// +// - parent: The unique ID +// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) +// of the customer's Google Workspace account. Format: +// `customers/{id}`. +func (r *CustomersChromePrintServersService) Create(parent string, printserver *PrintServer) *CustomersChromePrintServersCreateCall { + c := &CustomersChromePrintServersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.printserver = printserver + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersChromePrintServersCreateCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersChromePrintServersCreateCall) Context(ctx context.Context) *CustomersChromePrintServersCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersChromePrintServersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersChromePrintServersCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.printserver) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printServers") + 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 "admin.customers.chrome.printServers.create" call. +// Exactly one of *PrintServer or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PrintServer.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CustomersChromePrintServersCreateCall) Do(opts ...googleapi.CallOption) (*PrintServer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PrintServer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a print server.", + // "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers", + // "httpMethod": "POST", + // "id": "admin.customers.chrome.printServers.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "admin/directory/v1/{+parent}/chrome/printServers", + // "request": { + // "$ref": "PrintServer" + // }, + // "response": { + // "$ref": "PrintServer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.chrome.printers" + // ] + // } + +} + +// method id "admin.customers.chrome.printServers.delete": + +type CustomersChromePrintServersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a print server. +// +// - name: The name of the print server to be deleted. Format: +// `customers/{customer.id}/chrome/printServers/{print_server.id}`. +func (r *CustomersChromePrintServersService) Delete(name string) *CustomersChromePrintServersDeleteCall { + c := &CustomersChromePrintServersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersChromePrintServersDeleteCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersChromePrintServersDeleteCall) Context(ctx context.Context) *CustomersChromePrintServersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersChromePrintServersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersChromePrintServersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/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 "admin.customers.chrome.printServers.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *CustomersChromePrintServersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a print server.", + // "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers/{printServersId}", + // "httpMethod": "DELETE", + // "id": "admin.customers.chrome.printServers.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the print server to be deleted. Format: `customers/{customer.id}/chrome/printServers/{print_server.id}`", + // "location": "path", + // "pattern": "^customers/[^/]+/chrome/printServers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "admin/directory/v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.chrome.printers" + // ] + // } + +} + +// method id "admin.customers.chrome.printServers.get": + +type CustomersChromePrintServersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns a print server's configuration. +// +// - name: The unique ID +// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) +// of the customer's Google Workspace account. Format: +// `customers/{id}`. +func (r *CustomersChromePrintServersService) Get(name string) *CustomersChromePrintServersGetCall { + c := &CustomersChromePrintServersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersChromePrintServersGetCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersChromePrintServersGetCall) IfNoneMatch(entityTag string) *CustomersChromePrintServersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersChromePrintServersGetCall) Context(ctx context.Context) *CustomersChromePrintServersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersChromePrintServersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersChromePrintServersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/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 "admin.customers.chrome.printServers.get" call. +// Exactly one of *PrintServer or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PrintServer.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CustomersChromePrintServersGetCall) Do(opts ...googleapi.CallOption) (*PrintServer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PrintServer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a print server's configuration.", + // "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers/{printServersId}", + // "httpMethod": "GET", + // "id": "admin.customers.chrome.printServers.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + // "location": "path", + // "pattern": "^customers/[^/]+/chrome/printServers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "admin/directory/v1/{+name}", + // "response": { + // "$ref": "PrintServer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.chrome.printers", + // "https://www.googleapis.com/auth/admin.chrome.printers.readonly" + // ] + // } + +} + +// method id "admin.customers.chrome.printServers.list": + +type CustomersChromePrintServersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists print server configurations. +// +// - parent: The unique ID +// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) +// of the customer's Google Workspace account. Format: +// `customers/{id}`. +func (r *CustomersChromePrintServersService) List(parent string) *CustomersChromePrintServersListCall { + c := &CustomersChromePrintServersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Search query in Common +// Expression Language syntax (https://github.com/google/cel-spec). +// Supported filters are `display_name`, `description`, and `uri`. +// Example: `printServer.displayName=='marketing-queue'`. +func (c *CustomersChromePrintServersListCall) Filter(filter string) *CustomersChromePrintServersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort order for +// results. Supported values are `display_name`, `description`, or +// `create_time`. Default order is ascending, but descending order can +// be returned by appending "desc" to the `order_by` field. For +// instance, `orderBy=='description desc'` returns the print servers +// sorted by description in descending order. +func (c *CustomersChromePrintServersListCall) OrderBy(orderBy string) *CustomersChromePrintServersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// OrgUnitId sets the optional parameter "orgUnitId": If `org_unit_id` +// is present in the request, only print servers owned or inherited by +// the organizational unit (OU) are returned. If the `PrintServer` +// resource's `org_unit_id` matches the one in the request, the OU owns +// the server. If `org_unit_id` is not specified in the request, all +// print servers are returned or filtered against. +func (c *CustomersChromePrintServersListCall) OrgUnitId(orgUnitId string) *CustomersChromePrintServersListCall { + c.urlParams_.Set("orgUnitId", orgUnitId) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of objects to return (default `100`, max `100`). The service might +// return fewer than this value. +func (c *CustomersChromePrintServersListCall) PageSize(pageSize int64) *CustomersChromePrintServersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A generated token +// to paginate results (the `next_page_token` from a previous call). +func (c *CustomersChromePrintServersListCall) PageToken(pageToken string) *CustomersChromePrintServersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersChromePrintServersListCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersChromePrintServersListCall) IfNoneMatch(entityTag string) *CustomersChromePrintServersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersChromePrintServersListCall) Context(ctx context.Context) *CustomersChromePrintServersListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersChromePrintServersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersChromePrintServersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printServers") + 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 "admin.customers.chrome.printServers.list" call. +// Exactly one of *ListPrintServersResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListPrintServersResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *CustomersChromePrintServersListCall) Do(opts ...googleapi.CallOption) (*ListPrintServersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListPrintServersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists print server configurations.", + // "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers", + // "httpMethod": "GET", + // "id": "admin.customers.chrome.printServers.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Search query in [Common Expression Language syntax](https://github.com/google/cel-spec). Supported filters are `display_name`, `description`, and `uri`. Example: `printServer.displayName=='marketing-queue'`.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort order for results. Supported values are `display_name`, `description`, or `create_time`. Default order is ascending, but descending order can be returned by appending \"desc\" to the `order_by` field. For instance, `orderBy=='description desc'` returns the print servers sorted by description in descending order.", + // "location": "query", + // "type": "string" + // }, + // "orgUnitId": { + // "description": "If `org_unit_id` is present in the request, only print servers owned or inherited by the organizational unit (OU) are returned. If the `PrintServer` resource's `org_unit_id` matches the one in the request, the OU owns the server. If `org_unit_id` is not specified in the request, all print servers are returned or filtered against.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of objects to return (default `100`, max `100`). The service might return fewer than this value.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A generated token to paginate results (the `next_page_token` from a previous call).", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "admin/directory/v1/{+parent}/chrome/printServers", + // "response": { + // "$ref": "ListPrintServersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.chrome.printers", + // "https://www.googleapis.com/auth/admin.chrome.printers.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CustomersChromePrintServersListCall) Pages(ctx context.Context, f func(*ListPrintServersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "admin.customers.chrome.printServers.patch": + +type CustomersChromePrintServersPatchCall struct { + s *Service + name string + printserver *PrintServer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a print server's configuration. +// +// - name: Immutable. Resource name of the print server. Leave empty +// when creating. Format: +// `customers/{customer.id}/printServers/{print_server.id}`. +func (r *CustomersChromePrintServersService) Patch(name string, printserver *PrintServer) *CustomersChromePrintServersPatchCall { + c := &CustomersChromePrintServersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.printserver = printserver + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. Some fields are read-only and cannot be updated. +// Values for unspecified fields are patched. +func (c *CustomersChromePrintServersPatchCall) UpdateMask(updateMask string) *CustomersChromePrintServersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersChromePrintServersPatchCall) Fields(s ...googleapi.Field) *CustomersChromePrintServersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersChromePrintServersPatchCall) Context(ctx context.Context) *CustomersChromePrintServersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersChromePrintServersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersChromePrintServersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.printserver) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/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 "admin.customers.chrome.printServers.patch" call. +// Exactly one of *PrintServer or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PrintServer.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CustomersChromePrintServersPatchCall) Do(opts ...googleapi.CallOption) (*PrintServer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PrintServer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a print server's configuration.", + // "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printServers/{printServersId}", + // "httpMethod": "PATCH", + // "id": "admin.customers.chrome.printServers.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. Resource name of the print server. Leave empty when creating. Format: `customers/{customer.id}/printServers/{print_server.id}`", + // "location": "path", + // "pattern": "^customers/[^/]+/chrome/printServers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to update. Some fields are read-only and cannot be updated. Values for unspecified fields are patched.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "admin/directory/v1/{+name}", + // "request": { + // "$ref": "PrintServer" + // }, + // "response": { + // "$ref": "PrintServer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admin.chrome.printers" + // ] + // } + +} + // method id "admin.customers.chrome.printers.batchCreatePrinters": type CustomersChromePrintersBatchCreatePrintersCall struct { diff --git a/adsense/v2/adsense-api.json b/adsense/v2/adsense-api.json index 71ea04a7784..fe7bdafb80c 100644 --- a/adsense/v2/adsense-api.json +++ b/adsense/v2/adsense-api.json @@ -322,6 +322,34 @@ "resources": { "adunits": { "methods": { + "create": { + "description": "Creates an ad unit. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product. Note that ad units can only be created for ad clients with an \"AFC\" product code. For more info see the [AdClient resource](https://developers.google.com/adsense/management/reference/rest/v2/accounts.adclients). For now, this method can only be used to create `DISPLAY` ad units. See: https://support.google.com/adsense/answer/9183566", + "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/adunits", + "httpMethod": "POST", + "id": "adsense.accounts.adclients.adunits.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}", + "location": "path", + "pattern": "^accounts/[^/]+/adclients/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/adunits", + "request": { + "$ref": "AdUnit" + }, + "response": { + "$ref": "AdUnit" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + }, "get": { "description": "Gets an ad unit from a specified account and ad client.", "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/adunits/{adunitsId}", @@ -447,11 +475,98 @@ "https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly" ] + }, + "patch": { + "description": "Updates an ad unit. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product. For now, this method can only be used to update `DISPLAY` ad units. See: https://support.google.com/adsense/answer/9183566", + "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/adunits/{adunitsId}", + "httpMethod": "PATCH", + "id": "adsense.accounts.adclients.adunits.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}", + "location": "path", + "pattern": "^accounts/[^/]+/adclients/[^/]+/adunits/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to update. If empty, a full update is performed.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "AdUnit" + }, + "response": { + "$ref": "AdUnit" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] } } }, "customchannels": { "methods": { + "create": { + "description": "Creates a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.", + "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels", + "httpMethod": "POST", + "id": "adsense.accounts.adclients.customchannels.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The ad client to create a custom channel under. Format: accounts/{account}/adclients/{adclient}", + "location": "path", + "pattern": "^accounts/[^/]+/adclients/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/customchannels", + "request": { + "$ref": "CustomChannel" + }, + "response": { + "$ref": "CustomChannel" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + }, + "delete": { + "description": "Deletes a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.", + "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels/{customchannelsId}", + "httpMethod": "DELETE", + "id": "adsense.accounts.adclients.customchannels.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the custom channel to delete. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}", + "location": "path", + "pattern": "^accounts/[^/]+/adclients/[^/]+/customchannels/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + }, "get": { "description": "Gets information about the selected custom channel.", "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels/{customchannelsId}", @@ -551,6 +666,40 @@ "https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly" ] + }, + "patch": { + "description": "Updates a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.", + "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels/{customchannelsId}", + "httpMethod": "PATCH", + "id": "adsense.accounts.adclients.customchannels.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Resource name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}", + "location": "path", + "pattern": "^accounts/[^/]+/adclients/[^/]+/customchannels/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to update. If empty, a full update is performed.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "CustomChannel" + }, + "response": { + "$ref": "CustomChannel" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] } } }, @@ -1675,7 +1824,7 @@ } } }, - "revision": "20220904", + "revision": "20220927", "rootUrl": "https://adsense.googleapis.com/", "schemas": { "Account": { @@ -1947,6 +2096,10 @@ "description": "Representation of a custom channel.", "id": "CustomChannel", "properties": { + "active": { + "description": "Whether the custom channel is active and collecting data. See https://support.google.com/adsense/answer/10077192.", + "type": "boolean" + }, "displayName": { "description": "Required. Display name of the custom channel.", "type": "string" @@ -1986,6 +2139,12 @@ }, "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" + }, "Header": { "description": "The header information of the columns requested in the report.", "id": "Header", diff --git a/adsense/v2/adsense-gen.go b/adsense/v2/adsense-gen.go index ba46509e9ac..a0b0aefa94a 100644 --- a/adsense/v2/adsense-gen.go +++ b/adsense/v2/adsense-gen.go @@ -678,6 +678,10 @@ func (s *ContentAdsSettings) MarshalJSON() ([]byte, error) { // CustomChannel: Representation of a custom channel. type CustomChannel struct { + // Active: Whether the custom channel is active and collecting data. See + // https://support.google.com/adsense/answer/10077192. + Active bool `json:"active,omitempty"` + // DisplayName: Required. Display name of the custom channel. DisplayName string `json:"displayName,omitempty"` @@ -693,7 +697,7 @@ type CustomChannel struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "Active") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -701,10 +705,10 @@ type CustomChannel struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Active") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -763,6 +767,17 @@ func (s *Date) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // Header: The header information of the columns requested in the // report. type Header struct { @@ -2796,6 +2811,156 @@ func (c *AccountsAdclientsListCall) Pages(ctx context.Context, f func(*ListAdCli } } +// method id "adsense.accounts.adclients.adunits.create": + +type AccountsAdclientsAdunitsCreateCall struct { + s *Service + parent string + adunit *AdUnit + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an ad unit. This method can only be used by projects +// enabled for the AdSense for Platforms +// (https://developers.google.com/adsense/platforms/) product. Note that +// ad units can only be created for ad clients with an "AFC" product +// code. For more info see the AdClient resource +// (https://developers.google.com/adsense/management/reference/rest/v2/accounts.adclients). +// For now, this method can only be used to create `DISPLAY` ad units. +// See: https://support.google.com/adsense/answer/9183566 +// +// - parent: Ad client to create an ad unit under. Format: +// accounts/{account}/adclients/{adclient}. +func (r *AccountsAdclientsAdunitsService) Create(parent string, adunit *AdUnit) *AccountsAdclientsAdunitsCreateCall { + c := &AccountsAdclientsAdunitsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.adunit = adunit + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdclientsAdunitsCreateCall) Fields(s ...googleapi.Field) *AccountsAdclientsAdunitsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdclientsAdunitsCreateCall) Context(ctx context.Context) *AccountsAdclientsAdunitsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdclientsAdunitsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdclientsAdunitsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.adunit) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/adunits") + 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 "adsense.accounts.adclients.adunits.create" call. +// Exactly one of *AdUnit or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *AdUnit.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsAdclientsAdunitsCreateCall) Do(opts ...googleapi.CallOption) (*AdUnit, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &AdUnit{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an ad unit. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product. Note that ad units can only be created for ad clients with an \"AFC\" product code. For more info see the [AdClient resource](https://developers.google.com/adsense/management/reference/rest/v2/accounts.adclients). For now, this method can only be used to create `DISPLAY` ad units. See: https://support.google.com/adsense/answer/9183566", + // "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/adunits", + // "httpMethod": "POST", + // "id": "adsense.accounts.adclients.adunits.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}", + // "location": "path", + // "pattern": "^accounts/[^/]+/adclients/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/adunits", + // "request": { + // "$ref": "AdUnit" + // }, + // "response": { + // "$ref": "AdUnit" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/adsense" + // ] + // } + +} + // method id "adsense.accounts.adclients.adunits.get": type AccountsAdclientsAdunitsGetCall struct { @@ -3494,79 +3659,82 @@ func (c *AccountsAdclientsAdunitsListLinkedCustomChannelsCall) Pages(ctx context } } -// method id "adsense.accounts.adclients.customchannels.get": +// method id "adsense.accounts.adclients.adunits.patch": -type AccountsAdclientsCustomchannelsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsAdclientsAdunitsPatchCall struct { + s *Service + name string + adunit *AdUnit + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about the selected custom channel. +// Patch: Updates an ad unit. This method can only be used by projects +// enabled for the AdSense for Platforms +// (https://developers.google.com/adsense/platforms/) product. For now, +// this method can only be used to update `DISPLAY` ad units. See: +// https://support.google.com/adsense/answer/9183566 // -// - name: Name of the custom channel. Format: -// accounts/{account}/adclients/{adclient}/customchannels/{customchanne -// l}. -func (r *AccountsAdclientsCustomchannelsService) Get(name string) *AccountsAdclientsCustomchannelsGetCall { - c := &AccountsAdclientsCustomchannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of the ad unit. Format: +// accounts/{account}/adclients/{adclient}/adunits/{adunit}. +func (r *AccountsAdclientsAdunitsService) Patch(name string, adunit *AdUnit) *AccountsAdclientsAdunitsPatchCall { + c := &AccountsAdclientsAdunitsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.adunit = adunit + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. If empty, a full update is performed. +func (c *AccountsAdclientsAdunitsPatchCall) UpdateMask(updateMask string) *AccountsAdclientsAdunitsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAdclientsCustomchannelsGetCall) Fields(s ...googleapi.Field) *AccountsAdclientsCustomchannelsGetCall { +func (c *AccountsAdclientsAdunitsPatchCall) Fields(s ...googleapi.Field) *AccountsAdclientsAdunitsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsAdclientsCustomchannelsGetCall) IfNoneMatch(entityTag string) *AccountsAdclientsCustomchannelsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAdclientsCustomchannelsGetCall) Context(ctx context.Context) *AccountsAdclientsCustomchannelsGetCall { +func (c *AccountsAdclientsAdunitsPatchCall) Context(ctx context.Context) *AccountsAdclientsAdunitsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAdclientsCustomchannelsGetCall) Header() http.Header { +func (c *AccountsAdclientsAdunitsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAdclientsCustomchannelsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAdclientsAdunitsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.adunit) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 } @@ -3577,14 +3745,14 @@ func (c *AccountsAdclientsCustomchannelsGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "adsense.accounts.adclients.customchannels.get" call. -// Exactly one of *CustomChannel or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CustomChannel.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsAdclientsCustomchannelsGetCall) Do(opts ...googleapi.CallOption) (*CustomChannel, error) { +// Do executes the "adsense.accounts.adclients.adunits.patch" call. +// Exactly one of *AdUnit or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *AdUnit.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsAdclientsAdunitsPatchCall) Do(opts ...googleapi.CallOption) (*AdUnit, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3603,7 +3771,7 @@ func (c *AccountsAdclientsCustomchannelsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &CustomChannel{ + ret := &AdUnit{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3615,125 +3783,109 @@ func (c *AccountsAdclientsCustomchannelsGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets information about the selected custom channel.", - // "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels/{customchannelsId}", - // "httpMethod": "GET", - // "id": "adsense.accounts.adclients.customchannels.get", + // "description": "Updates an ad unit. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product. For now, this method can only be used to update `DISPLAY` ad units. See: https://support.google.com/adsense/answer/9183566", + // "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/adunits/{adunitsId}", + // "httpMethod": "PATCH", + // "id": "adsense.accounts.adclients.adunits.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}", + // "description": "Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}", // "location": "path", - // "pattern": "^accounts/[^/]+/adclients/[^/]+/customchannels/[^/]+$", + // "pattern": "^accounts/[^/]+/adclients/[^/]+/adunits/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to update. If empty, a full update is performed.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+name}", + // "request": { + // "$ref": "AdUnit" + // }, // "response": { - // "$ref": "CustomChannel" + // "$ref": "AdUnit" // }, // "scopes": [ - // "https://www.googleapis.com/auth/adsense", - // "https://www.googleapis.com/auth/adsense.readonly" + // "https://www.googleapis.com/auth/adsense" // ] // } } -// method id "adsense.accounts.adclients.customchannels.list": +// method id "adsense.accounts.adclients.customchannels.create": -type AccountsAdclientsCustomchannelsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsAdclientsCustomchannelsCreateCall struct { + s *Service + parent string + customchannel *CustomChannel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all the custom channels available in an ad client. +// Create: Creates a custom channel. This method can only be used by +// projects enabled for the AdSense for Platforms +// (https://developers.google.com/adsense/platforms/) product. // -// - parent: The ad client which owns the collection of custom channels. -// Format: accounts/{account}/adclients/{adclient}. -func (r *AccountsAdclientsCustomchannelsService) List(parent string) *AccountsAdclientsCustomchannelsListCall { - c := &AccountsAdclientsCustomchannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The ad client to create a custom channel under. Format: +// accounts/{account}/adclients/{adclient}. +func (r *AccountsAdclientsCustomchannelsService) Create(parent string, customchannel *CustomChannel) *AccountsAdclientsCustomchannelsCreateCall { + c := &AccountsAdclientsCustomchannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of custom channels to include in the response, used for paging. If -// unspecified, at most 10000 custom channels will be returned. The -// maximum value is 10000; values above 10000 will be coerced to 10000. -func (c *AccountsAdclientsCustomchannelsListCall) PageSize(pageSize int64) *AccountsAdclientsCustomchannelsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListCustomChannels` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListCustomChannels` must match the call that provided -// the page token. -func (c *AccountsAdclientsCustomchannelsListCall) PageToken(pageToken string) *AccountsAdclientsCustomchannelsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.customchannel = customchannel return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAdclientsCustomchannelsListCall) Fields(s ...googleapi.Field) *AccountsAdclientsCustomchannelsListCall { +func (c *AccountsAdclientsCustomchannelsCreateCall) Fields(s ...googleapi.Field) *AccountsAdclientsCustomchannelsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsAdclientsCustomchannelsListCall) IfNoneMatch(entityTag string) *AccountsAdclientsCustomchannelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAdclientsCustomchannelsListCall) Context(ctx context.Context) *AccountsAdclientsCustomchannelsListCall { +func (c *AccountsAdclientsCustomchannelsCreateCall) Context(ctx context.Context) *AccountsAdclientsCustomchannelsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAdclientsCustomchannelsListCall) Header() http.Header { +func (c *AccountsAdclientsCustomchannelsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAdclientsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAdclientsCustomchannelsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.customchannel) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/customchannels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -3744,9 +3896,463 @@ func (c *AccountsAdclientsCustomchannelsListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "adsense.accounts.adclients.customchannels.list" call. -// Exactly one of *ListCustomChannelsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either +// Do executes the "adsense.accounts.adclients.customchannels.create" call. +// Exactly one of *CustomChannel or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CustomChannel.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAdclientsCustomchannelsCreateCall) Do(opts ...googleapi.CallOption) (*CustomChannel, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CustomChannel{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.", + // "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels", + // "httpMethod": "POST", + // "id": "adsense.accounts.adclients.customchannels.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The ad client to create a custom channel under. Format: accounts/{account}/adclients/{adclient}", + // "location": "path", + // "pattern": "^accounts/[^/]+/adclients/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/customchannels", + // "request": { + // "$ref": "CustomChannel" + // }, + // "response": { + // "$ref": "CustomChannel" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/adsense" + // ] + // } + +} + +// method id "adsense.accounts.adclients.customchannels.delete": + +type AccountsAdclientsCustomchannelsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a custom channel. This method can only be used by +// projects enabled for the AdSense for Platforms +// (https://developers.google.com/adsense/platforms/) product. +// +// - name: Name of the custom channel to delete. Format: +// accounts/{account}/adclients/{adclient}/customchannels/{customchanne +// l}. +func (r *AccountsAdclientsCustomchannelsService) Delete(name string) *AccountsAdclientsCustomchannelsDeleteCall { + c := &AccountsAdclientsCustomchannelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdclientsCustomchannelsDeleteCall) Fields(s ...googleapi.Field) *AccountsAdclientsCustomchannelsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdclientsCustomchannelsDeleteCall) Context(ctx context.Context) *AccountsAdclientsCustomchannelsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdclientsCustomchannelsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdclientsCustomchannelsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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 "adsense.accounts.adclients.customchannels.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsAdclientsCustomchannelsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.", + // "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels/{customchannelsId}", + // "httpMethod": "DELETE", + // "id": "adsense.accounts.adclients.customchannels.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the custom channel to delete. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}", + // "location": "path", + // "pattern": "^accounts/[^/]+/adclients/[^/]+/customchannels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/adsense" + // ] + // } + +} + +// method id "adsense.accounts.adclients.customchannels.get": + +type AccountsAdclientsCustomchannelsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about the selected custom channel. +// +// - name: Name of the custom channel. Format: +// accounts/{account}/adclients/{adclient}/customchannels/{customchanne +// l}. +func (r *AccountsAdclientsCustomchannelsService) Get(name string) *AccountsAdclientsCustomchannelsGetCall { + c := &AccountsAdclientsCustomchannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdclientsCustomchannelsGetCall) Fields(s ...googleapi.Field) *AccountsAdclientsCustomchannelsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAdclientsCustomchannelsGetCall) IfNoneMatch(entityTag string) *AccountsAdclientsCustomchannelsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdclientsCustomchannelsGetCall) Context(ctx context.Context) *AccountsAdclientsCustomchannelsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdclientsCustomchannelsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdclientsCustomchannelsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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 "adsense.accounts.adclients.customchannels.get" call. +// Exactly one of *CustomChannel or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CustomChannel.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAdclientsCustomchannelsGetCall) Do(opts ...googleapi.CallOption) (*CustomChannel, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CustomChannel{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about the selected custom channel.", + // "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels/{customchannelsId}", + // "httpMethod": "GET", + // "id": "adsense.accounts.adclients.customchannels.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}", + // "location": "path", + // "pattern": "^accounts/[^/]+/adclients/[^/]+/customchannels/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "CustomChannel" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/adsense", + // "https://www.googleapis.com/auth/adsense.readonly" + // ] + // } + +} + +// method id "adsense.accounts.adclients.customchannels.list": + +type AccountsAdclientsCustomchannelsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the custom channels available in an ad client. +// +// - parent: The ad client which owns the collection of custom channels. +// Format: accounts/{account}/adclients/{adclient}. +func (r *AccountsAdclientsCustomchannelsService) List(parent string) *AccountsAdclientsCustomchannelsListCall { + c := &AccountsAdclientsCustomchannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of custom channels to include in the response, used for paging. If +// unspecified, at most 10000 custom channels will be returned. The +// maximum value is 10000; values above 10000 will be coerced to 10000. +func (c *AccountsAdclientsCustomchannelsListCall) PageSize(pageSize int64) *AccountsAdclientsCustomchannelsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListCustomChannels` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListCustomChannels` must match the call that provided +// the page token. +func (c *AccountsAdclientsCustomchannelsListCall) PageToken(pageToken string) *AccountsAdclientsCustomchannelsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdclientsCustomchannelsListCall) Fields(s ...googleapi.Field) *AccountsAdclientsCustomchannelsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAdclientsCustomchannelsListCall) IfNoneMatch(entityTag string) *AccountsAdclientsCustomchannelsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdclientsCustomchannelsListCall) Context(ctx context.Context) *AccountsAdclientsCustomchannelsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdclientsCustomchannelsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdclientsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/customchannels") + 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 "adsense.accounts.adclients.customchannels.list" call. +// Exactly one of *ListCustomChannelsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either // *ListCustomChannelsResponse.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was @@ -4044,6 +4650,165 @@ func (c *AccountsAdclientsCustomchannelsListLinkedAdUnitsCall) Pages(ctx context } } +// method id "adsense.accounts.adclients.customchannels.patch": + +type AccountsAdclientsCustomchannelsPatchCall struct { + s *Service + name string + customchannel *CustomChannel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a custom channel. This method can only be used by +// projects enabled for the AdSense for Platforms +// (https://developers.google.com/adsense/platforms/) product. +// +// - name: Output only. Resource name of the custom channel. Format: +// accounts/{account}/adclients/{adclient}/customchannels/{customchanne +// l}. +func (r *AccountsAdclientsCustomchannelsService) Patch(name string, customchannel *CustomChannel) *AccountsAdclientsCustomchannelsPatchCall { + c := &AccountsAdclientsCustomchannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.customchannel = customchannel + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. If empty, a full update is performed. +func (c *AccountsAdclientsCustomchannelsPatchCall) UpdateMask(updateMask string) *AccountsAdclientsCustomchannelsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdclientsCustomchannelsPatchCall) Fields(s ...googleapi.Field) *AccountsAdclientsCustomchannelsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdclientsCustomchannelsPatchCall) Context(ctx context.Context) *AccountsAdclientsCustomchannelsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdclientsCustomchannelsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdclientsCustomchannelsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.customchannel) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "adsense.accounts.adclients.customchannels.patch" call. +// Exactly one of *CustomChannel or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CustomChannel.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAdclientsCustomchannelsPatchCall) Do(opts ...googleapi.CallOption) (*CustomChannel, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CustomChannel{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.", + // "flatPath": "v2/accounts/{accountsId}/adclients/{adclientsId}/customchannels/{customchannelsId}", + // "httpMethod": "PATCH", + // "id": "adsense.accounts.adclients.customchannels.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Resource name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}", + // "location": "path", + // "pattern": "^accounts/[^/]+/adclients/[^/]+/customchannels/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to update. If empty, a full update is performed.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "CustomChannel" + // }, + // "response": { + // "$ref": "CustomChannel" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/adsense" + // ] + // } + +} + // method id "adsense.accounts.adclients.urlchannels.get": type AccountsAdclientsUrlchannelsGetCall struct { diff --git a/analyticshub/v1/analyticshub-api.json b/analyticshub/v1/analyticshub-api.json new file mode 100644 index 00000000000..b6743b54de0 --- /dev/null +++ b/analyticshub/v1/analyticshub-api.json @@ -0,0 +1,1256 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/bigquery": { + "description": "View and manage your data in Google BigQuery and see the email address for your Google Account" + }, + "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://analyticshub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Analytics Hub", + "description": "Exchange data and analytics assets securely and efficiently.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/bigquery/docs/analytics-hub-introduction", + "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": "analyticshub:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://analyticshub.mtls.googleapis.com/", + "name": "analyticshub", + "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": { + "organizations": { + "resources": { + "locations": { + "resources": { + "dataExchanges": { + "methods": { + "list": { + "description": "Lists all data exchanges from projects in a given organization and location.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/dataExchanges", + "httpMethod": "GET", + "id": "analyticshub.organizations.locations.dataExchanges.list", + "parameterOrder": [ + "organization" + ], + "parameters": { + "organization": { + "description": "Required. The organization resource path of the projects containing DataExchanges. e.g. `organizations/myorg/locations/US`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token, returned by a previous call, to request the next page of results.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+organization}/dataExchanges", + "response": { + "$ref": "ListOrgDataExchangesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, + "projects": { + "resources": { + "locations": { + "resources": { + "dataExchanges": { + "methods": { + "create": { + "description": "Creates a new data exchange.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "dataExchangeId": { + "description": "Required. The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. Max length: 100 bytes.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource path of the data exchange. e.g. `projects/myproject/locations/US`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/dataExchanges", + "request": { + "$ref": "DataExchange" + }, + "response": { + "$ref": "DataExchange" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an existing data exchange.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}", + "httpMethod": "DELETE", + "id": "analyticshub.projects.locations.dataExchanges.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The full name of the data exchange resource that you want to delete. For example, `projects/myproject/locations/US/dataExchanges/123`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a data exchange.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}", + "httpMethod": "GET", + "id": "analyticshub.projects.locations.dataExchanges.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the data exchange. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DataExchange" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the IAM policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:getIamPolicy", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "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/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all data exchanges in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges", + "httpMethod": "GET", + "id": "analyticshub.projects.locations.dataExchanges.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token, returned by a previous call, to request the next page of results.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource path of the data exchanges. e.g. `projects/myproject/locations/US`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/dataExchanges", + "response": { + "$ref": "ListDataExchangesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing data exchange.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}", + "httpMethod": "PATCH", + "id": "analyticshub.projects.locations.dataExchanges.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the data exchange. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask specifies the fields to update in the data exchange resource. The fields specified in the `updateMask` are relative to the resource and are not a full request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "DataExchange" + }, + "response": { + "$ref": "DataExchange" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the IAM policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:setIamPolicy", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.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/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns the permissions that a caller has.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:testIamPermissions", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.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/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "listings": { + "methods": { + "create": { + "description": "Creates a new listing.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.listings.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "listingId": { + "description": "Required. The ID of the listing to create. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. Max length: 100 bytes.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource path of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/listings", + "request": { + "$ref": "Listing" + }, + "response": { + "$ref": "Listing" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a listing.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", + "httpMethod": "DELETE", + "id": "analyticshub.projects.locations.dataExchanges.listings.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the listing to delete. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a listing.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", + "httpMethod": "GET", + "id": "analyticshub.projects.locations.dataExchanges.listings.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Listing" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the IAM policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:getIamPolicy", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.listings.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "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/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all listings in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings", + "httpMethod": "GET", + "id": "analyticshub.projects.locations.dataExchanges.listings.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token, returned by a previous call, to request the next page of results.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource path of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/listings", + "response": { + "$ref": "ListListingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing listing.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", + "httpMethod": "PATCH", + "id": "analyticshub.projects.locations.dataExchanges.listings.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask specifies the fields to update in the listing resource. The fields specified in the `updateMask` are relative to the resource and are not a full request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Listing" + }, + "response": { + "$ref": "Listing" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the IAM policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:setIamPolicy", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.listings.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/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "subscribe": { + "description": "Subscribes to a listing. Currently, with Analytics Hub, you can create listings that reference only BigQuery datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked dataset in the subscriber's project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:subscribe", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.listings.subscribe", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the listing that you want to subscribe to. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:subscribe", + "request": { + "$ref": "SubscribeListingRequest" + }, + "response": { + "$ref": "SubscribeListingResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns the permissions that a caller has.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:testIamPermissions", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.listings.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/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20220920", + "rootUrl": "https://analyticshub.googleapis.com/", + "schemas": { + "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", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "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" + }, + "AuditLogConfig": { + "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": "AuditLogConfig", + "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" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "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" + } + }, + "type": "object" + }, + "BigQueryDatasetSource": { + "description": "A reference to a shared dataset. It is an existing BigQuery dataset with a collection of objects such as tables and views that you want to share with subscribers. When subscriber's subscribe to a listing, Analytics Hub creates a linked dataset in the subscriber's project. A Linked dataset is an opaque, read-only BigQuery dataset that serves as a _symbolic link_ to a shared dataset.", + "id": "BigQueryDatasetSource", + "properties": { + "dataset": { + "description": "Resource name of the dataset source for this listing. e.g. `projects/myproject/datasets/123`", + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "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)." + }, + "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`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "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`.", + "type": "string" + } + }, + "type": "object" + }, + "DataExchange": { + "description": "A data exchange is a container that lets you share data. Along with the descriptive information about the data exchange, it contains listings that reference shared datasets.", + "id": "DataExchange", + "properties": { + "description": { + "description": "Optional. Description of the data exchange. The description must not contain Unicode non-characters as well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.", + "type": "string" + }, + "displayName": { + "description": "Required. Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (\u0026) and must not start or end with spaces. Default value is an empty string. Max length: 63 bytes.", + "type": "string" + }, + "documentation": { + "description": "Optional. Documentation describing the data exchange.", + "type": "string" + }, + "icon": { + "description": "Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the content of the fields are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire.", + "format": "byte", + "type": "string" + }, + "listingCount": { + "description": "Output only. Number of listings contained in the data exchange.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "name": { + "description": "Output only. The resource name of the data exchange. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + "readOnly": true, + "type": "string" + }, + "primaryContact": { + "description": "Optional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes.", + "type": "string" + } + }, + "type": "object" + }, + "DataProvider": { + "description": "Contains details of the data provider.", + "id": "DataProvider", + "properties": { + "name": { + "description": "Optional. Name of the data provider.", + "type": "string" + }, + "primaryContact": { + "description": "Optional. Email or URL of the data provider. Max Length: 1000 bytes.", + "type": "string" + } + }, + "type": "object" + }, + "DestinationDataset": { + "description": "Defines the destination bigquery dataset.", + "id": "DestinationDataset", + "properties": { + "datasetReference": { + "$ref": "DestinationDatasetReference", + "description": "Required. A reference that identifies the destination dataset." + }, + "description": { + "description": "Optional. A user-friendly description of the dataset.", + "type": "string" + }, + "friendlyName": { + "description": "Optional. A descriptive name for the dataset.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See https://cloud.google.com/resource-manager/docs/creating-managing-labels for more information.", + "type": "object" + }, + "location": { + "description": "Required. The geographic location where the dataset should reside. See https://cloud.google.com/bigquery/docs/locations for supported locations.", + "type": "string" + } + }, + "type": "object" + }, + "DestinationDatasetReference": { + "description": "Contains the reference that identifies a destination bigquery dataset.", + "id": "DestinationDatasetReference", + "properties": { + "datasetId": { + "description": "Required. A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.", + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the project containing this dataset.", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "id": "GetIamPolicyRequest", + "properties": { + "options": { + "$ref": "GetPolicyOptions", + "description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." + } + }, + "type": "object" + }, + "GetPolicyOptions": { + "description": "Encapsulates settings provided to GetIamPolicy.", + "id": "GetPolicyOptions", + "properties": { + "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", + "type": "integer" + } + }, + "type": "object" + }, + "ListDataExchangesResponse": { + "description": "Message for response to the list of data exchanges.", + "id": "ListDataExchangesResponse", + "properties": { + "dataExchanges": { + "description": "The list of data exchanges.", + "items": { + "$ref": "DataExchange" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to request the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListListingsResponse": { + "description": "Message for response to the list of Listings.", + "id": "ListListingsResponse", + "properties": { + "listings": { + "description": "The list of Listing.", + "items": { + "$ref": "Listing" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to request the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListOrgDataExchangesResponse": { + "description": "Message for response to listing data exchanges in an organization and location.", + "id": "ListOrgDataExchangesResponse", + "properties": { + "dataExchanges": { + "description": "The list of data exchanges.", + "items": { + "$ref": "DataExchange" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to request the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "Listing": { + "description": "A listing is what gets published into a data exchange that a subscriber can subscribe to. It contains a reference to the data source along with descriptive information that will help subscribers find and subscribe the data.", + "id": "Listing", + "properties": { + "bigqueryDataset": { + "$ref": "BigQueryDatasetSource", + "description": "Required. Shared dataset i.e. BigQuery dataset source." + }, + "categories": { + "description": "Optional. Categories of the listing. Up to two categories are allowed.", + "items": { + "enum": [ + "CATEGORY_UNSPECIFIED", + "CATEGORY_OTHERS", + "CATEGORY_ADVERTISING_AND_MARKETING", + "CATEGORY_COMMERCE", + "CATEGORY_CLIMATE_AND_ENVIRONMENT", + "CATEGORY_DEMOGRAPHICS", + "CATEGORY_ECONOMICS", + "CATEGORY_EDUCATION", + "CATEGORY_ENERGY", + "CATEGORY_FINANCIAL", + "CATEGORY_GAMING", + "CATEGORY_GEOSPATIAL", + "CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE", + "CATEGORY_MEDIA", + "CATEGORY_PUBLIC_SECTOR", + "CATEGORY_RETAIL", + "CATEGORY_SPORTS", + "CATEGORY_SCIENCE_AND_RESEARCH", + "CATEGORY_TRANSPORTATION_AND_LOGISTICS", + "CATEGORY_TRAVEL_AND_TOURISM" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "type": "array" + }, + "dataProvider": { + "$ref": "DataProvider", + "description": "Optional. Details of the data provider who owns the source data." + }, + "description": { + "description": "Optional. Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.", + "type": "string" + }, + "displayName": { + "description": "Required. Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (\u0026) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.", + "type": "string" + }, + "documentation": { + "description": "Optional. Documentation describing the listing.", + "type": "string" + }, + "icon": { + "description": "Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the contents of the field are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire.", + "format": "byte", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`", + "readOnly": true, + "type": "string" + }, + "primaryContact": { + "description": "Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes.", + "type": "string" + }, + "publisher": { + "$ref": "Publisher", + "description": "Optional. Details of the publisher who owns the listing and who can share the source data." + }, + "requestAccess": { + "description": "Optional. Email or URL of the request access of the listing. Subscribers can use this reference to request access. Max Length: 1000 bytes.", + "type": "string" + }, + "state": { + "description": "Output only. Current state of the listing.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Subscribable state. Users with dataexchange.listings.subscribe permission can subscribe to this listing." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "cancelRequested": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "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" + }, + "statusDetail": { + "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" + }, + "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", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "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": "Binding" + }, + "type": "array" + }, + "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" + }, + "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" + }, + "Publisher": { + "description": "Contains details of the listing publisher.", + "id": "Publisher", + "properties": { + "name": { + "description": "Optional. Name of the listing publisher.", + "type": "string" + }, + "primaryContact": { + "description": "Optional. Email or URL of the listing publisher. Max Length: 1000 bytes.", + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "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." + }, + "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" + }, + "SubscribeListingRequest": { + "description": "Message for subscribing to a listing.", + "id": "SubscribeListingRequest", + "properties": { + "destinationDataset": { + "$ref": "DestinationDataset", + "description": "BigQuery destination dataset to create for the subscriber." + } + }, + "type": "object" + }, + "SubscribeListingResponse": { + "description": "Message for response when you subscribe to a listing.", + "id": "SubscribeListingResponse", + "properties": {}, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "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" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Analytics Hub API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/analyticshub/v1/analyticshub-gen.go b/analyticshub/v1/analyticshub-gen.go new file mode 100644 index 00000000000..de08bd39abc --- /dev/null +++ b/analyticshub/v1/analyticshub-gen.go @@ -0,0 +1,4132 @@ +// Copyright 2022 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 analyticshub provides access to the Analytics Hub API. +// +// For product documentation, see: https://cloud.google.com/bigquery/docs/analytics-hub-introduction +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/analyticshub/v1" +// ... +// ctx := context.Background() +// analyticshubService, err := analyticshub.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 +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// analyticshubService, err := analyticshub.NewService(ctx, option.WithScopes(analyticshub.CloudPlatformScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// analyticshubService, err := analyticshub.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// analyticshubService, err := analyticshub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package analyticshub // import "google.golang.org/api/analyticshub/v1" + +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 + +const apiId = "analyticshub:v1" +const apiName = "analyticshub" +const apiVersion = "v1" +const basePath = "https://analyticshub.googleapis.com/" +const mtlsBasePath = "https://analyticshub.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // View and manage your data in Google BigQuery and see the email + // address for your Google Account + BigqueryScope = "https://www.googleapis.com/auth/bigquery" + + // 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/bigquery", + "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.WithDefaultMTLSEndpoint(mtlsBasePath)) + 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.Organizations = NewOrganizationsService(s) + 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 + + Organizations *OrganizationsService + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + rs.Locations = NewOrganizationsLocationsService(s) + return rs +} + +type OrganizationsService struct { + s *Service + + Locations *OrganizationsLocationsService +} + +func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { + rs := &OrganizationsLocationsService{s: s} + rs.DataExchanges = NewOrganizationsLocationsDataExchangesService(s) + return rs +} + +type OrganizationsLocationsService struct { + s *Service + + DataExchanges *OrganizationsLocationsDataExchangesService +} + +func NewOrganizationsLocationsDataExchangesService(s *Service) *OrganizationsLocationsDataExchangesService { + rs := &OrganizationsLocationsDataExchangesService{s: s} + return rs +} + +type OrganizationsLocationsDataExchangesService struct { + s *Service +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.DataExchanges = NewProjectsLocationsDataExchangesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + DataExchanges *ProjectsLocationsDataExchangesService +} + +func NewProjectsLocationsDataExchangesService(s *Service) *ProjectsLocationsDataExchangesService { + rs := &ProjectsLocationsDataExchangesService{s: s} + rs.Listings = NewProjectsLocationsDataExchangesListingsService(s) + return rs +} + +type ProjectsLocationsDataExchangesService struct { + s *Service + + Listings *ProjectsLocationsDataExchangesListingsService +} + +func NewProjectsLocationsDataExchangesListingsService(s *Service) *ProjectsLocationsDataExchangesListingsService { + rs := &ProjectsLocationsDataExchangesListingsService{s: s} + return rs +} + +type ProjectsLocationsDataExchangesListingsService struct { + s *Service +} + +// 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 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. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: 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. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: 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. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BigQueryDatasetSource: A reference to a shared dataset. It is an +// existing BigQuery dataset with a collection of objects such as tables +// and views that you want to share with subscribers. When subscriber's +// subscribe to a listing, Analytics Hub creates a linked dataset in the +// subscriber's project. A Linked dataset is an opaque, read-only +// BigQuery dataset that serves as a _symbolic link_ to a shared +// dataset. +type BigQueryDatasetSource struct { + // Dataset: Resource name of the dataset source for this listing. e.g. + // `projects/myproject/datasets/123` + Dataset string `json:"dataset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dataset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dataset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BigQueryDatasetSource) MarshalJSON() ([]byte, error) { + type NoMethod BigQueryDatasetSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding 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 *Expr `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`. * + // `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. * `domain:{domain}`: The G + // Suite domain (primary) that represents all the users of that domain. + // For example, `google.com` or `example.com`. + 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`. + 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DataExchange: A data exchange is a container that lets you share +// data. Along with the descriptive information about the data exchange, +// it contains listings that reference shared datasets. +type DataExchange struct { + // Description: Optional. Description of the data exchange. The + // description must not contain Unicode non-characters as well as C0 and + // C1 control codes except tabs (HT), new lines (LF), carriage returns + // (CR), and page breaks (FF). Default value is an empty string. Max + // length: 2000 bytes. + Description string `json:"description,omitempty"` + + // DisplayName: Required. Human-readable display name of the data + // exchange. The display name must contain only Unicode letters, numbers + // (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and + // must not start or end with spaces. Default value is an empty string. + // Max length: 63 bytes. + DisplayName string `json:"displayName,omitempty"` + + // Documentation: Optional. Documentation describing the data exchange. + Documentation string `json:"documentation,omitempty"` + + // Icon: Optional. Base64 encoded image representing the data exchange. + // Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, + // however the API only performs validation on size of the encoded data. + // Note: For byte fields, the content of the fields are base64-encoded + // (which increases the size of the data by 33-36%) when using JSON on + // the wire. + Icon string `json:"icon,omitempty"` + + // ListingCount: Output only. Number of listings contained in the data + // exchange. + ListingCount int64 `json:"listingCount,omitempty"` + + // Name: Output only. The resource name of the data exchange. e.g. + // `projects/myproject/locations/US/dataExchanges/123`. + Name string `json:"name,omitempty"` + + // PrimaryContact: Optional. Email or URL of the primary point of + // contact of the data exchange. Max Length: 1000 bytes. + PrimaryContact string `json:"primaryContact,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DataExchange) MarshalJSON() ([]byte, error) { + type NoMethod DataExchange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DataProvider: Contains details of the data provider. +type DataProvider struct { + // Name: Optional. Name of the data provider. + Name string `json:"name,omitempty"` + + // PrimaryContact: Optional. Email or URL of the data provider. Max + // Length: 1000 bytes. + PrimaryContact string `json:"primaryContact,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DataProvider) MarshalJSON() ([]byte, error) { + type NoMethod DataProvider + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DestinationDataset: Defines the destination bigquery dataset. +type DestinationDataset struct { + // DatasetReference: Required. A reference that identifies the + // destination dataset. + DatasetReference *DestinationDatasetReference `json:"datasetReference,omitempty"` + + // Description: Optional. A user-friendly description of the dataset. + Description string `json:"description,omitempty"` + + // FriendlyName: Optional. A descriptive name for the dataset. + FriendlyName string `json:"friendlyName,omitempty"` + + // Labels: Optional. The labels associated with this dataset. You can + // use these to organize and group your datasets. You can set this + // property when inserting or updating a dataset. See + // https://cloud.google.com/resource-manager/docs/creating-managing-labels + // for more information. + Labels map[string]string `json:"labels,omitempty"` + + // Location: Required. The geographic location where the dataset should + // reside. See https://cloud.google.com/bigquery/docs/locations for + // supported locations. + Location string `json:"location,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetReference") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetReference") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DestinationDataset) MarshalJSON() ([]byte, error) { + type NoMethod DestinationDataset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DestinationDatasetReference: Contains the reference that identifies a +// destination bigquery dataset. +type DestinationDatasetReference struct { + // DatasetId: Required. A unique ID for this dataset, without the + // project name. The ID must contain only letters (a-z, A-Z), numbers + // (0-9), or underscores (_). The maximum length is 1,024 characters. + DatasetId string `json:"datasetId,omitempty"` + + // ProjectId: Required. The ID of the project containing this dataset. + ProjectId string `json:"projectId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DestinationDatasetReference) MarshalJSON() ([]byte, error) { + type NoMethod DestinationDatasetReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// Expr: 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 Expr 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetIamPolicyRequest: Request message for `GetIamPolicy` method. +type GetIamPolicyRequest struct { + // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options + // to `GetIamPolicy`. + Options *GetPolicyOptions `json:"options,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Options") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Options") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. +type GetPolicyOptions struct { + // RequestedPolicyVersion: 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). + RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "RequestedPolicyVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestedPolicyVersion") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { + type NoMethod GetPolicyOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDataExchangesResponse: Message for response to the list of data +// exchanges. +type ListDataExchangesResponse struct { + // DataExchanges: The list of data exchanges. + DataExchanges []*DataExchange `json:"dataExchanges,omitempty"` + + // NextPageToken: A token to request the next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DataExchanges") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataExchanges") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListDataExchangesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDataExchangesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListListingsResponse: Message for response to the list of Listings. +type ListListingsResponse struct { + // Listings: The list of Listing. + Listings []*Listing `json:"listings,omitempty"` + + // NextPageToken: A token to request the next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Listings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Listings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListListingsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListListingsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOrgDataExchangesResponse: Message for response to listing data +// exchanges in an organization and location. +type ListOrgDataExchangesResponse struct { + // DataExchanges: The list of data exchanges. + DataExchanges []*DataExchange `json:"dataExchanges,omitempty"` + + // NextPageToken: A token to request the next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DataExchanges") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataExchanges") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOrgDataExchangesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOrgDataExchangesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Listing: A listing is what gets published into a data exchange that a +// subscriber can subscribe to. It contains a reference to the data +// source along with descriptive information that will help subscribers +// find and subscribe the data. +type Listing struct { + // BigqueryDataset: Required. Shared dataset i.e. BigQuery dataset + // source. + BigqueryDataset *BigQueryDatasetSource `json:"bigqueryDataset,omitempty"` + + // Categories: Optional. Categories of the listing. Up to two categories + // are allowed. + // + // Possible values: + // "CATEGORY_UNSPECIFIED" + // "CATEGORY_OTHERS" + // "CATEGORY_ADVERTISING_AND_MARKETING" + // "CATEGORY_COMMERCE" + // "CATEGORY_CLIMATE_AND_ENVIRONMENT" + // "CATEGORY_DEMOGRAPHICS" + // "CATEGORY_ECONOMICS" + // "CATEGORY_EDUCATION" + // "CATEGORY_ENERGY" + // "CATEGORY_FINANCIAL" + // "CATEGORY_GAMING" + // "CATEGORY_GEOSPATIAL" + // "CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE" + // "CATEGORY_MEDIA" + // "CATEGORY_PUBLIC_SECTOR" + // "CATEGORY_RETAIL" + // "CATEGORY_SPORTS" + // "CATEGORY_SCIENCE_AND_RESEARCH" + // "CATEGORY_TRANSPORTATION_AND_LOGISTICS" + // "CATEGORY_TRAVEL_AND_TOURISM" + Categories []string `json:"categories,omitempty"` + + // DataProvider: Optional. Details of the data provider who owns the + // source data. + DataProvider *DataProvider `json:"dataProvider,omitempty"` + + // Description: Optional. Short description of the listing. The + // description must not contain Unicode non-characters and C0 and C1 + // control codes except tabs (HT), new lines (LF), carriage returns + // (CR), and page breaks (FF). Default value is an empty string. Max + // length: 2000 bytes. + Description string `json:"description,omitempty"` + + // DisplayName: Required. Human-readable display name of the listing. + // The display name must contain only Unicode letters, numbers (0-9), + // underscores (_), dashes (-), spaces ( ), ampersands (&) and can't + // start or end with spaces. Default value is an empty string. Max + // length: 63 bytes. + DisplayName string `json:"displayName,omitempty"` + + // Documentation: Optional. Documentation describing the listing. + Documentation string `json:"documentation,omitempty"` + + // Icon: Optional. Base64 encoded image representing the listing. Max + // Size: 3.0MiB Expected image dimensions are 512x512 pixels, however + // the API only performs validation on size of the encoded data. Note: + // For byte fields, the contents of the field are base64-encoded (which + // increases the size of the data by 33-36%) when using JSON on the + // wire. + Icon string `json:"icon,omitempty"` + + // Name: Output only. The resource name of the listing. e.g. + // `projects/myproject/locations/US/dataExchanges/123/listings/456` + Name string `json:"name,omitempty"` + + // PrimaryContact: Optional. Email or URL of the primary point of + // contact of the listing. Max Length: 1000 bytes. + PrimaryContact string `json:"primaryContact,omitempty"` + + // Publisher: Optional. Details of the publisher who owns the listing + // and who can share the source data. + Publisher *Publisher `json:"publisher,omitempty"` + + // RequestAccess: Optional. Email or URL of the request access of the + // listing. Subscribers can use this reference to request access. Max + // Length: 1000 bytes. + RequestAccess string `json:"requestAccess,omitempty"` + + // State: Output only. Current state of the listing. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - Subscribable state. Users with + // dataexchange.listings.subscribe permission can subscribe to this + // listing. + 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. "BigqueryDataset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BigqueryDataset") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Listing) MarshalJSON() ([]byte, error) { + type NoMethod Listing + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,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"` + + // StatusDetail: Output only. Human-readable status of the operation, if + // any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Publisher: Contains details of the listing publisher. +type Publisher struct { + // Name: Optional. Name of the listing publisher. + Name string `json:"name,omitempty"` + + // PrimaryContact: Optional. Email or URL of the listing publisher. Max + // Length: 1000 bytes. + PrimaryContact string `json:"primaryContact,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Publisher) MarshalJSON() ([]byte, error) { + type NoMethod Publisher + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SubscribeListingRequest: Message for subscribing to a listing. +type SubscribeListingRequest struct { + // DestinationDataset: BigQuery destination dataset to create for the + // subscriber. + DestinationDataset *DestinationDataset `json:"destinationDataset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestinationDataset") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestinationDataset") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SubscribeListingRequest) MarshalJSON() ([]byte, error) { + type NoMethod SubscribeListingRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SubscribeListingResponse: Message for response when you subscribe to +// a listing. +type SubscribeListingResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "analyticshub.organizations.locations.dataExchanges.list": + +type OrganizationsLocationsDataExchangesListCall struct { + s *Service + organization string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all data exchanges from projects in a given organization +// and location. +// +// - organization: The organization resource path of the projects +// containing DataExchanges. e.g. `organizations/myorg/locations/US`. +func (r *OrganizationsLocationsDataExchangesService) List(organization string) *OrganizationsLocationsDataExchangesListCall { + c := &OrganizationsLocationsDataExchangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.organization = organization + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response page. Leverage the page +// tokens to iterate through the entire collection. +func (c *OrganizationsLocationsDataExchangesListCall) PageSize(pageSize int64) *OrganizationsLocationsDataExchangesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned by a previous call, to request the next page of results. +func (c *OrganizationsLocationsDataExchangesListCall) PageToken(pageToken string) *OrganizationsLocationsDataExchangesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsDataExchangesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDataExchangesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsDataExchangesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDataExchangesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsDataExchangesListCall) Context(ctx context.Context) *OrganizationsLocationsDataExchangesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsDataExchangesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsDataExchangesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+organization}/dataExchanges") + 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{ + "organization": c.organization, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.organizations.locations.dataExchanges.list" call. +// Exactly one of *ListOrgDataExchangesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListOrgDataExchangesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsDataExchangesListCall) Do(opts ...googleapi.CallOption) (*ListOrgDataExchangesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListOrgDataExchangesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all data exchanges from projects in a given organization and location.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/dataExchanges", + // "httpMethod": "GET", + // "id": "analyticshub.organizations.locations.dataExchanges.list", + // "parameterOrder": [ + // "organization" + // ], + // "parameters": { + // "organization": { + // "description": "Required. The organization resource path of the projects containing DataExchanges. e.g. `organizations/myorg/locations/US`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned by a previous call, to request the next page of results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+organization}/dataExchanges", + // "response": { + // "$ref": "ListOrgDataExchangesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsDataExchangesListCall) Pages(ctx context.Context, f func(*ListOrgDataExchangesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticshub.projects.locations.dataExchanges.create": + +type ProjectsLocationsDataExchangesCreateCall struct { + s *Service + parent string + dataexchange *DataExchange + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new data exchange. +// +// - parent: The parent resource path of the data exchange. e.g. +// `projects/myproject/locations/US`. +func (r *ProjectsLocationsDataExchangesService) Create(parent string, dataexchange *DataExchange) *ProjectsLocationsDataExchangesCreateCall { + c := &ProjectsLocationsDataExchangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.dataexchange = dataexchange + return c +} + +// DataExchangeId sets the optional parameter "dataExchangeId": +// Required. The ID of the data exchange. Must contain only Unicode +// letters, numbers (0-9), underscores (_). Should not use characters +// that require URL-escaping, or characters outside of ASCII, spaces. +// Max length: 100 bytes. +func (c *ProjectsLocationsDataExchangesCreateCall) DataExchangeId(dataExchangeId string) *ProjectsLocationsDataExchangesCreateCall { + c.urlParams_.Set("dataExchangeId", dataExchangeId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataexchange) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataExchanges") + 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 "analyticshub.projects.locations.dataExchanges.create" call. +// Exactly one of *DataExchange or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DataExchange.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesCreateCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DataExchange{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new data exchange.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "dataExchangeId": { + // "description": "Required. The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. Max length: 100 bytes.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource path of the data exchange. e.g. `projects/myproject/locations/US`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/dataExchanges", + // "request": { + // "$ref": "DataExchange" + // }, + // "response": { + // "$ref": "DataExchange" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.delete": + +type ProjectsLocationsDataExchangesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an existing data exchange. +// +// - name: The full name of the data exchange resource that you want to +// delete. For example, +// `projects/myproject/locations/US/dataExchanges/123`. +func (r *ProjectsLocationsDataExchangesService) Delete(name string) *ProjectsLocationsDataExchangesDeleteCall { + c := &ProjectsLocationsDataExchangesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an existing data exchange.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}", + // "httpMethod": "DELETE", + // "id": "analyticshub.projects.locations.dataExchanges.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The full name of the data exchange resource that you want to delete. For example, `projects/myproject/locations/US/dataExchanges/123`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.get": + +type ProjectsLocationsDataExchangesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a data exchange. +// +// - name: The resource name of the data exchange. e.g. +// `projects/myproject/locations/US/dataExchanges/123`. +func (r *ProjectsLocationsDataExchangesService) Get(name string) *ProjectsLocationsDataExchangesGetCall { + c := &ProjectsLocationsDataExchangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataExchangesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesGetCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.get" call. +// Exactly one of *DataExchange or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DataExchange.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesGetCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DataExchange{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a data exchange.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}", + // "httpMethod": "GET", + // "id": "analyticshub.projects.locations.dataExchanges.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the data exchange. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "DataExchange" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.getIamPolicy": + +type ProjectsLocationsDataExchangesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the IAM policy. +// +// - 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 *ProjectsLocationsDataExchangesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDataExchangesGetIamPolicyCall { + c := &ProjectsLocationsDataExchangesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + 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 "analyticshub.projects.locations.dataExchanges.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the IAM policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:getIamPolicy", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "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/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "request": { + // "$ref": "GetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.list": + +type ProjectsLocationsDataExchangesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all data exchanges in a given project and location. +// +// - parent: The parent resource path of the data exchanges. e.g. +// `projects/myproject/locations/US`. +func (r *ProjectsLocationsDataExchangesService) List(parent string) *ProjectsLocationsDataExchangesListCall { + c := &ProjectsLocationsDataExchangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response page. Leverage the page +// tokens to iterate through the entire collection. +func (c *ProjectsLocationsDataExchangesListCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned by a previous call, to request the next page of results. +func (c *ProjectsLocationsDataExchangesListCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataExchangesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataExchanges") + 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 "analyticshub.projects.locations.dataExchanges.list" call. +// Exactly one of *ListDataExchangesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListDataExchangesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesListCall) Do(opts ...googleapi.CallOption) (*ListDataExchangesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDataExchangesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all data exchanges in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges", + // "httpMethod": "GET", + // "id": "analyticshub.projects.locations.dataExchanges.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned by a previous call, to request the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource path of the data exchanges. e.g. `projects/myproject/locations/US`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/dataExchanges", + // "response": { + // "$ref": "ListDataExchangesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataExchangesListCall) Pages(ctx context.Context, f func(*ListDataExchangesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticshub.projects.locations.dataExchanges.patch": + +type ProjectsLocationsDataExchangesPatchCall struct { + s *Service + name string + dataexchange *DataExchange + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing data exchange. +// +// - name: Output only. The resource name of the data exchange. e.g. +// `projects/myproject/locations/US/dataExchanges/123`. +func (r *ProjectsLocationsDataExchangesService) Patch(name string, dataexchange *DataExchange) *ProjectsLocationsDataExchangesPatchCall { + c := &ProjectsLocationsDataExchangesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.dataexchange = dataexchange + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask specifies the fields to update in the data exchange resource. +// The fields specified in the `updateMask` are relative to the resource +// and are not a full request. +func (c *ProjectsLocationsDataExchangesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataExchangesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataexchange) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.patch" call. +// Exactly one of *DataExchange or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DataExchange.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesPatchCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DataExchange{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing data exchange.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}", + // "httpMethod": "PATCH", + // "id": "analyticshub.projects.locations.dataExchanges.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the data exchange. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask specifies the fields to update in the data exchange resource. The fields specified in the `updateMask` are relative to the resource and are not a full request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "DataExchange" + // }, + // "response": { + // "$ref": "DataExchange" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.setIamPolicy": + +type ProjectsLocationsDataExchangesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the IAM policy. +// +// - 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 *ProjectsLocationsDataExchangesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDataExchangesSetIamPolicyCall { + c := &ProjectsLocationsDataExchangesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + 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 "analyticshub.projects.locations.dataExchanges.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the IAM policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.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/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.testIamPermissions": + +type ProjectsLocationsDataExchangesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns the permissions that a caller has. +// +// - 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 *ProjectsLocationsDataExchangesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDataExchangesTestIamPermissionsCall { + c := &ProjectsLocationsDataExchangesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + 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 "analyticshub.projects.locations.dataExchanges.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 + // { + // "description": "Returns the permissions that a caller has.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.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/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.create": + +type ProjectsLocationsDataExchangesListingsCreateCall struct { + s *Service + parent string + listing *Listing + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new listing. +// +// - parent: The parent resource path of the listing. e.g. +// `projects/myproject/locations/US/dataExchanges/123`. +func (r *ProjectsLocationsDataExchangesListingsService) Create(parent string, listing *Listing) *ProjectsLocationsDataExchangesListingsCreateCall { + c := &ProjectsLocationsDataExchangesListingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.listing = listing + return c +} + +// ListingId sets the optional parameter "listingId": Required. The ID +// of the listing to create. Must contain only Unicode letters, numbers +// (0-9), underscores (_). Should not use characters that require +// URL-escaping, or characters outside of ASCII, spaces. Max length: 100 +// bytes. +func (c *ProjectsLocationsDataExchangesListingsCreateCall) ListingId(listingId string) *ProjectsLocationsDataExchangesListingsCreateCall { + c.urlParams_.Set("listingId", listingId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/listings") + 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 "analyticshub.projects.locations.dataExchanges.listings.create" call. +// Exactly one of *Listing or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Listing.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesListingsCreateCall) Do(opts ...googleapi.CallOption) (*Listing, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Listing{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new listing.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.listings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "listingId": { + // "description": "Required. The ID of the listing to create. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. Max length: 100 bytes.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource path of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/listings", + // "request": { + // "$ref": "Listing" + // }, + // "response": { + // "$ref": "Listing" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.delete": + +type ProjectsLocationsDataExchangesListingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a listing. +// +// - name: Resource name of the listing to delete. e.g. +// `projects/myproject/locations/US/dataExchanges/123/listings/456`. +func (r *ProjectsLocationsDataExchangesListingsService) Delete(name string) *ProjectsLocationsDataExchangesListingsDeleteCall { + c := &ProjectsLocationsDataExchangesListingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.listings.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a listing.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", + // "httpMethod": "DELETE", + // "id": "analyticshub.projects.locations.dataExchanges.listings.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the listing to delete. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.get": + +type ProjectsLocationsDataExchangesListingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a listing. +// +// - name: The resource name of the listing. e.g. +// `projects/myproject/locations/US/dataExchanges/123/listings/456`. +func (r *ProjectsLocationsDataExchangesListingsService) Get(name string) *ProjectsLocationsDataExchangesListingsGetCall { + c := &ProjectsLocationsDataExchangesListingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataExchangesListingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.listings.get" call. +// Exactly one of *Listing or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Listing.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesListingsGetCall) Do(opts ...googleapi.CallOption) (*Listing, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Listing{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a listing.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", + // "httpMethod": "GET", + // "id": "analyticshub.projects.locations.dataExchanges.listings.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Listing" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.getIamPolicy": + +type ProjectsLocationsDataExchangesListingsGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the IAM policy. +// +// - 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 *ProjectsLocationsDataExchangesListingsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall { + c := &ProjectsLocationsDataExchangesListingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + 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 "analyticshub.projects.locations.dataExchanges.listings.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the IAM policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:getIamPolicy", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.listings.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "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/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "request": { + // "$ref": "GetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.list": + +type ProjectsLocationsDataExchangesListingsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all listings in a given project and location. +// +// - parent: The parent resource path of the listing. e.g. +// `projects/myproject/locations/US/dataExchanges/123`. +func (r *ProjectsLocationsDataExchangesListingsService) List(parent string) *ProjectsLocationsDataExchangesListingsListCall { + c := &ProjectsLocationsDataExchangesListingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response page. Leverage the page +// tokens to iterate through the entire collection. +func (c *ProjectsLocationsDataExchangesListingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned by a previous call, to request the next page of results. +func (c *ProjectsLocationsDataExchangesListingsListCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListingsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataExchangesListingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsListCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/listings") + 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 "analyticshub.projects.locations.dataExchanges.listings.list" call. +// Exactly one of *ListListingsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListListingsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesListingsListCall) Do(opts ...googleapi.CallOption) (*ListListingsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListListingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all listings in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings", + // "httpMethod": "GET", + // "id": "analyticshub.projects.locations.dataExchanges.listings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned by a previous call, to request the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource path of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/listings", + // "response": { + // "$ref": "ListListingsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataExchangesListingsListCall) Pages(ctx context.Context, f func(*ListListingsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.patch": + +type ProjectsLocationsDataExchangesListingsPatchCall struct { + s *Service + name string + listing *Listing + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing listing. +// +// - name: Output only. The resource name of the listing. e.g. +// `projects/myproject/locations/US/dataExchanges/123/listings/456`. +func (r *ProjectsLocationsDataExchangesListingsService) Patch(name string, listing *Listing) *ProjectsLocationsDataExchangesListingsPatchCall { + c := &ProjectsLocationsDataExchangesListingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.listing = listing + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask specifies the fields to update in the listing resource. The +// fields specified in the `updateMask` are relative to the resource and +// are not a full request. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataExchangesListingsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.listings.patch" call. +// Exactly one of *Listing or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Listing.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) Do(opts ...googleapi.CallOption) (*Listing, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Listing{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing listing.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", + // "httpMethod": "PATCH", + // "id": "analyticshub.projects.locations.dataExchanges.listings.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask specifies the fields to update in the listing resource. The fields specified in the `updateMask` are relative to the resource and are not a full request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Listing" + // }, + // "response": { + // "$ref": "Listing" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.setIamPolicy": + +type ProjectsLocationsDataExchangesListingsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the IAM policy. +// +// - 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 *ProjectsLocationsDataExchangesListingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall { + c := &ProjectsLocationsDataExchangesListingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + 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 "analyticshub.projects.locations.dataExchanges.listings.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the IAM policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.listings.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/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.subscribe": + +type ProjectsLocationsDataExchangesListingsSubscribeCall struct { + s *Service + name string + subscribelistingrequest *SubscribeListingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Subscribe: Subscribes to a listing. Currently, with Analytics Hub, +// you can create listings that reference only BigQuery datasets. Upon +// subscription to a listing for a BigQuery dataset, Analytics Hub +// creates a linked dataset in the subscriber's project. +// +// - name: Resource name of the listing that you want to subscribe to. +// e.g. +// `projects/myproject/locations/US/dataExchanges/123/listings/456`. +func (r *ProjectsLocationsDataExchangesListingsService) Subscribe(name string, subscribelistingrequest *SubscribeListingRequest) *ProjectsLocationsDataExchangesListingsSubscribeCall { + c := &ProjectsLocationsDataExchangesListingsSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.subscribelistingrequest = subscribelistingrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsSubscribeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsSubscribeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscribelistingrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:subscribe") + 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 "analyticshub.projects.locations.dataExchanges.listings.subscribe" call. +// Exactly one of *SubscribeListingResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *SubscribeListingResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Do(opts ...googleapi.CallOption) (*SubscribeListingResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SubscribeListingResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Subscribes to a listing. Currently, with Analytics Hub, you can create listings that reference only BigQuery datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked dataset in the subscriber's project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:subscribe", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.listings.subscribe", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the listing that you want to subscribe to. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:subscribe", + // "request": { + // "$ref": "SubscribeListingRequest" + // }, + // "response": { + // "$ref": "SubscribeListingResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.testIamPermissions": + +type ProjectsLocationsDataExchangesListingsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns the permissions that a caller has. +// +// - 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 *ProjectsLocationsDataExchangesListingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall { + c := &ProjectsLocationsDataExchangesListingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + 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 "analyticshub.projects.locations.dataExchanges.listings.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 + // { + // "description": "Returns the permissions that a caller has.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.listings.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/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 2067ca1cfa2..1e6fd1a1360 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1065,7 +1065,7 @@ } } }, - "revision": "20220829", + "revision": "20220921", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -4326,7 +4326,7 @@ "type": "boolean" }, "keyguardDisabled": { - "description": "Whether the keyguard is disabled.", + "description": "If true, this disables the Lock Screen (https://source.android.com/docs/core/display/multi_display/lock-screen) for primary and/or secondary displays.", "type": "boolean" }, "keyguardDisabledFeatures": { @@ -4579,7 +4579,7 @@ "type": "array" }, "shareLocationDisabled": { - "description": "Whether location sharing is disabled.", + "description": "Whether location sharing is disabled. share_location_disabled is supported for both fully managed devices and personally owned work profiles.", "type": "boolean" }, "shortSupportMessage": { @@ -4659,7 +4659,7 @@ "type": "boolean" }, "wifiConfigDisabled": { - "description": "Whether configuring Wi-Fi access points is disabled.Note: If a network connection can't be made at boot time and configuring Wi-Fi is disabled then network escape hatch will be shown in order to refresh the device policy (see networkEscapeHatchEnabled).", + "description": "Whether configuring Wi-Fi access points is disabled. Note: If a network connection can't be made at boot time and configuring Wi-Fi is disabled then network escape hatch will be shown in order to refresh the device policy (see networkEscapeHatchEnabled).", "type": "boolean" }, "wifiConfigsLockdownEnabled": { diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 536509dcd9a..d922ceba94b 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -4870,7 +4870,9 @@ type Policy struct { // InstallUnknownSourcesAllowed: This field has no effect. InstallUnknownSourcesAllowed bool `json:"installUnknownSourcesAllowed,omitempty"` - // KeyguardDisabled: Whether the keyguard is disabled. + // KeyguardDisabled: If true, this disables the Lock Screen + // (https://source.android.com/docs/core/display/multi_display/lock-screen) + // for primary and/or secondary displays. KeyguardDisabled bool `json:"keyguardDisabled,omitempty"` // KeyguardDisabledFeatures: Disabled keyguard customizations, such as @@ -5122,6 +5124,8 @@ type Policy struct { SetupActions []*SetupAction `json:"setupActions,omitempty"` // ShareLocationDisabled: Whether location sharing is disabled. + // share_location_disabled is supported for both fully managed devices + // and personally owned work profiles. ShareLocationDisabled bool `json:"shareLocationDisabled,omitempty"` // ShortSupportMessage: A message displayed to the user in the settings @@ -5199,9 +5203,9 @@ type Policy struct { VpnConfigDisabled bool `json:"vpnConfigDisabled,omitempty"` // WifiConfigDisabled: Whether configuring Wi-Fi access points is - // disabled.Note: If a network connection can't be made at boot time and - // configuring Wi-Fi is disabled then network escape hatch will be shown - // in order to refresh the device policy (see + // disabled. Note: If a network connection can't be made at boot time + // and configuring Wi-Fi is disabled then network escape hatch will be + // shown in order to refresh the device policy (see // networkEscapeHatchEnabled). WifiConfigDisabled bool `json:"wifiConfigDisabled,omitempty"` diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 73d3989906d..59a4f2ced71 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -3920,7 +3920,7 @@ } } }, - "revision": "20220906", + "revision": "20220927", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "AcquisitionTargetingRule": { @@ -4079,6 +4079,10 @@ "description": "Whether the renewing base plan is backward compatible. The backward compatible base plan is returned by the Google Play Billing Library deprecated method querySkuDetailsAsync(). Only one renewing base plan can be marked as legacy compatible for a given subscription.", "type": "boolean" }, + "legacyCompatibleSubscriptionOfferId": { + "description": "Subscription offer id which is legacy compatible. The backward compatible subscription offer is returned by the Google Play Billing Library deprecated method querySkuDetailsAsync(). Only one subscription offer can be marked as legacy compatible for a given renewing base plan. To have no Subscription offer as legacy compatible set this field as empty string.", + "type": "string" + }, "prorationMode": { "description": "The proration mode for the base plan determines what happens when a user switches to this plan from another base plan. If unspecified, defaults to CHARGE_ON_NEXT_BILLING_DATE.", "enum": [ @@ -5543,7 +5547,7 @@ "id": "PrepaidPlan", "properties": { "allowExtendAfterTime": { - "description": "After this time, the subscription is allowed for a new top-up purchase. Not present if the subscription is already extended by a top-up purchase.", + "description": "If present, this is the time after which top up purchases are allowed for the prepaid plan. Will not be present for expired prepaid plans.", "format": "google-datetime", "type": "string" } diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 537d1097724..eb43ed07083 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -820,6 +820,15 @@ type AutoRenewingBasePlanType struct { // given subscription. LegacyCompatible bool `json:"legacyCompatible,omitempty"` + // LegacyCompatibleSubscriptionOfferId: Subscription offer id which is + // legacy compatible. The backward compatible subscription offer is + // returned by the Google Play Billing Library deprecated method + // querySkuDetailsAsync(). Only one subscription offer can be marked as + // legacy compatible for a given renewing base plan. To have no + // Subscription offer as legacy compatible set this field as empty + // string. + LegacyCompatibleSubscriptionOfferId string `json:"legacyCompatibleSubscriptionOfferId,omitempty"` + // ProrationMode: The proration mode for the base plan determines what // happens when a user switches to this plan from another base plan. If // unspecified, defaults to CHARGE_ON_NEXT_BILLING_DATE. @@ -3412,9 +3421,9 @@ func (s *PrepaidBasePlanType) MarshalJSON() ([]byte, error) { // PrepaidPlan: Information related to a prepaid plan. type PrepaidPlan struct { - // AllowExtendAfterTime: After this time, the subscription is allowed - // for a new top-up purchase. Not present if the subscription is already - // extended by a top-up purchase. + // AllowExtendAfterTime: If present, this is the time after which top up + // purchases are allowed for the prepaid plan. Will not be present for + // expired prepaid plans. AllowExtendAfterTime string `json:"allowExtendAfterTime,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/api-list.json b/api-list.json index d497d381d56..89ed0013c2d 100644 --- a/api-list.json +++ b/api-list.json @@ -285,6 +285,21 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://cloud.google.com/bigquery/docs/analytics-hub-introduction", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "analyticshub:v1", + "name": "analyticshub", + "version": "v1", + "title": "Analytics Hub API", + "description": "Exchange data and analytics assets securely and efficiently.", + "discoveryRestUrl": "https://analyticshub.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/bigquery/docs/analytics-hub-introduction", "preferred": true }, { @@ -541,6 +556,21 @@ "documentationLink": "https://cloud.google.com/artifacts/docs/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "assuredworkloads:v1beta1", + "name": "assuredworkloads", + "version": "v1beta1", + "title": "Assured Workloads API", + "description": "", + "discoveryRestUrl": "https://assuredworkloads.googleapis.com/$discovery/rest?version=v1beta1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "assuredworkloads:v1", diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index 4740a852ca2..9ad5520b8a6 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -8609,7 +8609,7 @@ } } }, - "revision": "20220908", + "revision": "20220922", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -14934,7 +14934,7 @@ "DATA_LOSS" ], "enumDescriptions": [ - "Not an error; returned on success HTTP Mapping: 200 OK", + "Not an error; returned on success. HTTP Mapping: 200 OK", "The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request", "Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error", "The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request", diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index 7d16fb96982..9dfbd64b835 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -10998,7 +10998,7 @@ type GoogleCloudApigeeV1UpdateError struct { // Code: Status code. // // Possible values: - // "OK" - Not an error; returned on success HTTP Mapping: 200 OK + // "OK" - Not an error; returned on success. HTTP Mapping: 200 OK // "CANCELLED" - The operation was cancelled, typically by the caller. // HTTP Mapping: 499 Client Closed Request // "UNKNOWN" - Unknown error. For example, this error may be returned diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 98bcd451160..5acf34d43d6 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -743,6 +743,50 @@ } } }, + "kfpArtifacts": { + "methods": { + "upload": { + "description": "Directly uploads a KFP artifact. The returned Operation will complete once the resource is uploaded. Package, Version, and File resources will be created based on the uploaded artifact. Uploaded artifacts that conflict with existing resources will be overwritten.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/kfpArtifacts:create", + "httpMethod": "POST", + "id": "artifactregistry.projects.locations.repositories.kfpArtifacts.upload", + "mediaUpload": { + "accept": [ + "*/*" + ], + "protocols": { + "simple": { + "multipart": true, + "path": "/upload/v1/{+parent}/kfpArtifacts:create" + } + } + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The resource name of the repository where the KFP artifact will be uploaded.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/kfpArtifacts:create", + "request": { + "$ref": "UploadKfpArtifactRequest" + }, + "response": { + "$ref": "UploadKfpArtifactMediaResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "supportsMediaUpload": true + } + } + }, "mavenArtifacts": { "methods": { "get": { @@ -1413,7 +1457,7 @@ } } }, - "revision": "20220829", + "revision": "20220910", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -1781,6 +1825,22 @@ }, "type": "object" }, + "KfpArtifact": { + "description": "A detailed representation of a GooGet artifact.", + "id": "KfpArtifact", + "properties": { + "name": { + "description": "Output only. Resource name of the KFP artifact. Since users don't directly interact with this resource, the name will be derived from the associated version. For example, when version = \".../versions/sha256:abcdef...\", the name will be \".../kfpArtifacts/sha256:abcdef...\".", + "readOnly": true, + "type": "string" + }, + "version": { + "description": "The version associated with the KFP artifact. Must follow the Semantic Versioning standard.", + "type": "string" + } + }, + "type": "object" + }, "ListDockerImagesResponse": { "description": "The response from listing docker images.", "id": "ListDockerImagesResponse", @@ -2437,6 +2497,41 @@ }, "type": "object" }, + "UploadKfpArtifactMediaResponse": { + "description": "The response to upload an artifact.", + "id": "UploadKfpArtifactMediaResponse", + "properties": { + "operation": { + "$ref": "Operation", + "description": "Operation that will be returned to the user." + } + }, + "type": "object" + }, + "UploadKfpArtifactMetadata": { + "description": "The operation metadata for uploading KFP artifacts.", + "id": "UploadKfpArtifactMetadata", + "properties": {}, + "type": "object" + }, + "UploadKfpArtifactRequest": { + "description": "The request to upload an artifact.", + "id": "UploadKfpArtifactRequest", + "properties": { + "description": { + "description": "Description of the package version.", + "type": "string" + }, + "tags": { + "description": "Tags to be created with the version.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "UploadYumArtifactMediaResponse": { "description": "The response to upload an artifact.", "id": "UploadYumArtifactMediaResponse", diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 4a0ae59e09a..8bea5271502 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -187,6 +187,7 @@ func NewProjectsLocationsRepositoriesService(s *Service) *ProjectsLocationsRepos rs.AptArtifacts = NewProjectsLocationsRepositoriesAptArtifactsService(s) rs.DockerImages = NewProjectsLocationsRepositoriesDockerImagesService(s) rs.Files = NewProjectsLocationsRepositoriesFilesService(s) + rs.KfpArtifacts = NewProjectsLocationsRepositoriesKfpArtifactsService(s) rs.MavenArtifacts = NewProjectsLocationsRepositoriesMavenArtifactsService(s) rs.NpmPackages = NewProjectsLocationsRepositoriesNpmPackagesService(s) rs.Packages = NewProjectsLocationsRepositoriesPackagesService(s) @@ -204,6 +205,8 @@ type ProjectsLocationsRepositoriesService struct { Files *ProjectsLocationsRepositoriesFilesService + KfpArtifacts *ProjectsLocationsRepositoriesKfpArtifactsService + MavenArtifacts *ProjectsLocationsRepositoriesMavenArtifactsService NpmPackages *ProjectsLocationsRepositoriesNpmPackagesService @@ -242,6 +245,15 @@ type ProjectsLocationsRepositoriesFilesService struct { s *Service } +func NewProjectsLocationsRepositoriesKfpArtifactsService(s *Service) *ProjectsLocationsRepositoriesKfpArtifactsService { + rs := &ProjectsLocationsRepositoriesKfpArtifactsService{s: s} + return rs +} + +type ProjectsLocationsRepositoriesKfpArtifactsService struct { + s *Service +} + func NewProjectsLocationsRepositoriesMavenArtifactsService(s *Service) *ProjectsLocationsRepositoriesMavenArtifactsService { rs := &ProjectsLocationsRepositoriesMavenArtifactsService{s: s} return rs @@ -966,6 +978,42 @@ func (s *ImportYumArtifactsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// KfpArtifact: A detailed representation of a GooGet artifact. +type KfpArtifact struct { + // Name: Output only. Resource name of the KFP artifact. Since users + // don't directly interact with this resource, the name will be derived + // from the associated version. For example, when version = + // ".../versions/sha256:abcdef...", the name will be + // ".../kfpArtifacts/sha256:abcdef...". + Name string `json:"name,omitempty"` + + // Version: The version associated with the KFP artifact. Must follow + // the Semantic Versioning standard. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *KfpArtifact) MarshalJSON() ([]byte, error) { + type NoMethod KfpArtifact + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDockerImagesResponse: The response from listing docker images. type ListDockerImagesResponse struct { // DockerImages: The docker images returned. @@ -2192,6 +2240,74 @@ func (s *UploadAptArtifactResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UploadKfpArtifactMediaResponse: The response to upload an artifact. +type UploadKfpArtifactMediaResponse struct { + // Operation: Operation that will be returned to the user. + Operation *Operation `json:"operation,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Operation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Operation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UploadKfpArtifactMediaResponse) MarshalJSON() ([]byte, error) { + type NoMethod UploadKfpArtifactMediaResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UploadKfpArtifactMetadata: The operation metadata for uploading KFP +// artifacts. +type UploadKfpArtifactMetadata struct { +} + +// UploadKfpArtifactRequest: The request to upload an artifact. +type UploadKfpArtifactRequest struct { + // Description: Description of the package version. + Description string `json:"description,omitempty"` + + // Tags: Tags to be created with the version. + Tags []string `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UploadKfpArtifactRequest) MarshalJSON() ([]byte, error) { + type NoMethod UploadKfpArtifactRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UploadYumArtifactMediaResponse: The response to upload an artifact. type UploadYumArtifactMediaResponse struct { // Operation: Operation to be returned to the user. @@ -5528,6 +5644,232 @@ func (c *ProjectsLocationsRepositoriesFilesListCall) Pages(ctx context.Context, } } +// method id "artifactregistry.projects.locations.repositories.kfpArtifacts.upload": + +type ProjectsLocationsRepositoriesKfpArtifactsUploadCall struct { + s *Service + parent string + uploadkfpartifactrequest *UploadKfpArtifactRequest + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header +} + +// Upload: Directly uploads a KFP artifact. The returned Operation will +// complete once the resource is uploaded. Package, Version, and File +// resources will be created based on the uploaded artifact. Uploaded +// artifacts that conflict with existing resources will be overwritten. +// +// - parent: The resource name of the repository where the KFP artifact +// will be uploaded. +func (r *ProjectsLocationsRepositoriesKfpArtifactsService) Upload(parent string, uploadkfpartifactrequest *UploadKfpArtifactRequest) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall { + c := &ProjectsLocationsRepositoriesKfpArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.uploadkfpartifactrequest = uploadkfpartifactrequest + 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 *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall { + 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 *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall { + 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 *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall { + 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 information. +func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +// This context will supersede any context previously provided to the +// ResumableMedia method. +func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadkfpartifactrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/kfpArtifacts:create") + if c.mediaInfo_ != nil { + urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/kfpArtifacts:create") + 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 "artifactregistry.projects.locations.repositories.kfpArtifacts.upload" call. +// Exactly one of *UploadKfpArtifactMediaResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *UploadKfpArtifactMediaResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadKfpArtifactMediaResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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, err + } + } + ret := &UploadKfpArtifactMediaResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Directly uploads a KFP artifact. The returned Operation will complete once the resource is uploaded. Package, Version, and File resources will be created based on the uploaded artifact. Uploaded artifacts that conflict with existing resources will be overwritten.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/kfpArtifacts:create", + // "httpMethod": "POST", + // "id": "artifactregistry.projects.locations.repositories.kfpArtifacts.upload", + // "mediaUpload": { + // "accept": [ + // "*/*" + // ], + // "protocols": { + // "simple": { + // "multipart": true, + // "path": "/upload/v1/{+parent}/kfpArtifacts:create" + // } + // } + // }, + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The resource name of the repository where the KFP artifact will be uploaded.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/kfpArtifacts:create", + // "request": { + // "$ref": "UploadKfpArtifactRequest" + // }, + // "response": { + // "$ref": "UploadKfpArtifactMediaResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ], + // "supportsMediaUpload": true + // } + +} + // method id "artifactregistry.projects.locations.repositories.mavenArtifacts.get": type ProjectsLocationsRepositoriesMavenArtifactsGetCall struct { diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 09c64836950..2fb93c126d4 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -372,6 +372,118 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "violations": { + "methods": { + "acknowledge": { + "description": "Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid business justification. Acknowledgement is a permanent operation and it cannot be reverted.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}:acknowledge", + "httpMethod": "POST", + "id": "assuredworkloads.organizations.locations.workloads.violations.acknowledge", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Violation to acknowledge. Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:acknowledge", + "request": { + "$ref": "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest" + }, + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves Assured Workload Violation based on ID.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.violations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1Violation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.violations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A custom filter for filtering by the Violations properties.", + "location": "query", + "type": "string" + }, + "interval.endTime": { + "description": "The end of the time window.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "interval.startTime": { + "description": "The start of the time window.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token returned from previous request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Workload name. Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/violations", + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1ListViolationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } } } @@ -379,9 +491,30 @@ } } }, - "revision": "20220909", + "revision": "20220926", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { + "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { + "description": "Request for acknowledging the violation Next Id: 4", + "id": "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest", + "properties": { + "comment": { + "description": "Required. Business justification explaining the need for violation acknowledgement", + "type": "string" + }, + "nonCompliantOrgPolicy": { + "description": "Optional. Name of the OrgPolicy which was modified with non-compliant change and resulted in this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse": { + "description": "Response for violation acknowledgement", + "id": "GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { "description": "Operation metadata to give request details of CreateWorkload.", "id": "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata", @@ -399,7 +532,8 @@ "HITRUST", "EU_REGIONS_AND_SUPPORT", "CA_REGIONS_AND_SUPPORT", - "ITAR" + "ITAR", + "ASSURED_WORKLOADS_FOR_PARTNERS" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -412,7 +546,8 @@ "Health Information Trust Alliance controls", "Assured Workloads For EU Regions and Support controls", "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations" + "International Traffic in Arms Regulations", + "Assured Workloads for Partners;" ], "type": "string" }, @@ -432,6 +567,24 @@ }, "type": "object" }, + "GoogleCloudAssuredworkloadsV1ListViolationsResponse": { + "description": "Response of ListViolations endpoint.", + "id": "GoogleCloudAssuredworkloadsV1ListViolationsResponse", + "properties": { + "nextPageToken": { + "description": "The next page token. Returns empty if reached the last page.", + "type": "string" + }, + "violations": { + "description": "List of Violations under a Workload.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1Violation" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1ListWorkloadsResponse": { "description": "Response of ListWorkloads endpoint.", "id": "GoogleCloudAssuredworkloadsV1ListWorkloadsResponse", @@ -477,6 +630,200 @@ "properties": {}, "type": "object" }, + "GoogleCloudAssuredworkloadsV1Violation": { + "description": "Workload monitoring Violation.", + "id": "GoogleCloudAssuredworkloadsV1Violation", + "properties": { + "acknowledged": { + "description": "A boolean that indicates if the violation is acknowledged", + "type": "boolean" + }, + "acknowledgementTime": { + "description": "Optional. Timestamp when this violation was acknowledged last. This will be absent when acknowledged field is marked as false.", + "format": "google-datetime", + "type": "string" + }, + "auditLogLink": { + "description": "Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}", + "readOnly": true, + "type": "string" + }, + "beginTime": { + "description": "Output only. Time of the event which triggered the Violation.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "category": { + "description": "Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc.", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Immutable. Name of the Violation. Format: organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}", + "readOnly": true, + "type": "string" + }, + "nonCompliantOrgPolicy": { + "description": "Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}", + "readOnly": true, + "type": "string" + }, + "orgPolicyConstraint": { + "description": "Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation.", + "readOnly": true, + "type": "string" + }, + "remediation": { + "$ref": "GoogleCloudAssuredworkloadsV1ViolationRemediation", + "description": "Output only. Compliance violation remediation", + "readOnly": true + }, + "resolveTime": { + "description": "Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the violation", + "enum": [ + "STATE_UNSPECIFIED", + "RESOLVED", + "UNRESOLVED", + "EXCEPTION" + ], + "enumDescriptions": [ + "Unspecified state.", + "Violation is resolved.", + "Violation is Unresolved", + "Violation is Exception" + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last time when the Violation record was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1ViolationRemediation": { + "description": "Represents remediation guidance to resolve compliance violation for AssuredWorkload", + "id": "GoogleCloudAssuredworkloadsV1ViolationRemediation", + "properties": { + "compliantValues": { + "description": "Values that can resolve the violation For example: for list org policy violations, this will either be the list of allowed or denied values", + "items": { + "type": "string" + }, + "type": "array" + }, + "instructions": { + "$ref": "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions", + "description": "Required. Remediation instructions to resolve violations" + }, + "remediationType": { + "description": "Output only. Reemediation type based on the type of org policy values violated", + "enum": [ + "REMEDIATION_TYPE_UNSPECIFIED", + "REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION", + "REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION", + "REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION", + "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION" + ], + "enumDescriptions": [ + "Unspecified remediation type", + "Remediation type for boolean org policy", + "Remediation type for list org policy which have allowed values in the monitoring rule", + "Remediation type for list org policy which have denied values in the monitoring rule", + "Remediation type for gcp.restrictCmekCryptoKeyProjects" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions": { + "description": "Instructions to remediate violation", + "id": "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions", + "properties": { + "consoleInstructions": { + "$ref": "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole", + "description": "Remediation instructions to resolve violation via cloud console" + }, + "gcloudInstructions": { + "$ref": "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud", + "description": "Remediation instructions to resolve violation via gcloud cli" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole": { + "description": "Remediation instructions to resolve violation via cloud console", + "id": "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole", + "properties": { + "additionalLinks": { + "description": "Additional urls for more information about steps", + "items": { + "type": "string" + }, + "type": "array" + }, + "consoleUris": { + "description": "Link to console page where violations can be resolved", + "items": { + "type": "string" + }, + "type": "array" + }, + "steps": { + "description": "Steps to resolve violation via cloud console", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud": { + "description": "Remediation instructions to resolve violation via gcloud cli", + "id": "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud", + "properties": { + "additionalLinks": { + "description": "Additional urls for more information about steps", + "items": { + "type": "string" + }, + "type": "array" + }, + "gcloudCommands": { + "description": "Gcloud command to resolve violation", + "items": { + "type": "string" + }, + "type": "array" + }, + "steps": { + "description": "Steps to resolve violation via gcloud cli", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1Workload": { "description": "An Workload object for managing highly regulated workloads of cloud customers.", "id": "GoogleCloudAssuredworkloadsV1Workload", @@ -498,7 +845,8 @@ "HITRUST", "EU_REGIONS_AND_SUPPORT", "CA_REGIONS_AND_SUPPORT", - "ITAR" + "ITAR", + "ASSURED_WORKLOADS_FOR_PARTNERS" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -511,7 +859,8 @@ "Health Information Trust Alliance controls", "Assured Workloads For EU Regions and Support controls", "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations" + "International Traffic in Arms Regulations", + "Assured Workloads for Partners;" ], "type": "string" }, @@ -571,6 +920,18 @@ "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", "type": "string" }, + "partner": { + "description": "Optional. Compliance Regime associated with this workload.", + "enum": [ + "PARTNER_UNSPECIFIED", + "LOCAL_CONTROLS_BY_S3NS" + ], + "enumDescriptions": [ + "Unknown compliance regime.", + "S3NS regime" + ], + "type": "string" + }, "provisionedResourcesParent": { "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", "type": "string" @@ -720,748 +1081,6 @@ }, "type": "object" }, - "GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata": { - "description": "Operation metadata to give request details of CreateWorkload.", - "id": "GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata", - "properties": { - "complianceRegime": { - "description": "Optional. Compliance controls that should be applied to the resources managed by the workload.", - "enum": [ - "COMPLIANCE_REGIME_UNSPECIFIED", - "IL4", - "CJIS", - "FEDRAMP_HIGH", - "FEDRAMP_MODERATE", - "US_REGIONAL_ACCESS", - "HIPAA", - "HITRUST", - "EU_REGIONS_AND_SUPPORT", - "CA_REGIONS_AND_SUPPORT", - "ITAR" - ], - "enumDescriptions": [ - "Unknown compliance regime.", - "Information protection as per DoD IL4 requirements.", - "Criminal Justice Information Services (CJIS) Security policies.", - "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls", - "Assured Workloads For US Regions data protection controls", - "Health Insurance Portability and Accountability Act controls", - "Health Information Trust Alliance controls", - "Assured Workloads For EU Regions and Support controls", - "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations" - ], - "type": "string" - }, - "createTime": { - "description": "Optional. Time when the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "displayName": { - "description": "Optional. The display name of the workload.", - "type": "string" - }, - "parent": { - "description": "Optional. The parent of the workload.", - "type": "string" - }, - "resourceSettings": { - "description": "Optional. Resource properties in the input that are used for creating/customizing workload resources.", - "items": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1Workload": { - "description": "An Workload object for managing highly regulated workloads of cloud customers.", - "id": "GoogleCloudAssuredworkloadsV1beta1Workload", - "properties": { - "billingAccount": { - "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", - "type": "string" - }, - "cjisSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings", - "description": "Input only. Immutable. Settings specific to resources needed for CJIS." - }, - "complianceRegime": { - "description": "Required. Immutable. Compliance Regime associated with this workload.", - "enum": [ - "COMPLIANCE_REGIME_UNSPECIFIED", - "IL4", - "CJIS", - "FEDRAMP_HIGH", - "FEDRAMP_MODERATE", - "US_REGIONAL_ACCESS", - "HIPAA", - "HITRUST", - "EU_REGIONS_AND_SUPPORT", - "CA_REGIONS_AND_SUPPORT", - "ITAR" - ], - "enumDescriptions": [ - "Unknown compliance regime.", - "Information protection as per DoD IL4 requirements.", - "Criminal Justice Information Services (CJIS) Security policies.", - "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls", - "Assured Workloads For US Regions data protection controls", - "Health Insurance Portability and Accountability Act controls", - "Health Information Trust Alliance controls", - "Assured Workloads For EU Regions and Support controls", - "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations" - ], - "type": "string" - }, - "compliantButDisallowedServices": { - "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "createTime": { - "description": "Output only. Immutable. The Workload creation timestamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", - "type": "string" - }, - "enableSovereignControls": { - "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", - "type": "boolean" - }, - "etag": { - "description": "Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update \u0026 Delete operations.", - "type": "string" - }, - "fedrampHighSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings", - "description": "Input only. Immutable. Settings specific to resources needed for FedRAMP High." - }, - "fedrampModerateSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings", - "description": "Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." - }, - "il4Settings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings", - "description": "Input only. Immutable. Settings specific to resources needed for IL4." - }, - "kajEnrollmentState": { - "description": "Output only. Represents the KAJ enrollment state of the given workload.", - "enum": [ - "KAJ_ENROLLMENT_STATE_UNSPECIFIED", - "KAJ_ENROLLMENT_STATE_PENDING", - "KAJ_ENROLLMENT_STATE_COMPLETE" - ], - "enumDescriptions": [ - "Default State for KAJ Enrollment.", - "Pending State for KAJ Enrollment.", - "Complete State for KAJ Enrollment." - ], - "readOnly": true, - "type": "string" - }, - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Labels applied to the workload.", - "type": "object" - }, - "name": { - "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", - "type": "string" - }, - "provisionedResourcesParent": { - "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", - "type": "string" - }, - "resourceSettings": { - "description": "Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.", - "items": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings" - }, - "type": "array" - }, - "resources": { - "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", - "items": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo" - }, - "readOnly": true, - "type": "array" - }, - "saaEnrollmentResponse": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse", - "description": "Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page.", - "readOnly": true - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings": { - "description": "Settings specific to resources needed for CJIS.", - "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings": { - "description": "Settings specific to resources needed for FedRAMP High.", - "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings": { - "description": "Settings specific to resources needed for FedRAMP Moderate.", - "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings": { - "description": "Settings specific to resources needed for IL4.", - "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings": { - "description": "Settings specific to the Key Management Service.", - "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "properties": { - "nextRotationTime": { - "description": "Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary.", - "format": "google-datetime", - "type": "string" - }, - "rotationPeriod": { - "description": "Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key Management Service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo": { - "description": "Represent the resources that are children of this Workload.", - "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo", - "properties": { - "resourceId": { - "description": "Resource identifier. For a project this represents project_number.", - "format": "int64", - "type": "string" - }, - "resourceType": { - "description": "Indicates the type of resource.", - "enum": [ - "RESOURCE_TYPE_UNSPECIFIED", - "CONSUMER_PROJECT", - "CONSUMER_FOLDER", - "ENCRYPTION_KEYS_PROJECT", - "KEYRING" - ], - "enumDescriptions": [ - "Unknown resource type.", - "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", - "Consumer Folder.", - "Consumer project containing encryption keys.", - "Keyring resource that hosts encryption keys." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings": { - "description": "Represent the custom settings for the resources to be created.", - "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings", - "properties": { - "displayName": { - "description": "User-assigned resource display name. If not empty it will be used to create a resource with the specified name.", - "type": "string" - }, - "resourceId": { - "description": "Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google.", - "type": "string" - }, - "resourceType": { - "description": "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT)", - "enum": [ - "RESOURCE_TYPE_UNSPECIFIED", - "CONSUMER_PROJECT", - "CONSUMER_FOLDER", - "ENCRYPTION_KEYS_PROJECT", - "KEYRING" - ], - "enumDescriptions": [ - "Unknown resource type.", - "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", - "Consumer Folder.", - "Consumer project containing encryption keys.", - "Keyring resource that hosts encryption keys." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse": { - "description": "Signed Access Approvals (SAA) enrollment response.", - "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse", - "properties": { - "setupErrors": { - "description": "Indicates SAA enrollment setup error if any.", - "items": { - "enum": [ - "SETUP_ERROR_UNSPECIFIED", - "ERROR_INVALID_BASE_SETUP", - "ERROR_MISSING_EXTERNAL_SIGNING_KEY", - "ERROR_NOT_ALL_SERVICES_ENROLLED", - "ERROR_SETUP_CHECK_FAILED" - ], - "enumDescriptions": [ - "Unspecified.", - "Invalid states for all customers, to be redirected to AA UI for additional details.", - "Returned when there is not an EKM key configured.", - "Returned when there are no enrolled services or the customer is enrolled in CAA only for a subset of services.", - "Returned when exception was encountered during evaluation of other criteria." - ], - "type": "string" - }, - "type": "array" - }, - "setupStatus": { - "description": "Indicates SAA enrollment status of a given workload.", - "enum": [ - "SETUP_STATE_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_COMPLETE" - ], - "enumDescriptions": [ - "Unspecified.", - "SAA enrollment pending.", - "SAA enrollment comopleted." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata": { - "description": "Operation metadata to give request details of CreateWorkload.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata", - "properties": { - "complianceRegime": { - "description": "Optional. Compliance controls that should be applied to the resources managed by the workload.", - "enum": [ - "COMPLIANCE_REGIME_UNSPECIFIED", - "IL4", - "CJIS", - "FEDRAMP_HIGH", - "FEDRAMP_MODERATE", - "US_REGIONAL_ACCESS", - "HIPAA", - "HITRUST", - "EU_REGIONS_AND_SUPPORT", - "CA_REGIONS_AND_SUPPORT", - "ITAR" - ], - "enumDescriptions": [ - "Unknown compliance regime.", - "Information protection as per DoD IL4 requirements.", - "Criminal Justice Information Services (CJIS) Security policies.", - "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls", - "Assured Workloads For US Regions data protection controls", - "Health Insurance Portability and Accountability Act controls", - "Health Information Trust Alliance controls", - "Assured Workloads For EU Regions and Support controls", - "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations" - ], - "type": "string" - }, - "createTime": { - "description": "Optional. Time when the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "displayName": { - "description": "Optional. The display name of the workload.", - "type": "string" - }, - "parent": { - "description": "Optional. The parent of the workload.", - "type": "string" - }, - "resourceSettings": { - "description": "Optional. Resource properties in the input that are used for creating/customizing workload resources.", - "items": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkload": { - "description": "An Workload object for managing highly regulated workloads of cloud customers.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkload", - "properties": { - "billingAccount": { - "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", - "type": "string" - }, - "cjisSettings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for CJIS." - }, - "complianceRegime": { - "description": "Required. Immutable. Compliance Regime associated with this workload.", - "enum": [ - "COMPLIANCE_REGIME_UNSPECIFIED", - "IL4", - "CJIS", - "FEDRAMP_HIGH", - "FEDRAMP_MODERATE", - "US_REGIONAL_ACCESS", - "HIPAA", - "HITRUST", - "EU_REGIONS_AND_SUPPORT", - "CA_REGIONS_AND_SUPPORT", - "ITAR" - ], - "enumDescriptions": [ - "Unknown compliance regime.", - "Information protection as per DoD IL4 requirements.", - "Criminal Justice Information Services (CJIS) Security policies.", - "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls", - "Assured Workloads For US Regions data protection controls", - "Health Insurance Portability and Accountability Act controls", - "Health Information Trust Alliance controls", - "Assured Workloads For EU Regions and Support controls", - "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations" - ], - "type": "string" - }, - "complianceStatus": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus", - "description": "Output only. Count of active Violations in the Workload.", - "readOnly": true - }, - "compliantButDisallowedServices": { - "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "createTime": { - "description": "Output only. Immutable. The Workload creation timestamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", - "type": "string" - }, - "enableSovereignControls": { - "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", - "type": "boolean" - }, - "etag": { - "description": "Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update \u0026 Delete operations.", - "type": "string" - }, - "fedrampHighSettings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High." - }, - "fedrampModerateSettings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." - }, - "il4Settings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for IL4." - }, - "kajEnrollmentState": { - "description": "Output only. Represents the KAJ enrollment state of the given workload.", - "enum": [ - "KAJ_ENROLLMENT_STATE_UNSPECIFIED", - "KAJ_ENROLLMENT_STATE_PENDING", - "KAJ_ENROLLMENT_STATE_COMPLETE" - ], - "enumDescriptions": [ - "Default State for KAJ Enrollment.", - "Pending State for KAJ Enrollment.", - "Complete State for KAJ Enrollment." - ], - "readOnly": true, - "type": "string" - }, - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", - "description": "Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Labels applied to the workload.", - "type": "object" - }, - "name": { - "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", - "type": "string" - }, - "provisionedResourcesParent": { - "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", - "type": "string" - }, - "resourceSettings": { - "description": "Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.", - "items": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings" - }, - "type": "array" - }, - "resources": { - "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", - "items": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo" - }, - "readOnly": true, - "type": "array" - }, - "saaEnrollmentResponse": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse", - "description": "Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page.", - "readOnly": true - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings": { - "description": "Settings specific to resources needed for CJIS.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", - "description": "Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus": { - "description": "Represents the Compliance Status of this workload", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus", - "properties": { - "acknowledgedViolationCount": { - "description": "Count of active Violations which are acknowledged in the Workload.", - "format": "int32", - "type": "integer" - }, - "activeViolationCount": { - "description": "Count of active Violations which haven't been acknowledged.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings": { - "description": "Settings specific to resources needed for FedRAMP High.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", - "description": "Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings": { - "description": "Settings specific to resources needed for FedRAMP Moderate.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", - "description": "Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings": { - "description": "Settings specific to resources needed for IL4.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", - "description": "Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings": { - "description": "Settings specific to the Key Management Service.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", - "properties": { - "nextRotationTime": { - "description": "Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary.", - "format": "google-datetime", - "type": "string" - }, - "rotationPeriod": { - "description": "Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key Management Service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo": { - "description": "Represent the resources that are children of this Workload.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo", - "properties": { - "resourceId": { - "description": "Resource identifier. For a project this represents project_number.", - "format": "int64", - "type": "string" - }, - "resourceType": { - "description": "Indicates the type of resource.", - "enum": [ - "RESOURCE_TYPE_UNSPECIFIED", - "CONSUMER_PROJECT", - "CONSUMER_FOLDER", - "ENCRYPTION_KEYS_PROJECT", - "KEYRING" - ], - "enumDescriptions": [ - "Unknown resource type.", - "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", - "Consumer Folder.", - "Consumer project containing encryption keys.", - "Keyring resource that hosts encryption keys." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings": { - "description": "Represent the custom settings for the resources to be created.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings", - "properties": { - "displayName": { - "description": "User-assigned resource display name. If not empty it will be used to create a resource with the specified name.", - "type": "string" - }, - "resourceId": { - "description": "Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google.", - "type": "string" - }, - "resourceType": { - "description": "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT)", - "enum": [ - "RESOURCE_TYPE_UNSPECIFIED", - "CONSUMER_PROJECT", - "CONSUMER_FOLDER", - "ENCRYPTION_KEYS_PROJECT", - "KEYRING" - ], - "enumDescriptions": [ - "Unknown resource type.", - "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", - "Consumer Folder.", - "Consumer project containing encryption keys.", - "Keyring resource that hosts encryption keys." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse": { - "description": "Signed Access Approvals (SAA) enrollment response.", - "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse", - "properties": { - "setupErrors": { - "description": "Indicates SAA enrollment setup error if any.", - "items": { - "enum": [ - "SETUP_ERROR_UNSPECIFIED", - "ERROR_INVALID_BASE_SETUP", - "ERROR_MISSING_EXTERNAL_SIGNING_KEY", - "ERROR_NOT_ALL_SERVICES_ENROLLED", - "ERROR_SETUP_CHECK_FAILED" - ], - "enumDescriptions": [ - "Unspecified.", - "Invalid states for all customers, to be redirected to AA UI for additional details.", - "Returned when there is not an EKM key configured.", - "Returned when there are no enrolled services or the customer is enrolled in CAA only for a subset of services.", - "Returned when exception was encountered during evaluation of other criteria." - ], - "type": "string" - }, - "type": "array" - }, - "setupStatus": { - "description": "Indicates SAA enrollment status of a given workload.", - "enum": [ - "SETUP_STATE_UNSPECIFIED", - "STATUS_PENDING", - "STATUS_COMPLETE" - ], - "enumDescriptions": [ - "Unspecified.", - "SAA enrollment pending.", - "SAA enrollment comopleted." - ], - "type": "string" - } - }, - "type": "object" - }, "GoogleLongrunningListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "GoogleLongrunningListOperationsResponse", diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 539021a144e..d2a94f3f9d8 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -175,11 +175,68 @@ type OrganizationsLocationsOperationsService struct { func NewOrganizationsLocationsWorkloadsService(s *Service) *OrganizationsLocationsWorkloadsService { rs := &OrganizationsLocationsWorkloadsService{s: s} + rs.Violations = NewOrganizationsLocationsWorkloadsViolationsService(s) return rs } type OrganizationsLocationsWorkloadsService struct { s *Service + + Violations *OrganizationsLocationsWorkloadsViolationsService +} + +func NewOrganizationsLocationsWorkloadsViolationsService(s *Service) *OrganizationsLocationsWorkloadsViolationsService { + rs := &OrganizationsLocationsWorkloadsViolationsService{s: s} + return rs +} + +type OrganizationsLocationsWorkloadsViolationsService struct { + s *Service +} + +// GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest: Request for +// acknowledging the violation Next Id: 4 +type GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest struct { + // Comment: Required. Business justification explaining the need for + // violation acknowledgement + Comment string `json:"comment,omitempty"` + + // NonCompliantOrgPolicy: Optional. Name of the OrgPolicy which was + // modified with non-compliant change and resulted in this violation. + // Format: projects/{project_number}/policies/{constraint_name} + // folders/{folder_id}/policies/{constraint_name} + // organizations/{organization_id}/policies/{constraint_name} + NonCompliantOrgPolicy string `json:"nonCompliantOrgPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Comment") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Comment") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse: Response +// for violation acknowledgement +type GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` } // GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata: @@ -205,6 +262,7 @@ type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { // "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and // Support controls // "ITAR" - International Traffic in Arms Regulations + // "ASSURED_WORKLOADS_FOR_PARTNERS" - Assured Workloads for Partners; ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. @@ -240,6 +298,43 @@ func (s *GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata) MarshalJS return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsV1ListViolationsResponse: Response of +// ListViolations endpoint. +type GoogleCloudAssuredworkloadsV1ListViolationsResponse struct { + // NextPageToken: The next page token. Returns empty if reached the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Violations: List of Violations under a Workload. + Violations []*GoogleCloudAssuredworkloadsV1Violation `json:"violations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1ListViolationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1ListViolationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAssuredworkloadsV1ListWorkloadsResponse: Response of // ListWorkloads endpoint. type GoogleCloudAssuredworkloadsV1ListWorkloadsResponse struct { @@ -326,6 +421,262 @@ type GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse struct { googleapi.ServerResponse `json:"-"` } +// GoogleCloudAssuredworkloadsV1Violation: Workload monitoring +// Violation. +type GoogleCloudAssuredworkloadsV1Violation struct { + // Acknowledged: A boolean that indicates if the violation is + // acknowledged + Acknowledged bool `json:"acknowledged,omitempty"` + + // AcknowledgementTime: Optional. Timestamp when this violation was + // acknowledged last. This will be absent when acknowledged field is + // marked as false. + AcknowledgementTime string `json:"acknowledgementTime,omitempty"` + + // AuditLogLink: Output only. Immutable. Audit Log Link for violated + // resource Format: + // https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder} + AuditLogLink string `json:"auditLogLink,omitempty"` + + // BeginTime: Output only. Time of the event which triggered the + // Violation. + BeginTime string `json:"beginTime,omitempty"` + + // Category: Output only. Category under which this violation is mapped. + // e.g. Location, Service Usage, Access, Encryption, etc. + Category string `json:"category,omitempty"` + + // Description: Output only. Description for the Violation. e.g. + // OrgPolicy gcp.resourceLocations has non compliant value. + Description string `json:"description,omitempty"` + + // Name: Output only. Immutable. Name of the Violation. Format: + // organizations/{organization}/locations/{location}/workloads/{workload_ + // id}/violations/{violations_id} + Name string `json:"name,omitempty"` + + // NonCompliantOrgPolicy: Output only. Immutable. Name of the OrgPolicy + // which was modified with non-compliant change and resulted this + // violation. Format: + // projects/{project_number}/policies/{constraint_name} + // folders/{folder_id}/policies/{constraint_name} + // organizations/{organization_id}/policies/{constraint_name} + NonCompliantOrgPolicy string `json:"nonCompliantOrgPolicy,omitempty"` + + // OrgPolicyConstraint: Output only. Immutable. The + // org-policy-constraint that was incorrectly changed, which resulted in + // this violation. + OrgPolicyConstraint string `json:"orgPolicyConstraint,omitempty"` + + // Remediation: Output only. Compliance violation remediation + Remediation *GoogleCloudAssuredworkloadsV1ViolationRemediation `json:"remediation,omitempty"` + + // ResolveTime: Output only. Time of the event which fixed the + // Violation. If the violation is ACTIVE this will be empty. + ResolveTime string `json:"resolveTime,omitempty"` + + // State: Output only. State of the violation + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "RESOLVED" - Violation is resolved. + // "UNRESOLVED" - Violation is Unresolved + // "EXCEPTION" - Violation is Exception + State string `json:"state,omitempty"` + + // UpdateTime: Output only. The last time when the Violation record was + // 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. "Acknowledged") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Acknowledged") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1Violation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1Violation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1ViolationRemediation: Represents +// remediation guidance to resolve compliance violation for +// AssuredWorkload +type GoogleCloudAssuredworkloadsV1ViolationRemediation struct { + // CompliantValues: Values that can resolve the violation For example: + // for list org policy violations, this will either be the list of + // allowed or denied values + CompliantValues []string `json:"compliantValues,omitempty"` + + // Instructions: Required. Remediation instructions to resolve + // violations + Instructions *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions `json:"instructions,omitempty"` + + // RemediationType: Output only. Reemediation type based on the type of + // org policy values violated + // + // Possible values: + // "REMEDIATION_TYPE_UNSPECIFIED" - Unspecified remediation type + // "REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION" - Remediation type for + // boolean org policy + // "REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION" - + // Remediation type for list org policy which have allowed values in the + // monitoring rule + // "REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION" - Remediation + // type for list org policy which have denied values in the monitoring + // rule + // + // "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION" + // - Remediation type for gcp.restrictCmekCryptoKeyProjects + RemediationType string `json:"remediationType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompliantValues") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompliantValues") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1ViolationRemediation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1ViolationRemediation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions: +// Instructions to remediate violation +type GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions struct { + // ConsoleInstructions: Remediation instructions to resolve violation + // via cloud console + ConsoleInstructions *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole `json:"consoleInstructions,omitempty"` + + // GcloudInstructions: Remediation instructions to resolve violation via + // gcloud cli + GcloudInstructions *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud `json:"gcloudInstructions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConsoleInstructions") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConsoleInstructions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole: +// Remediation instructions to resolve violation via cloud console +type GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole struct { + // AdditionalLinks: Additional urls for more information about steps + AdditionalLinks []string `json:"additionalLinks,omitempty"` + + // ConsoleUris: Link to console page where violations can be resolved + ConsoleUris []string `json:"consoleUris,omitempty"` + + // Steps: Steps to resolve violation via cloud console + Steps []string `json:"steps,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalLinks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalLinks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud: +// Remediation instructions to resolve violation via gcloud cli +type GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud struct { + // AdditionalLinks: Additional urls for more information about steps + AdditionalLinks []string `json:"additionalLinks,omitempty"` + + // GcloudCommands: Gcloud command to resolve violation + GcloudCommands []string `json:"gcloudCommands,omitempty"` + + // Steps: Steps to resolve violation via gcloud cli + Steps []string `json:"steps,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalLinks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalLinks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAssuredworkloadsV1Workload: An Workload object for // managing highly regulated workloads of cloud customers. type GoogleCloudAssuredworkloadsV1Workload struct { @@ -358,6 +709,7 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and // Support controls // "ITAR" - International Traffic in Arms Regulations + // "ASSURED_WORKLOADS_FOR_PARTNERS" - Assured Workloads for Partners; ComplianceRegime string `json:"complianceRegime,omitempty"` // CompliantButDisallowedServices: Output only. Urls for services which @@ -412,6 +764,13 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // Read-only. Name string `json:"name,omitempty"` + // Partner: Optional. Compliance Regime associated with this workload. + // + // Possible values: + // "PARTNER_UNSPECIFIED" - Unknown compliance regime. + // "LOCAL_CONTROLS_BY_S3NS" - S3NS regime + Partner string `json:"partner,omitempty"` + // ProvisionedResourcesParent: Input only. The parent resource for the // resources managed by this Assured Workload. May be either empty or a // folder resource which is a child of the Workload parent. If not @@ -648,45 +1007,21 @@ func (s *GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata: -// Operation metadata to give request details of CreateWorkload. -type GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata struct { - // ComplianceRegime: Optional. Compliance controls that should be - // applied to the resources managed by the workload. - // - // Possible values: - // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. - // "IL4" - Information protection as per DoD IL4 requirements. - // "CJIS" - Criminal Justice Information Services (CJIS) Security - // policies. - // "FEDRAMP_HIGH" - FedRAMP High data protection controls - // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls - // "US_REGIONAL_ACCESS" - Assured Workloads For US Regions data - // protection controls - // "HIPAA" - Health Insurance Portability and Accountability Act - // controls - // "HITRUST" - Health Information Trust Alliance controls - // "EU_REGIONS_AND_SUPPORT" - Assured Workloads For EU Regions and - // Support controls - // "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and - // Support controls - // "ITAR" - International Traffic in Arms Regulations - ComplianceRegime string `json:"complianceRegime,omitempty"` - - // CreateTime: Optional. Time when the operation was created. - CreateTime string `json:"createTime,omitempty"` - - // DisplayName: Optional. The display name of the workload. - DisplayName string `json:"displayName,omitempty"` +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` - // Parent: Optional. The parent of the workload. - Parent string `json:"parent,omitempty"` + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` - // ResourceSettings: Optional. Resource properties in the input that are - // used for creating/customizing workload resources. - ResourceSettings []*GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings `json:"resourceSettings,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ComplianceRegime") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -694,181 +1029,61 @@ type GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ComplianceRegime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata +func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAssuredworkloadsV1beta1Workload: An Workload object for -// managing highly regulated workloads of cloud customers. -type GoogleCloudAssuredworkloadsV1beta1Workload struct { - // BillingAccount: Optional. The billing account used for the resources - // which are direct children of workload. This billing account is - // initially associated with the resources created as part of Workload - // creation. After the initial creation of these resources, the customer - // can change the assigned billing account. The resource name has the - // form `billingAccounts/{billing_account_id}`. For example, - // `billingAccounts/012345-567890-ABCDEF`. - BillingAccount string `json:"billingAccount,omitempty"` - - // CjisSettings: Input only. Immutable. Settings specific to resources - // needed for CJIS. - CjisSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings `json:"cjisSettings,omitempty"` - - // ComplianceRegime: Required. Immutable. Compliance Regime associated - // with this workload. - // - // Possible values: - // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. - // "IL4" - Information protection as per DoD IL4 requirements. - // "CJIS" - Criminal Justice Information Services (CJIS) Security - // policies. - // "FEDRAMP_HIGH" - FedRAMP High data protection controls - // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls - // "US_REGIONAL_ACCESS" - Assured Workloads For US Regions data - // protection controls - // "HIPAA" - Health Insurance Portability and Accountability Act - // controls - // "HITRUST" - Health Information Trust Alliance controls - // "EU_REGIONS_AND_SUPPORT" - Assured Workloads For EU Regions and - // Support controls - // "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and - // Support controls - // "ITAR" - International Traffic in Arms Regulations - ComplianceRegime string `json:"complianceRegime,omitempty"` - - // CompliantButDisallowedServices: Output only. Urls for services which - // are compliant for this Assured Workload, but which are currently - // disallowed by the ResourceUsageRestriction org policy. Invoke - // RestrictAllowedResources endpoint to allow your project developers to - // use these services in their environment." - CompliantButDisallowedServices []string `json:"compliantButDisallowedServices,omitempty"` - - // CreateTime: Output only. Immutable. The Workload creation timestamp. - CreateTime string `json:"createTime,omitempty"` - - // DisplayName: Required. The user-assigned display name of the - // Workload. When present it must be between 4 to 30 characters. Allowed - // characters are: lowercase and uppercase letters, numbers, hyphen, and - // spaces. Example: My Workload - DisplayName string `json:"displayName,omitempty"` - - // EnableSovereignControls: Optional. Indicates the sovereignty status - // of the given workload. Currently meant to be used by Europe/Canada - // customers. - EnableSovereignControls bool `json:"enableSovereignControls,omitempty"` - - // Etag: Optional. ETag of the workload, it is calculated on the basis - // of the Workload contents. It will be used in Update & Delete - // operations. - Etag string `json:"etag,omitempty"` - - // FedrampHighSettings: Input only. Immutable. Settings specific to - // resources needed for FedRAMP High. - FedrampHighSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings `json:"fedrampHighSettings,omitempty"` - - // FedrampModerateSettings: Input only. Immutable. Settings specific to - // resources needed for FedRAMP Moderate. - FedrampModerateSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings `json:"fedrampModerateSettings,omitempty"` - - // Il4Settings: Input only. Immutable. Settings specific to resources - // needed for IL4. - Il4Settings *GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings `json:"il4Settings,omitempty"` - - // KajEnrollmentState: Output only. Represents the KAJ enrollment state - // of the given workload. - // - // Possible values: - // "KAJ_ENROLLMENT_STATE_UNSPECIFIED" - Default State for KAJ - // Enrollment. - // "KAJ_ENROLLMENT_STATE_PENDING" - Pending State for KAJ Enrollment. - // "KAJ_ENROLLMENT_STATE_COMPLETE" - Complete State for KAJ - // Enrollment. - KajEnrollmentState string `json:"kajEnrollmentState,omitempty"` +// 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"` - // KmsSettings: Input only. Settings used to create a CMEK crypto key. - // When set, a project with a KMS CMEK key is provisioned. This field is - // deprecated as of Feb 28, 2022. In order to create a Keyring, callers - // should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in - // ResourceSettings.resource_type field. - KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` + // Error: The error result of the operation in case of failure or + // cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` - // Labels: Optional. Labels applied to the workload. - Labels map[string]string `json:"labels,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: Optional. The resource name of the workload. Format: - // organizations/{organization}/locations/{location}/workloads/{workload} - // Read-only. + // 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"` - // ProvisionedResourcesParent: Input only. The parent resource for the - // resources managed by this Assured Workload. May be either empty or a - // folder resource which is a child of the Workload parent. If not - // specified all resources are created under the parent organization. - // Format: folders/{folder_id} - ProvisionedResourcesParent string `json:"provisionedResourcesParent,omitempty"` - - // ResourceSettings: Input only. Resource properties that are used to - // customize workload resources. These properties (such as custom - // project id) will be used to create workload resources if possible. - // This field is optional. - ResourceSettings []*GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings `json:"resourceSettings,omitempty"` - - // Resources: Output only. The resources associated with this workload. - // These resources will be created when creating the workload. If any of - // the projects already exist, the workload creation will fail. Always - // read only. - Resources []*GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo `json:"resources,omitempty"` - - // SaaEnrollmentResponse: Output only. Represents the SAA enrollment - // response of the given workload. SAA enrollment response is queried - // during GetWorkload call. In failure cases, user friendly error - // message is shown in SAA details page. - SaaEnrollmentResponse *GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse `json:"saaEnrollmentResponse,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BillingAccount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BillingAccount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsV1beta1Workload) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1Workload - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Response: The normal response of the operation in case of success. 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"` -// GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings: Settings -// specific to resources needed for CJIS. -type GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings struct { - // KmsSettings: Input only. Immutable. Settings used to create a CMEK - // crypto key. - KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "KmsSettings") to + // ForceSendFields is a list of field names (e.g. "Done") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -876,59 +1091,54 @@ type GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KmsSettings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings: -// Settings specific to resources needed for FedRAMP High. -type GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings struct { - // KmsSettings: Input only. Immutable. Settings used to create a CMEK - // crypto key. - KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsSettings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KmsSettings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// 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:"-"` } -func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, 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"` -// GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings: -// Settings specific to resources needed for FedRAMP Moderate. -type GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings struct { - // KmsSettings: Input only. Immutable. Settings used to create a CMEK - // crypto key. - KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,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. "KmsSettings") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -936,1013 +1146,609 @@ type GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KmsSettings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings: Settings -// specific to resources needed for IL4. -type GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings struct { - // KmsSettings: Input only. Immutable. Settings used to create a CMEK - // crypto key. - KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsSettings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// method id "assuredworkloads.organizations.locations.operations.get": - // NullFields is a list of field names (e.g. "KmsSettings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +type OrganizationsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { + c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c } -// GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings: Settings -// specific to the Key Management Service. -type GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings struct { - // NextRotationTime: Required. Input only. Immutable. The time at which - // the Key Management Service will automatically create a new version of - // the crypto key and mark it as the primary. - NextRotationTime string `json:"nextRotationTime,omitempty"` +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} - // RotationPeriod: Required. Input only. Immutable. [next_rotation_time] - // will be advanced by this period when the Key Management Service - // automatically rotates a key. Must be at least 24 hours and at most - // 876,000 hours. - RotationPeriod string `json:"rotationPeriod,omitempty"` +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} - // ForceSendFields is a list of field names (e.g. "NextRotationTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} - // NullFields is a list of field names (e.g. "NextRotationTime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo: Represent the -// resources that are children of this Workload. -type GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo struct { - // ResourceId: Resource identifier. For a project this represents - // project_number. - ResourceId int64 `json:"resourceId,omitempty,string"` +// Do executes the "assuredworkloads.organizations.locations.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsGetCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // ResourceType: Indicates the type of resource. - // - // Possible values: - // "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type. - // "CONSUMER_PROJECT" - Deprecated. Existing workloads will continue - // to support this, but new CreateWorkloadRequests should not specify - // this as an input value. - // "CONSUMER_FOLDER" - Consumer Folder. - // "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption - // keys. - // "KEYRING" - Keyring resource that hosts encryption keys. - ResourceType string `json:"resourceType,omitempty"` +} - // ForceSendFields is a list of field names (e.g. "ResourceId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// method id "assuredworkloads.organizations.locations.operations.list": - // NullFields is a list of field names (e.g. "ResourceId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +type OrganizationsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall { + c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c } -// GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings: Represent -// the custom settings for the resources to be created. -type GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings struct { - // DisplayName: User-assigned resource display name. If not empty it - // will be used to create a resource with the specified name. - DisplayName string `json:"displayName,omitempty"` - - // ResourceId: Resource identifier. For a project this represents - // project_id. If the project is already taken, the workload creation - // will fail. For KeyRing, this represents the keyring_id. For a folder, - // don't set this value as folder_id is assigned by Google. - ResourceId string `json:"resourceId,omitempty"` - - // ResourceType: Indicates the type of resource. This field should be - // specified to correspond the id to the right project type - // (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) - // - // Possible values: - // "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type. - // "CONSUMER_PROJECT" - Deprecated. Existing workloads will continue - // to support this, but new CreateWorkloadRequests should not specify - // this as an input value. - // "CONSUMER_FOLDER" - Consumer Folder. - // "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption - // keys. - // "KEYRING" - Keyring resource that hosts encryption keys. - ResourceType string `json:"resourceType,omitempty"` +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c } -// GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse: -// Signed Access Approvals (SAA) enrollment response. -type GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse struct { - // SetupErrors: Indicates SAA enrollment setup error if any. - // - // Possible values: - // "SETUP_ERROR_UNSPECIFIED" - Unspecified. - // "ERROR_INVALID_BASE_SETUP" - Invalid states for all customers, to - // be redirected to AA UI for additional details. - // "ERROR_MISSING_EXTERNAL_SIGNING_KEY" - Returned when there is not - // an EKM key configured. - // "ERROR_NOT_ALL_SERVICES_ENROLLED" - Returned when there are no - // enrolled services or the customer is enrolled in CAA only for a - // subset of services. - // "ERROR_SETUP_CHECK_FAILED" - Returned when exception was - // encountered during evaluation of other criteria. - SetupErrors []string `json:"setupErrors,omitempty"` - - // SetupStatus: Indicates SAA enrollment status of a given workload. - // - // Possible values: - // "SETUP_STATE_UNSPECIFIED" - Unspecified. - // "STATUS_PENDING" - SAA enrollment pending. - // "STATUS_COMPLETE" - SAA enrollment comopleted. - SetupStatus string `json:"setupStatus,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SetupErrors") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SetupErrors") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMeta -// data: Operation metadata to give request details of CreateWorkload. -type GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata struct { - // ComplianceRegime: Optional. Compliance controls that should be - // applied to the resources managed by the workload. - // - // Possible values: - // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. - // "IL4" - Information protection as per DoD IL4 requirements. - // "CJIS" - Criminal Justice Information Services (CJIS) Security - // policies. - // "FEDRAMP_HIGH" - FedRAMP High data protection controls - // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls - // "US_REGIONAL_ACCESS" - Assured Workloads For US Regions data - // protection controls - // "HIPAA" - Health Insurance Portability and Accountability Act - // controls - // "HITRUST" - Health Information Trust Alliance controls - // "EU_REGIONS_AND_SUPPORT" - Assured Workloads For EU Regions and - // Support controls - // "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and - // Support controls - // "ITAR" - International Traffic in Arms Regulations - ComplianceRegime string `json:"complianceRegime,omitempty"` - - // CreateTime: Optional. Time when the operation was created. - CreateTime string `json:"createTime,omitempty"` - - // DisplayName: Optional. The display name of the workload. - DisplayName string `json:"displayName,omitempty"` - - // Parent: Optional. The parent of the workload. - Parent string `json:"parent,omitempty"` - - // ResourceSettings: Optional. Resource properties in the input that are - // used for creating/customizing workload resources. - ResourceSettings []*GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings `json:"resourceSettings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ComplianceRegime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ComplianceRegime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAssuredworkloadsVersioningV1mainWorkload: An Workload -// object for managing highly regulated workloads of cloud customers. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkload struct { - // BillingAccount: Optional. The billing account used for the resources - // which are direct children of workload. This billing account is - // initially associated with the resources created as part of Workload - // creation. After the initial creation of these resources, the customer - // can change the assigned billing account. The resource name has the - // form `billingAccounts/{billing_account_id}`. For example, - // `billingAccounts/012345-567890-ABCDEF`. - BillingAccount string `json:"billingAccount,omitempty"` - - // CjisSettings: Required. Input only. Immutable. Settings specific to - // resources needed for CJIS. - CjisSettings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings `json:"cjisSettings,omitempty"` - - // ComplianceRegime: Required. Immutable. Compliance Regime associated - // with this workload. - // - // Possible values: - // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. - // "IL4" - Information protection as per DoD IL4 requirements. - // "CJIS" - Criminal Justice Information Services (CJIS) Security - // policies. - // "FEDRAMP_HIGH" - FedRAMP High data protection controls - // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls - // "US_REGIONAL_ACCESS" - Assured Workloads For US Regions data - // protection controls - // "HIPAA" - Health Insurance Portability and Accountability Act - // controls - // "HITRUST" - Health Information Trust Alliance controls - // "EU_REGIONS_AND_SUPPORT" - Assured Workloads For EU Regions and - // Support controls - // "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and - // Support controls - // "ITAR" - International Traffic in Arms Regulations - ComplianceRegime string `json:"complianceRegime,omitempty"` - - // ComplianceStatus: Output only. Count of active Violations in the - // Workload. - ComplianceStatus *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus `json:"complianceStatus,omitempty"` - - // CompliantButDisallowedServices: Output only. Urls for services which - // are compliant for this Assured Workload, but which are currently - // disallowed by the ResourceUsageRestriction org policy. Invoke - // RestrictAllowedResources endpoint to allow your project developers to - // use these services in their environment." - CompliantButDisallowedServices []string `json:"compliantButDisallowedServices,omitempty"` - - // CreateTime: Output only. Immutable. The Workload creation timestamp. - CreateTime string `json:"createTime,omitempty"` - - // DisplayName: Required. The user-assigned display name of the - // Workload. When present it must be between 4 to 30 characters. Allowed - // characters are: lowercase and uppercase letters, numbers, hyphen, and - // spaces. Example: My Workload - DisplayName string `json:"displayName,omitempty"` - - // EnableSovereignControls: Optional. Indicates the sovereignty status - // of the given workload. Currently meant to be used by Europe/Canada - // customers. - EnableSovereignControls bool `json:"enableSovereignControls,omitempty"` - - // Etag: Optional. ETag of the workload, it is calculated on the basis - // of the Workload contents. It will be used in Update & Delete - // operations. - Etag string `json:"etag,omitempty"` - - // FedrampHighSettings: Required. Input only. Immutable. Settings - // specific to resources needed for FedRAMP High. - FedrampHighSettings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings `json:"fedrampHighSettings,omitempty"` - - // FedrampModerateSettings: Required. Input only. Immutable. Settings - // specific to resources needed for FedRAMP Moderate. - FedrampModerateSettings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings `json:"fedrampModerateSettings,omitempty"` - - // Il4Settings: Required. Input only. Immutable. Settings specific to - // resources needed for IL4. - Il4Settings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings `json:"il4Settings,omitempty"` - - // KajEnrollmentState: Output only. Represents the KAJ enrollment state - // of the given workload. - // - // Possible values: - // "KAJ_ENROLLMENT_STATE_UNSPECIFIED" - Default State for KAJ - // Enrollment. - // "KAJ_ENROLLMENT_STATE_PENDING" - Pending State for KAJ Enrollment. - // "KAJ_ENROLLMENT_STATE_COMPLETE" - Complete State for KAJ - // Enrollment. - KajEnrollmentState string `json:"kajEnrollmentState,omitempty"` - - // KmsSettings: Input only. Settings used to create a CMEK crypto key. - // When set, a project with a KMS CMEK key is provisioned. This field is - // deprecated as of Feb 28, 2022. In order to create a Keyring, callers - // should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in - // ResourceSettings.resource_type field. - KmsSettings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings `json:"kmsSettings,omitempty"` - - // Labels: Optional. Labels applied to the workload. - Labels map[string]string `json:"labels,omitempty"` - - // Name: Optional. The resource name of the workload. Format: - // organizations/{organization}/locations/{location}/workloads/{workload} - // Read-only. - Name string `json:"name,omitempty"` - - // ProvisionedResourcesParent: Input only. The parent resource for the - // resources managed by this Assured Workload. May be either empty or a - // folder resource which is a child of the Workload parent. If not - // specified all resources are created under the parent organization. - // Format: folders/{folder_id} - ProvisionedResourcesParent string `json:"provisionedResourcesParent,omitempty"` - - // ResourceSettings: Input only. Resource properties that are used to - // customize workload resources. These properties (such as custom - // project id) will be used to create workload resources if possible. - // This field is optional. - ResourceSettings []*GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings `json:"resourceSettings,omitempty"` - - // Resources: Output only. The resources associated with this workload. - // These resources will be created when creating the workload. If any of - // the projects already exist, the workload creation will fail. Always - // read only. - Resources []*GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo `json:"resources,omitempty"` - - // SaaEnrollmentResponse: Output only. Represents the SAA enrollment - // response of the given workload. SAA enrollment response is queried - // during GetWorkload call. In failure cases, user friendly error - // message is shown in SAA details page. - SaaEnrollmentResponse *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse `json:"saaEnrollmentResponse,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BillingAccount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BillingAccount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkload) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkload - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings: -// Settings specific to resources needed for CJIS. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings struct { - // KmsSettings: Input only. Immutable. Settings used to create a CMEK - // crypto key. - KmsSettings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings `json:"kmsSettings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsSettings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KmsSettings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus: -// Represents the Compliance Status of this workload -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus struct { - // AcknowledgedViolationCount: Count of active Violations which are - // acknowledged in the Workload. - AcknowledgedViolationCount int64 `json:"acknowledgedViolationCount,omitempty"` - - // ActiveViolationCount: Count of active Violations which haven't been - // acknowledged. - ActiveViolationCount int64 `json:"activeViolationCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AcknowledgedViolationCount") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "AcknowledgedViolationCount") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings -// : Settings specific to resources needed for FedRAMP High. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings struct { - // KmsSettings: Input only. Immutable. Settings used to create a CMEK - // crypto key. - KmsSettings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings `json:"kmsSettings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsSettings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KmsSettings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSett -// ings: Settings specific to resources needed for FedRAMP Moderate. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings struct { - // KmsSettings: Input only. Immutable. Settings used to create a CMEK - // crypto key. - KmsSettings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings `json:"kmsSettings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsSettings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KmsSettings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings: -// Settings specific to resources needed for IL4. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings struct { - // KmsSettings: Input only. Immutable. Settings used to create a CMEK - // crypto key. - KmsSettings *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings `json:"kmsSettings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsSettings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KmsSettings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings: -// Settings specific to the Key Management Service. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings struct { - // NextRotationTime: Required. Input only. Immutable. The time at which - // the Key Management Service will automatically create a new version of - // the crypto key and mark it as the primary. - NextRotationTime string `json:"nextRotationTime,omitempty"` - - // RotationPeriod: Required. Input only. Immutable. [next_rotation_time] - // will be advanced by this period when the Key Management Service - // automatically rotates a key. Must be at least 24 hours and at most - // 876,000 hours. - RotationPeriod string `json:"rotationPeriod,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NextRotationTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextRotationTime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c } -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall { + c.ctx_ = ctx + return c } -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo: -// Represent the resources that are children of this Workload. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo struct { - // ResourceId: Resource identifier. For a project this represents - // project_number. - ResourceId int64 `json:"resourceId,omitempty,string"` - - // ResourceType: Indicates the type of resource. - // - // Possible values: - // "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type. - // "CONSUMER_PROJECT" - Deprecated. Existing workloads will continue - // to support this, but new CreateWorkloadRequests should not specify - // this as an input value. - // "CONSUMER_FOLDER" - Consumer Folder. - // "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption - // keys. - // "KEYRING" - Keyring resource that hosts encryption keys. - ResourceType string `json:"resourceType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ResourceId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ResourceId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings: -// Represent the custom settings for the resources to be created. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings struct { - // DisplayName: User-assigned resource display name. If not empty it - // will be used to create a resource with the specified name. - DisplayName string `json:"displayName,omitempty"` - - // ResourceId: Resource identifier. For a project this represents - // project_id. If the project is already taken, the workload creation - // will fail. For KeyRing, this represents the keyring_id. For a folder, - // don't set this value as folder_id is assigned by Google. - ResourceId string `json:"resourceId,omitempty"` - - // ResourceType: Indicates the type of resource. This field should be - // specified to correspond the id to the right project type - // (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) - // - // Possible values: - // "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type. - // "CONSUMER_PROJECT" - Deprecated. Existing workloads will continue - // to support this, but new CreateWorkloadRequests should not specify - // this as an input value. - // "CONSUMER_FOLDER" - Consumer Folder. - // "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption - // keys. - // "KEYRING" - Keyring resource that hosts encryption keys. - ResourceType string `json:"resourceType,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// Do executes the "assuredworkloads.organizations.locations.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsListCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.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": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` } -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentRespon -// se: Signed Access Approvals (SAA) enrollment response. -type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse struct { - // SetupErrors: Indicates SAA enrollment setup error if any. - // - // Possible values: - // "SETUP_ERROR_UNSPECIFIED" - Unspecified. - // "ERROR_INVALID_BASE_SETUP" - Invalid states for all customers, to - // be redirected to AA UI for additional details. - // "ERROR_MISSING_EXTERNAL_SIGNING_KEY" - Returned when there is not - // an EKM key configured. - // "ERROR_NOT_ALL_SERVICES_ENROLLED" - Returned when there are no - // enrolled services or the customer is enrolled in CAA only for a - // subset of services. - // "ERROR_SETUP_CHECK_FAILED" - Returned when exception was - // encountered during evaluation of other criteria. - SetupErrors []string `json:"setupErrors,omitempty"` - - // SetupStatus: Indicates SAA enrollment status of a given workload. - // - // Possible values: - // "SETUP_STATE_UNSPECIFIED" - Unspecified. - // "STATUS_PENDING" - SAA enrollment pending. - // "STATUS_COMPLETE" - SAA enrollment comopleted. - SetupStatus string `json:"setupStatus,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SetupErrors") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SetupErrors") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} +// method id "assuredworkloads.organizations.locations.workloads.create": -func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +type OrganizationsLocationsWorkloadsCreateCall struct { + s *Service + parent string + googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// Create: Creates Assured Workload. +// +// - parent: The resource name of the new Workload's parent. Must be of +// the form `organizations/{org_id}/locations/{location_id}`. +func (r *OrganizationsLocationsWorkloadsService) Create(parent string, googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload) *OrganizationsLocationsWorkloadsCreateCall { + c := &OrganizationsLocationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudassuredworkloadsv1workload = googlecloudassuredworkloadsv1workload + return c } -func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// ExternalId sets the optional parameter "externalId": A identifier +// associated with the workload and underlying projects which allows for +// the break down of billing costs for a workload. The value provided +// for the identifier will add a label to the workload and contained +// projects with the identifier as the value. +func (c *OrganizationsLocationsWorkloadsCreateCall) ExternalId(externalId string) *OrganizationsLocationsWorkloadsCreateCall { + c.urlParams_.Set("externalId", externalId) + return c } -// 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 response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsWorkloadsCreateCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsCreateCall { + c.ctx_ = ctx + return c } -// 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:"-"` +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsWorkloadsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } - -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different programming environments, including REST -// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` + +func (c *OrganizationsLocationsWorkloadsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1workload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloads") + 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) } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Do executes the "assuredworkloads.organizations.locations.workloads.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsWorkloadsCreateCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates Assured Workload.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads", + // "httpMethod": "POST", + // "id": "assuredworkloads.organizations.locations.workloads.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "externalId": { + // "description": "Optional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the identifier will add a label to the workload and contained projects with the identifier as the value.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workloads", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1Workload" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "assuredworkloads.organizations.locations.operations.get": +// method id "assuredworkloads.organizations.locations.workloads.delete": -type OrganizationsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsDeleteCall 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 the workload. Make sure that workload's direct +// children are already in a deleted state, otherwise the request will +// fail with a FAILED_PRECONDITION error. // -// - name: The name of the operation resource. -func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { - c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The `name` field is used to identify the workload. Format: +// organizations/{org_id}/locations/{location_id}/workloads/{workload_i +// d}. +func (r *OrganizationsLocationsWorkloadsService) Delete(name string) *OrganizationsLocationsWorkloadsDeleteCall { + c := &OrganizationsLocationsWorkloadsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Etag sets the optional parameter "etag": The etag of the workload. If +// this is provided, it must match the server's etag. +func (c *OrganizationsLocationsWorkloadsDeleteCall) Etag(etag string) *OrganizationsLocationsWorkloadsDeleteCall { + 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 information. -func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { +func (c *OrganizationsLocationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { +func (c *OrganizationsLocationsWorkloadsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -1953,14 +1759,14 @@ func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "assuredworkloads.organizations.locations.workloads.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1979,7 +1785,7 @@ func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1991,25 +1797,30 @@ func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "assuredworkloads.organizations.locations.operations.get", + // "description": "Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", + // "httpMethod": "DELETE", + // "id": "assuredworkloads.organizations.locations.workloads.delete", // "parameterOrder": [ // "name" // ], // "parameters": { + // "etag": { + // "description": "Optional. The etag of the workload. If this is provided, it must match the server's etag.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2018,9 +1829,9 @@ func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOptio } -// method id "assuredworkloads.organizations.locations.operations.list": +// method id "assuredworkloads.organizations.locations.workloads.get": -type OrganizationsLocationsOperationsListCall struct { +type OrganizationsLocationsWorkloadsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2029,49 +1840,23 @@ type OrganizationsLocationsOperationsListCall 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`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. +// Get: Gets Assured Workload associated with a CRM Node // -// - name: The name of the operation's parent resource. -func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall { - c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Workload to fetch. This is the +// workloads's relative path in the API, formatted as +// "organizations/{organization_id}/locations/{location_id}/workloads/{ +// workload_id}". For example, +// "organizations/123/locations/us-east1/workloads/assured-workload-1". +func (r *OrganizationsLocationsWorkloadsService) Get(name string) *OrganizationsLocationsWorkloadsGetCall { + c := &OrganizationsLocationsWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall { +func (c *OrganizationsLocationsWorkloadsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2081,7 +1866,7 @@ func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall { +func (c *OrganizationsLocationsWorkloadsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2089,21 +1874,21 @@ func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall { +func (c *OrganizationsLocationsWorkloadsGetCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOperationsListCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2116,7 +1901,7 @@ func (c *OrganizationsLocationsOperationsListCall) 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}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2129,15 +1914,15 @@ func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "assuredworkloads.organizations.locations.workloads.get" call. +// Exactly one of *GoogleCloudAssuredworkloadsV1Workload or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// *GoogleCloudAssuredworkloadsV1Workload.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Workload, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2156,7 +1941,7 @@ func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAssuredworkloadsV1Workload{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2168,41 +1953,25 @@ func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations", + // "description": "Gets Assured Workload associated with a CRM Node", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", // "httpMethod": "GET", - // "id": "assuredworkloads.organizations.locations.operations.list", + // "id": "assuredworkloads.organizations.locations.workloads.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "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", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudAssuredworkloadsV1Workload" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2211,102 +1980,101 @@ func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOpti } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "assuredworkloads.organizations.locations.workloads.create": +// method id "assuredworkloads.organizations.locations.workloads.list": -type OrganizationsLocationsWorkloadsCreateCall struct { - s *Service - parent string - googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates Assured Workload. +// List: Lists Assured Workloads under a CRM Node. // -// - parent: The resource name of the new Workload's parent. Must be of -// the form `organizations/{org_id}/locations/{location_id}`. -func (r *OrganizationsLocationsWorkloadsService) Create(parent string, googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload) *OrganizationsLocationsWorkloadsCreateCall { - c := &OrganizationsLocationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent Resource to list workloads from. Must be of the form +// `organizations/{org_id}/locations/{location}`. +func (r *OrganizationsLocationsWorkloadsService) List(parent string) *OrganizationsLocationsWorkloadsListCall { + c := &OrganizationsLocationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudassuredworkloadsv1workload = googlecloudassuredworkloadsv1workload return c } -// ExternalId sets the optional parameter "externalId": A identifier -// associated with the workload and underlying projects which allows for -// the break down of billing costs for a workload. The value provided -// for the identifier will add a label to the workload and contained -// projects with the identifier as the value. -func (c *OrganizationsLocationsWorkloadsCreateCall) ExternalId(externalId string) *OrganizationsLocationsWorkloadsCreateCall { - c.urlParams_.Set("externalId", externalId) +// Filter sets the optional parameter "filter": A custom filter for +// filtering by properties of a workload. At this time, only filtering +// by labels is supported. +func (c *OrganizationsLocationsWorkloadsListCall) Filter(filter string) *OrganizationsLocationsWorkloadsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Page size. +func (c *OrganizationsLocationsWorkloadsListCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// returned from previous request. Page token contains context from +// previous request. Page token needs to be passed in the second and +// following requests. +func (c *OrganizationsLocationsWorkloadsListCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsCreateCall { +func (c *OrganizationsLocationsWorkloadsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsWorkloadsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsCreateCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsCreateCall { +func (c *OrganizationsLocationsWorkloadsListCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsCreateCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1workload) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloads") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -2317,14 +2085,16 @@ func (c *OrganizationsLocationsWorkloadsCreateCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "assuredworkloads.organizations.locations.workloads.list" call. +// Exactly one of *GoogleCloudAssuredworkloadsV1ListWorkloadsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1ListWorkloadsResponse.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 *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1ListWorkloadsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2343,7 +2113,7 @@ func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAssuredworkloadsV1ListWorkloadsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2355,21 +2125,32 @@ func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Creates Assured Workload.", + // "description": "Lists Assured Workloads under a CRM Node.", // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads", - // "httpMethod": "POST", - // "id": "assuredworkloads.organizations.locations.workloads.create", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.workloads.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "externalId": { - // "description": "Optional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the identifier will add a label to the workload and contained projects with the identifier as the value.", + // "filter": { + // "description": "A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`.", + // "description": "Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, @@ -2377,11 +2158,8 @@ func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOpt // } // }, // "path": "v1/{+parent}/workloads", - // "request": { - // "$ref": "GoogleCloudAssuredworkloadsV1Workload" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudAssuredworkloadsV1ListWorkloadsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2390,40 +2168,64 @@ func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOpt } -// method id "assuredworkloads.organizations.locations.workloads.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsWorkloadsListCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1ListWorkloadsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsLocationsWorkloadsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "assuredworkloads.organizations.locations.workloads.patch": + +type OrganizationsLocationsWorkloadsPatchCall struct { + s *Service + name string + googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the workload. Make sure that workload's direct -// children are already in a deleted state, otherwise the request will -// fail with a FAILED_PRECONDITION error. +// Patch: Updates an existing workload. Currently allows updating of +// workload display_name and labels. For force updates don't set etag +// field in the Workload. Only one update operation per workload can be +// in progress. // -// - name: The `name` field is used to identify the workload. Format: -// organizations/{org_id}/locations/{location_id}/workloads/{workload_i -// d}. -func (r *OrganizationsLocationsWorkloadsService) Delete(name string) *OrganizationsLocationsWorkloadsDeleteCall { - c := &OrganizationsLocationsWorkloadsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Optional. The resource name of the workload. Format: +// organizations/{organization}/locations/{location}/workloads/{workloa +// d} Read-only. +func (r *OrganizationsLocationsWorkloadsService) Patch(name string, googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload) *OrganizationsLocationsWorkloadsPatchCall { + c := &OrganizationsLocationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudassuredworkloadsv1workload = googlecloudassuredworkloadsv1workload return c } -// Etag sets the optional parameter "etag": The etag of the workload. If -// this is provided, it must match the server's etag. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Etag(etag string) *OrganizationsLocationsWorkloadsDeleteCall { - c.urlParams_.Set("etag", etag) +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. +func (c *OrganizationsLocationsWorkloadsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsWorkloadsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsDeleteCall { +func (c *OrganizationsLocationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2431,21 +2233,21 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsDeleteCall { +func (c *OrganizationsLocationsWorkloadsPatchCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2453,11 +2255,16 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1workload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -2468,14 +2275,15 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "assuredworkloads.organizations.locations.workloads.patch" call. +// Exactly one of *GoogleCloudAssuredworkloadsV1Workload or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudAssuredworkloadsV1Workload.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Workload, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2494,7 +2302,7 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAssuredworkloadsV1Workload{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2506,30 +2314,34 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error.", + // "description": "Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress.", // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", - // "httpMethod": "DELETE", - // "id": "assuredworkloads.organizations.locations.workloads.delete", + // "httpMethod": "PATCH", + // "id": "assuredworkloads.organizations.locations.workloads.patch", // "parameterOrder": [ // "name" // ], // "parameters": { - // "etag": { - // "description": "Optional. The etag of the workload. If this is provided, it must match the server's etag.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}", + // "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1Workload" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudAssuredworkloadsV1Workload" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2538,81 +2350,80 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOpt } -// method id "assuredworkloads.organizations.locations.workloads.get": +// method id "assuredworkloads.organizations.locations.workloads.restrictAllowedResources": -type OrganizationsLocationsWorkloadsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall struct { + s *Service + name string + googlecloudassuredworkloadsv1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets Assured Workload associated with a CRM Node +// RestrictAllowedResources: Restrict the list of resources allowed in +// the Workload environment. The current list of allowed products can be +// found at +// https://cloud.google.com/assured-workloads/docs/supported-products In +// addition to assuredworkloads.workload.update permission, the user +// should also have orgpolicy.policy.set permission on the folder +// resource to use this functionality. // -// - name: The resource name of the Workload to fetch. This is the -// workloads's relative path in the API, formatted as +// - name: The resource name of the Workload. This is the workloads's +// relative path in the API, formatted as // "organizations/{organization_id}/locations/{location_id}/workloads/{ // workload_id}". For example, // "organizations/123/locations/us-east1/workloads/assured-workload-1". -func (r *OrganizationsLocationsWorkloadsService) Get(name string) *OrganizationsLocationsWorkloadsGetCall { - c := &OrganizationsLocationsWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsWorkloadsService) RestrictAllowedResources(name string, googlecloudassuredworkloadsv1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { + c := &OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudassuredworkloadsv1restrictallowedresourcesrequest = googlecloudassuredworkloadsv1restrictallowedresourcesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsGetCall { +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsWorkloadsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsGetCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsGetCall { +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsGetCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1restrictallowedresourcesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restrictAllowedResources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -2623,15 +2434,17 @@ func (c *OrganizationsLocationsWorkloadsGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.get" call. -// Exactly one of *GoogleCloudAssuredworkloadsV1Workload or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudAssuredworkloadsV1Workload.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Workload, error) { +// Do executes the "assuredworkloads.organizations.locations.workloads.restrictAllowedResources" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse.ServerR +// esponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2650,7 +2463,7 @@ func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudAssuredworkloadsV1Workload{ + ret := &GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2662,25 +2475,28 @@ func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets Assured Workload associated with a CRM Node", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", - // "httpMethod": "GET", - // "id": "assuredworkloads.organizations.locations.workloads.get", + // "description": "Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:restrictAllowedResources", + // "httpMethod": "POST", + // "id": "assuredworkloads.organizations.locations.workloads.restrictAllowedResources", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", + // "description": "Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:restrictAllowedResources", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest" + // }, // "response": { - // "$ref": "GoogleCloudAssuredworkloadsV1Workload" + // "$ref": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2689,121 +2505,97 @@ func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption } -// method id "assuredworkloads.organizations.locations.workloads.list": +// method id "assuredworkloads.organizations.locations.workloads.violations.acknowledge": -type OrganizationsLocationsWorkloadsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsViolationsAcknowledgeCall struct { + s *Service + name string + googlecloudassuredworkloadsv1acknowledgeviolationrequest *GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Assured Workloads under a CRM Node. +// Acknowledge: Acknowledges an existing violation. By acknowledging a +// violation, users acknowledge the existence of a compliance violation +// in their workload and decide to ignore it due to a valid business +// justification. Acknowledgement is a permanent operation and it cannot +// be reverted. // -// - parent: Parent Resource to list workloads from. Must be of the form -// `organizations/{org_id}/locations/{location}`. -func (r *OrganizationsLocationsWorkloadsService) List(parent string) *OrganizationsLocationsWorkloadsListCall { - c := &OrganizationsLocationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A custom filter for -// filtering by properties of a workload. At this time, only filtering -// by labels is supported. -func (c *OrganizationsLocationsWorkloadsListCall) Filter(filter string) *OrganizationsLocationsWorkloadsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Page size. -func (c *OrganizationsLocationsWorkloadsListCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token -// returned from previous request. Page token contains context from -// previous request. Page token needs to be passed in the second and -// following requests. -func (c *OrganizationsLocationsWorkloadsListCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Violation to acknowledge. Format: +// organizations/{organization}/locations/{location}/workloads/{workloa +// d}/violations/{violation}. +func (r *OrganizationsLocationsWorkloadsViolationsService) Acknowledge(name string, googlecloudassuredworkloadsv1acknowledgeviolationrequest *GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall { + c := &OrganizationsLocationsWorkloadsViolationsAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudassuredworkloadsv1acknowledgeviolationrequest = googlecloudassuredworkloadsv1acknowledgeviolationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsListCall { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsWorkloadsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsListCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsListCall { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsListCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1acknowledgeviolationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloads") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:acknowledge") 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 "assuredworkloads.organizations.locations.workloads.list" call. -// Exactly one of *GoogleCloudAssuredworkloadsV1ListWorkloadsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "assuredworkloads.organizations.locations.workloads.violations.acknowledge" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudAssuredworkloadsV1ListWorkloadsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// *GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse.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 *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1ListWorkloadsResponse, error) { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2822,7 +2614,7 @@ func (c *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudAssuredworkloadsV1ListWorkloadsResponse{ + ret := &GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2830,45 +2622,32 @@ func (c *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOptio } target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists Assured Workloads under a CRM Node.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads", - // "httpMethod": "GET", - // "id": "assuredworkloads.organizations.locations.workloads.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`.", + return nil, err + } + return ret, nil + // { + // "description": "Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid business justification. Acknowledgement is a permanent operation and it cannot be reverted.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}:acknowledge", + // "httpMethod": "POST", + // "id": "assuredworkloads.organizations.locations.workloads.violations.acknowledge", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Violation to acknowledge. Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/workloads", + // "path": "v1/{+name}:acknowledge", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest" + // }, // "response": { - // "$ref": "GoogleCloudAssuredworkloadsV1ListWorkloadsResponse" + // "$ref": "GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2877,103 +2656,80 @@ func (c *OrganizationsLocationsWorkloadsListCall) 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 *OrganizationsLocationsWorkloadsListCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1ListWorkloadsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "assuredworkloads.organizations.locations.workloads.patch": +// method id "assuredworkloads.organizations.locations.workloads.violations.get": -type OrganizationsLocationsWorkloadsPatchCall struct { - s *Service - name string - googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsViolationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing workload. Currently allows updating of -// workload display_name and labels. For force updates don't set etag -// field in the Workload. Only one update operation per workload can be -// in progress. +// Get: Retrieves Assured Workload Violation based on ID. // -// - name: Optional. The resource name of the workload. Format: +// - name: The resource name of the Violation to fetch (ie. +// Violation.name). Format: // organizations/{organization}/locations/{location}/workloads/{workloa -// d} Read-only. -func (r *OrganizationsLocationsWorkloadsService) Patch(name string, googlecloudassuredworkloadsv1workload *GoogleCloudAssuredworkloadsV1Workload) *OrganizationsLocationsWorkloadsPatchCall { - c := &OrganizationsLocationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// d}/violations/{violation}. +func (r *OrganizationsLocationsWorkloadsViolationsService) Get(name string) *OrganizationsLocationsWorkloadsViolationsGetCall { + c := &OrganizationsLocationsWorkloadsViolationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudassuredworkloadsv1workload = googlecloudassuredworkloadsv1workload - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. -func (c *OrganizationsLocationsWorkloadsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsWorkloadsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsPatchCall { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsViolationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsPatchCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsPatchCall { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsPatchCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1workload) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -2984,15 +2740,15 @@ func (c *OrganizationsLocationsWorkloadsPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.patch" call. -// Exactly one of *GoogleCloudAssuredworkloadsV1Workload or error will +// Do executes the "assuredworkloads.organizations.locations.workloads.violations.get" call. +// Exactly one of *GoogleCloudAssuredworkloadsV1Violation or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudAssuredworkloadsV1Workload.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// *GoogleCloudAssuredworkloadsV1Violation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Workload, error) { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1Violation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3011,7 +2767,7 @@ func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudAssuredworkloadsV1Workload{ + ret := &GoogleCloudAssuredworkloadsV1Violation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3023,34 +2779,25 @@ func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", - // "httpMethod": "PATCH", - // "id": "assuredworkloads.organizations.locations.workloads.patch", + // "description": "Retrieves Assured Workload Violation based on ID.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.workloads.violations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", + // "description": "Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The list of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudAssuredworkloadsV1Workload" - // }, // "response": { - // "$ref": "GoogleCloudAssuredworkloadsV1Workload" + // "$ref": "GoogleCloudAssuredworkloadsV1Violation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3059,101 +2806,137 @@ func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOpti } -// method id "assuredworkloads.organizations.locations.workloads.restrictAllowedResources": +// method id "assuredworkloads.organizations.locations.workloads.violations.list": -type OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall struct { - s *Service - name string - googlecloudassuredworkloadsv1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsViolationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RestrictAllowedResources: Restrict the list of resources allowed in -// the Workload environment. The current list of allowed products can be -// found at -// https://cloud.google.com/assured-workloads/docs/supported-products In -// addition to assuredworkloads.workload.update permission, the user -// should also have orgpolicy.policy.set permission on the folder -// resource to use this functionality. +// List: Lists the Violations in the AssuredWorkload Environment. +// Callers may also choose to read across multiple Workloads as per +// AIP-159 (https://google.aip.dev/159) by using '-' (the hyphen or dash +// character) as a wildcard character instead of workload-id in the +// parent. Format +// `organizations/{org_id}/locations/{location}/workloads/-` // -// - name: The resource name of the Workload. This is the workloads's -// relative path in the API, formatted as -// "organizations/{organization_id}/locations/{location_id}/workloads/{ -// workload_id}". For example, -// "organizations/123/locations/us-east1/workloads/assured-workload-1". -func (r *OrganizationsLocationsWorkloadsService) RestrictAllowedResources(name string, googlecloudassuredworkloadsv1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { - c := &OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudassuredworkloadsv1restrictallowedresourcesrequest = googlecloudassuredworkloadsv1restrictallowedresourcesrequest +// - parent: The Workload name. Format +// `organizations/{org_id}/locations/{location}/workloads/{workload}`. +func (r *OrganizationsLocationsWorkloadsViolationsService) List(parent string) *OrganizationsLocationsWorkloadsViolationsListCall { + c := &OrganizationsLocationsWorkloadsViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A custom filter for +// filtering by the Violations properties. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Filter(filter string) *OrganizationsLocationsWorkloadsViolationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IntervalEndTime sets the optional parameter "interval.endTime": The +// end of the time window. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) IntervalEndTime(intervalEndTime string) *OrganizationsLocationsWorkloadsViolationsListCall { + c.urlParams_.Set("interval.endTime", intervalEndTime) + return c +} + +// IntervalStartTime sets the optional parameter "interval.startTime": +// The start of the time window. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) IntervalStartTime(intervalStartTime string) *OrganizationsLocationsWorkloadsViolationsListCall { + c.urlParams_.Set("interval.startTime", intervalStartTime) + return c +} + +// PageSize sets the optional parameter "pageSize": Page size. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsViolationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// returned from previous request. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsViolationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsViolationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1restrictallowedresourcesrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restrictAllowedResources") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/violations") 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 "assuredworkloads.organizations.locations.workloads.restrictAllowedResources" call. -// Exactly one of -// *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse.ServerR -// esponse.Header or (if a response was returned at all) in +// Do executes the "assuredworkloads.organizations.locations.workloads.violations.list" call. +// Exactly one of *GoogleCloudAssuredworkloadsV1ListViolationsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudAssuredworkloadsV1ListViolationsResponse.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 *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse, error) { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1ListViolationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3172,7 +2955,7 @@ func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse{ + ret := &GoogleCloudAssuredworkloadsV1ListViolationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3184,28 +2967,53 @@ func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Do(opts .. } return ret, nil // { - // "description": "Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:restrictAllowedResources", - // "httpMethod": "POST", - // "id": "assuredworkloads.organizations.locations.workloads.restrictAllowedResources", + // "description": "Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.workloads.violations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", + // "filter": { + // "description": "Optional. A custom filter for filtering by the Violations properties.", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime": { + // "description": "The end of the time window.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "interval.startTime": { + // "description": "The start of the time window.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token returned from previous request.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The Workload name. Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:restrictAllowedResources", - // "request": { - // "$ref": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest" - // }, + // "path": "v1/{+parent}/violations", // "response": { - // "$ref": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse" + // "$ref": "GoogleCloudAssuredworkloadsV1ListViolationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3213,3 +3021,24 @@ func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) 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 *OrganizationsLocationsWorkloadsViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1ListViolationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index fa088966d51..427061840dc 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." } } } @@ -215,7 +215,7 @@ ] }, "delete": { - "description": "Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error.", + "description": "Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies.", "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", "httpMethod": "DELETE", "id": "assuredworkloads.organizations.locations.workloads.delete", @@ -343,6 +343,250 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "restrictAllowedResources": { + "description": "Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:restrictAllowedResources", + "httpMethod": "POST", + "id": "assuredworkloads.organizations.locations.workloads.restrictAllowedResources", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:restrictAllowedResources", + "request": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest" + }, + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "organizations": { + "resources": { + "locations": { + "resources": { + "workloads": { + "methods": { + "analyzeWorkloadMove": { + "description": "Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/organizations/{organizationsId1}/locations/{locationsId1}/workloads/{workloadsId1}:analyzeWorkloadMove", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.organizations.locations.workloads.analyzeWorkloadMove", + "parameterOrder": [ + "source", + "target" + ], + "parameters": { + "project": { + "description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.", + "location": "query", + "type": "string" + }, + "source": { + "description": "The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-1\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + }, + "target": { + "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+source}/{+target}:analyzeWorkloadMove", + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, + "violations": { + "methods": { + "acknowledge": { + "description": "Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid business justification. Acknowledgement is a permanent operation and it cannot be reverted.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}:acknowledge", + "httpMethod": "POST", + "id": "assuredworkloads.organizations.locations.workloads.violations.acknowledge", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Violation to acknowledge. Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:acknowledge", + "request": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest" + }, + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves Assured Workload Violation based on ID.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.violations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1Violation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.violations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A custom filter for filtering by the Violations properties.", + "location": "query", + "type": "string" + }, + "interval.endTime": { + "description": "The end of the time window.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "interval.startTime": { + "description": "The start of the time window.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token returned from previous request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Workload name. Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/violations", + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, + "projects": { + "resources": { + "organizations": { + "resources": { + "locations": { + "resources": { + "workloads": { + "methods": { + "analyzeWorkloadMove": { + "description": "Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload.", + "flatPath": "v1beta1/projects/{projectsId}/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove", + "httpMethod": "GET", + "id": "assuredworkloads.projects.organizations.locations.workloads.analyzeWorkloadMove", + "parameterOrder": [ + "project", + "target" + ], + "parameters": { + "project": { + "description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "source": { + "description": "The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-1\"", + "location": "query", + "type": "string" + }, + "target": { + "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+project}/{+target}:analyzeWorkloadMove", + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -351,210 +595,297 @@ } } }, - "revision": "20201112", + "revision": "20220915", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { - "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { - "description": "Operation metadata to give request details of CreateWorkload.", - "id": "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata", + "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { + "description": "Request for acknowledging the violation Next Id: 4", + "id": "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest", "properties": { - "complianceRegime": { - "description": "Optional. Compliance controls that should be applied to the resources managed by the workload.", - "enum": [ - "COMPLIANCE_REGIME_UNSPECIFIED", - "IL4", - "CJIS", - "FEDRAMP_HIGH", - "FEDRAMP_MODERATE" - ], - "enumDescriptions": [ - "Unknown compliance regime.", - "Information protection as per DoD IL4 requirements.", - "Criminal Justice Information Services (CJIS) Security policies.", - "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls" - ], + "comment": { + "description": "Required. Business justification explaining the need for violation acknowledgement", "type": "string" }, - "createTime": { - "description": "Optional. Time when the operation was created.", - "format": "google-datetime", + "nonCompliantOrgPolicy": { + "description": "Optional. Name of the OrgPolicy which was modified with non-compliant change and resulted in this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}", "type": "string" - }, - "displayName": { - "description": "Optional. The display name of the workload.", + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse": { + "description": "Response for violation acknowledgement", + "id": "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse": { + "description": "A response that includes the analysis of the hypothetical resource move.", + "id": "GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse", + "properties": { + "blockers": { + "description": "A list of blockers that should be addressed before moving the source project or project-based workload to the destination folder-based workload.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse": { + "description": "Response of ListViolations endpoint.", + "id": "GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse", + "properties": { + "nextPageToken": { + "description": "The next page token. Returns empty if reached the last page.", "type": "string" }, - "parent": { - "description": "Optional. The parent of the workload.", - "type": "string" + "violations": { + "description": "List of Violations under a Workload.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1Violation" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudAssuredworkloadsV1Workload": { - "description": "An Workload object for managing highly regulated workloads of cloud customers.", - "id": "GoogleCloudAssuredworkloadsV1Workload", + "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse": { + "description": "Response of ListWorkloads endpoint.", + "id": "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse", "properties": { - "billingAccount": { - "description": "Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "nextPageToken": { + "description": "The next page token. Return empty if reached the last page.", "type": "string" }, - "complianceRegime": { - "description": "Required. Immutable. Compliance Regime associated with this workload.", + "workloads": { + "description": "List of Workloads under a given parent.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest": { + "description": "Request for restricting list of available resources in Workload environment.", + "id": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest", + "properties": { + "restrictionType": { + "description": "Required. The type of restriction for using gcp products in the Workload environment.", "enum": [ - "COMPLIANCE_REGIME_UNSPECIFIED", - "IL4", - "CJIS", - "FEDRAMP_HIGH", - "FEDRAMP_MODERATE" + "RESTRICTION_TYPE_UNSPECIFIED", + "ALLOW_ALL_GCP_RESOURCES", + "ALLOW_COMPLIANT_RESOURCES" ], "enumDescriptions": [ - "Unknown compliance regime.", - "Information protection as per DoD IL4 requirements.", - "Criminal Justice Information Services (CJIS) Security policies.", - "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls" + "Unknown restriction type.", + "Allow the use all of all gcp products, irrespective of the compliance posture. This effectively removes gcp.restrictServiceUsage OrgPolicy on the AssuredWorkloads Folder.", + "Based on Workload's compliance regime, allowed list changes. See - https://cloud.google.com/assured-workloads/docs/supported-products for the list of supported resources." ], "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse": { + "description": "Response for restricting the list of allowed resources.", + "id": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1Violation": { + "description": "Workload monitoring Violation.", + "id": "GoogleCloudAssuredworkloadsV1beta1Violation", + "properties": { + "acknowledged": { + "description": "A boolean that indicates if the violation is acknowledged", + "type": "boolean" }, - "createTime": { - "description": "Output only. Immutable. The Workload creation timestamp.", + "acknowledgementTime": { + "description": "Optional. Timestamp when this violation was acknowledged last. This will be absent when acknowledged field is marked as false.", "format": "google-datetime", - "readOnly": true, "type": "string" }, - "displayName": { - "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", + "auditLogLink": { + "description": "Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}", + "readOnly": true, "type": "string" }, - "etag": { - "description": "Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update \u0026 Delete operations.", + "beginTime": { + "description": "Output only. Time of the event which triggered the Violation.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings", - "description": "Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes." + "category": { + "description": "Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc.", + "readOnly": true, + "type": "string" }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Labels applied to the workload.", - "type": "object" + "description": { + "description": "Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value.", + "readOnly": true, + "type": "string" }, "name": { - "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", + "description": "Output only. Immutable. Name of the Violation. Format: organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}", + "readOnly": true, "type": "string" }, - "provisionedResourcesParent": { - "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id} organizations/{organization_id}", + "nonCompliantOrgPolicy": { + "description": "Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}", + "readOnly": true, "type": "string" }, - "resources": { - "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", - "items": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadResourceInfo" - }, + "orgPolicyConstraint": { + "description": "Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation.", "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings": { - "description": "Settings specific to the Key Management Service.", - "id": "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings", - "properties": { - "nextRotationTime": { - "description": "Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary.", + "type": "string" + }, + "remediation": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1ViolationRemediation", + "description": "Output only. Compliance violation remediation", + "readOnly": true + }, + "resolveTime": { + "description": "Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "rotationPeriod": { - "description": "Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key Management Service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours.", - "format": "google-duration", + "state": { + "description": "Output only. State of the violation", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "RESOLVED", + "UNRESOLVED", + "EXCEPTION" + ], + "enumDescriptions": [ + "Unspecified state.", + "Violation currently active. ", + "Violation is resolved.", + "Violation is Unresolved", + "Violation is Exception" + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last time when the Violation record was updated.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudAssuredworkloadsV1WorkloadResourceInfo": { - "description": "Represent the resources that are children of this Workload.", - "id": "GoogleCloudAssuredworkloadsV1WorkloadResourceInfo", + "GoogleCloudAssuredworkloadsV1beta1ViolationRemediation": { + "description": "Represents remediation guidance to resolve compliance violation for AssuredWorkload", + "id": "GoogleCloudAssuredworkloadsV1beta1ViolationRemediation", "properties": { - "resourceId": { - "description": "Resource identifier. For a project this represents project_number.", - "format": "int64", - "type": "string" + "compliantValues": { + "description": "Values that can resolve the violation For example: for list org policy violations, this will either be the list of allowed or denied values", + "items": { + "type": "string" + }, + "type": "array" }, - "resourceType": { - "description": "Indicates the type of resource.", + "instructions": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions", + "description": "Required. Remediation instructions to resolve violations" + }, + "remediationType": { + "description": "Output only. Reemediation type based on the type of org policy values violated", "enum": [ - "RESOURCE_TYPE_UNSPECIFIED", - "CONSUMER_PROJECT", - "ENCRYPTION_KEYS_PROJECT" + "REMEDIATION_TYPE_UNSPECIFIED", + "REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION", + "REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION", + "REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION", + "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION" ], "enumDescriptions": [ - "Unknown resource type.", - "Consumer project.", - "Consumer project containing encryption keys." + "Unspecified remediation type", + "Remediation type for boolean org policy", + "Remediation type for list org policy which have allowed values in the monitoring rule", + "Remediation type for list org policy which have denied values in the monitoring rule", + "Remediation type for gcp.restrictCmekCryptoKeyProjects" ], + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata": { - "description": "Operation metadata to give request details of CreateWorkload.", - "id": "GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata", + "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions": { + "description": "Instructions to remediate violation", + "id": "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions", "properties": { - "complianceRegime": { - "description": "Optional. Compliance controls that should be applied to the resources managed by the workload.", - "enum": [ - "COMPLIANCE_REGIME_UNSPECIFIED", - "IL4", - "CJIS", - "FEDRAMP_HIGH", - "FEDRAMP_MODERATE" - ], - "enumDescriptions": [ - "Unknown compliance regime.", - "Information protection as per DoD IL4 requirements.", - "Criminal Justice Information Services (CJIS) Security policies.", - "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls" - ], - "type": "string" + "consoleInstructions": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole", + "description": "Remediation instructions to resolve violation via cloud console" }, - "createTime": { - "description": "Optional. Time when the operation was created.", - "format": "google-datetime", - "type": "string" + "gcloudInstructions": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud", + "description": "Remediation instructions to resolve violation via gcloud cli" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole": { + "description": "Remediation instructions to resolve violation via cloud console", + "id": "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole", + "properties": { + "additionalLinks": { + "description": "Additional urls for more information about steps", + "items": { + "type": "string" + }, + "type": "array" }, - "displayName": { - "description": "Optional. The display name of the workload.", - "type": "string" + "consoleUris": { + "description": "Link to console page where violations can be resolved", + "items": { + "type": "string" + }, + "type": "array" }, - "parent": { - "description": "Optional. The parent of the workload.", - "type": "string" + "steps": { + "description": "Steps to resolve violation via cloud console", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse": { - "description": "Response of ListWorkloads endpoint.", - "id": "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse", + "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud": { + "description": "Remediation instructions to resolve violation via gcloud cli", + "id": "GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud", "properties": { - "nextPageToken": { - "description": "The next page token. Return empty if reached the last page.", - "type": "string" + "additionalLinks": { + "description": "Additional urls for more information about steps", + "items": { + "type": "string" + }, + "type": "array" }, - "workloads": { - "description": "List of Workloads under a given parent.", + "gcloudCommands": { + "description": "Gcloud command to resolve violation", "items": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + "type": "string" + }, + "type": "array" + }, + "steps": { + "description": "Steps to resolve violation via gcloud cli", + "items": { + "type": "string" }, "type": "array" } @@ -566,12 +897,12 @@ "id": "GoogleCloudAssuredworkloadsV1beta1Workload", "properties": { "billingAccount": { - "description": "Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", "type": "string" }, "cjisSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for CJIS." + "description": "Input only. Immutable. Settings specific to resources needed for CJIS." }, "complianceRegime": { "description": "Required. Immutable. Compliance Regime associated with this workload.", @@ -580,17 +911,42 @@ "IL4", "CJIS", "FEDRAMP_HIGH", - "FEDRAMP_MODERATE" + "FEDRAMP_MODERATE", + "US_REGIONAL_ACCESS", + "HIPAA", + "HITRUST", + "EU_REGIONS_AND_SUPPORT", + "CA_REGIONS_AND_SUPPORT", + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", "Information protection as per DoD IL4 requirements.", "Criminal Justice Information Services (CJIS) Security policies.", "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls" + "FedRAMP Moderate data protection controls", + "Assured Workloads For US Regions data protection controls", + "Health Insurance Portability and Accountability Act controls", + "Health Information Trust Alliance controls", + "Assured Workloads For EU Regions and Support controls", + "Assured Workloads For Canada Regions and Support controls", + "International Traffic in Arms Regulations" ], "type": "string" }, + "complianceStatus": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus", + "description": "Output only. Count of active Violations in the Workload.", + "readOnly": true + }, + "compliantButDisallowedServices": { + "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. Immutable. The Workload creation timestamp.", "format": "google-datetime", @@ -601,25 +957,44 @@ "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", "type": "string" }, + "enableSovereignControls": { + "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", + "type": "boolean" + }, "etag": { "description": "Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update \u0026 Delete operations.", "type": "string" }, "fedrampHighSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High." + "description": "Input only. Immutable. Settings specific to resources needed for FedRAMP High." }, "fedrampModerateSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." + "description": "Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." }, "il4Settings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for IL4." + "description": "Input only. Immutable. Settings specific to resources needed for IL4." + }, + "kajEnrollmentState": { + "description": "Output only. Represents the KAJ enrollment state of the given workload.", + "enum": [ + "KAJ_ENROLLMENT_STATE_UNSPECIFIED", + "KAJ_ENROLLMENT_STATE_PENDING", + "KAJ_ENROLLMENT_STATE_COMPLETE" + ], + "enumDescriptions": [ + "Default State for KAJ Enrollment.", + "Pending State for KAJ Enrollment.", + "Complete State for KAJ Enrollment." + ], + "readOnly": true, + "type": "string" }, "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes." + "description": "Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field." }, "labels": { "additionalProperties": { @@ -633,9 +1008,16 @@ "type": "string" }, "provisionedResourcesParent": { - "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id} organizations/{organization_id}", + "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", "type": "string" }, + "resourceSettings": { + "description": "Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings" + }, + "type": "array" + }, "resources": { "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", "items": { @@ -643,6 +1025,11 @@ }, "readOnly": true, "type": "array" + }, + "saaEnrollmentResponse": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse", + "description": "Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page.", + "readOnly": true } }, "type": "object" @@ -653,7 +1040,24 @@ "properties": { "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus": { + "description": "Represents the Compliance Status of this workload", + "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus", + "properties": { + "acknowledgedViolationCount": { + "description": "Count of active Violations which are acknowledged in the Workload.", + "format": "int32", + "type": "integer" + }, + "activeViolationCount": { + "description": "Count of active Violations which haven't been acknowledged.", + "format": "int32", + "type": "integer" } }, "type": "object" @@ -664,7 +1068,7 @@ "properties": { "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." } }, "type": "object" @@ -675,7 +1079,7 @@ "properties": { "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." } }, "type": "object" @@ -686,7 +1090,7 @@ "properties": { "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." } }, "type": "object" @@ -722,12 +1126,91 @@ "enum": [ "RESOURCE_TYPE_UNSPECIFIED", "CONSUMER_PROJECT", - "ENCRYPTION_KEYS_PROJECT" + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" + ], + "enumDescriptions": [ + "Unknown resource type.", + "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings": { + "description": "Represent the custom settings for the resources to be created.", + "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings", + "properties": { + "displayName": { + "description": "User-assigned resource display name. If not empty it will be used to create a resource with the specified name.", + "type": "string" + }, + "resourceId": { + "description": "Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google.", + "type": "string" + }, + "resourceType": { + "description": "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT)", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "CONSUMER_PROJECT", + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" ], "enumDescriptions": [ "Unknown resource type.", - "Consumer project.", - "Consumer project containing encryption keys." + "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse": { + "description": "Signed Access Approvals (SAA) enrollment response.", + "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse", + "properties": { + "setupErrors": { + "description": "Indicates SAA enrollment setup error if any.", + "items": { + "enum": [ + "SETUP_ERROR_UNSPECIFIED", + "ERROR_INVALID_BASE_SETUP", + "ERROR_MISSING_EXTERNAL_SIGNING_KEY", + "ERROR_NOT_ALL_SERVICES_ENROLLED", + "ERROR_SETUP_CHECK_FAILED" + ], + "enumDescriptions": [ + "Unspecified.", + "Invalid states for all customers, to be redirected to AA UI for additional details.", + "Returned when there is not an EKM key configured.", + "Returned when there are no enrolled services or the customer is enrolled in CAA only for a subset of services.", + "Returned when exception was encountered during evaluation of other criteria." + ], + "type": "string" + }, + "type": "array" + }, + "setupStatus": { + "description": "Indicates SAA enrollment status of a given workload.", + "enum": [ + "SETUP_STATE_UNSPECIFIED", + "STATUS_PENDING", + "STATUS_COMPLETE" + ], + "enumDescriptions": [ + "Unspecified.", + "SAA enrollment pending.", + "SAA enrollment comopleted." ], "type": "string" } @@ -788,7 +1271,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index 186be8984b3..a53456c32e6 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC. +// Copyright 2022 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -50,6 +50,7 @@ import ( "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" @@ -79,13 +80,14 @@ const mtlsBasePath = "https://assuredworkloads.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( - // View and manage your data across Google Cloud Platform services + // 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 := option.WithScopes( + scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/cloud-platform", ) // NOTE: prepend, so we don't override user-specified scopes. @@ -117,6 +119,7 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Organizations = NewOrganizationsService(s) + s.Projects = NewProjectsService(s) return s, nil } @@ -126,6 +129,8 @@ type Service struct { UserAgent string // optional additional User-Agent fragment Organizations *OrganizationsService + + Projects *ProjectsService } func (s *Service) userAgent() string { @@ -173,212 +178,173 @@ type OrganizationsLocationsOperationsService struct { func NewOrganizationsLocationsWorkloadsService(s *Service) *OrganizationsLocationsWorkloadsService { rs := &OrganizationsLocationsWorkloadsService{s: s} + rs.Organizations = NewOrganizationsLocationsWorkloadsOrganizationsService(s) + rs.Violations = NewOrganizationsLocationsWorkloadsViolationsService(s) return rs } type OrganizationsLocationsWorkloadsService struct { s *Service + + Organizations *OrganizationsLocationsWorkloadsOrganizationsService + + Violations *OrganizationsLocationsWorkloadsViolationsService } -// GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata: -// Operation metadata to give request details of CreateWorkload. -type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { - // ComplianceRegime: Optional. Compliance controls that should be - // applied to the resources managed by the workload. - // - // Possible values: - // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. - // "IL4" - Information protection as per DoD IL4 requirements. - // "CJIS" - Criminal Justice Information Services (CJIS) Security - // policies. - // "FEDRAMP_HIGH" - FedRAMP High data protection controls - // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls - ComplianceRegime string `json:"complianceRegime,omitempty"` +func NewOrganizationsLocationsWorkloadsOrganizationsService(s *Service) *OrganizationsLocationsWorkloadsOrganizationsService { + rs := &OrganizationsLocationsWorkloadsOrganizationsService{s: s} + rs.Locations = NewOrganizationsLocationsWorkloadsOrganizationsLocationsService(s) + return rs +} - // CreateTime: Optional. Time when the operation was created. - CreateTime string `json:"createTime,omitempty"` +type OrganizationsLocationsWorkloadsOrganizationsService struct { + s *Service - // DisplayName: Optional. The display name of the workload. - DisplayName string `json:"displayName,omitempty"` + Locations *OrganizationsLocationsWorkloadsOrganizationsLocationsService +} - // Parent: Optional. The parent of the workload. - Parent string `json:"parent,omitempty"` +func NewOrganizationsLocationsWorkloadsOrganizationsLocationsService(s *Service) *OrganizationsLocationsWorkloadsOrganizationsLocationsService { + rs := &OrganizationsLocationsWorkloadsOrganizationsLocationsService{s: s} + rs.Workloads = NewOrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsService(s) + return rs +} - // ForceSendFields is a list of field names (e.g. "ComplianceRegime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +type OrganizationsLocationsWorkloadsOrganizationsLocationsService struct { + s *Service - // NullFields is a list of field names (e.g. "ComplianceRegime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` + Workloads *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsService } -func (s *GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func NewOrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsService(s *Service) *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsService { + rs := &OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsService{s: s} + return rs } -// GoogleCloudAssuredworkloadsV1Workload: An Workload object for -// managing highly regulated workloads of cloud customers. -type GoogleCloudAssuredworkloadsV1Workload struct { - // BillingAccount: Required. Input only. The billing account used for - // the resources which are direct children of workload. This billing - // account is initially associated with the resources created as part of - // Workload creation. After the initial creation of these resources, the - // customer can change the assigned billing account. The resource name - // has the form `billingAccounts/{billing_account_id}`. For example, - // `billingAccounts/012345-567890-ABCDEF`. - BillingAccount string `json:"billingAccount,omitempty"` +type OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsService struct { + s *Service +} - // ComplianceRegime: Required. Immutable. Compliance Regime associated - // with this workload. - // - // Possible values: - // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. - // "IL4" - Information protection as per DoD IL4 requirements. - // "CJIS" - Criminal Justice Information Services (CJIS) Security - // policies. - // "FEDRAMP_HIGH" - FedRAMP High data protection controls - // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls - ComplianceRegime string `json:"complianceRegime,omitempty"` +func NewOrganizationsLocationsWorkloadsViolationsService(s *Service) *OrganizationsLocationsWorkloadsViolationsService { + rs := &OrganizationsLocationsWorkloadsViolationsService{s: s} + return rs +} - // CreateTime: Output only. Immutable. The Workload creation timestamp. - CreateTime string `json:"createTime,omitempty"` +type OrganizationsLocationsWorkloadsViolationsService struct { + s *Service +} - // DisplayName: Required. The user-assigned display name of the - // Workload. When present it must be between 4 to 30 characters. Allowed - // characters are: lowercase and uppercase letters, numbers, hyphen, and - // spaces. Example: My Workload - DisplayName string `json:"displayName,omitempty"` +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Organizations = NewProjectsOrganizationsService(s) + return rs +} - // Etag: Optional. ETag of the workload, it is calculated on the basis - // of the Workload contents. It will be used in Update & Delete - // operations. - Etag string `json:"etag,omitempty"` +type ProjectsService struct { + s *Service - // KmsSettings: Input only. Settings used to create a CMEK crypto key. - // When set a project with a KMS CMEK key is provisioned. This field is - // mandatory for a subset of Compliance Regimes. - KmsSettings *GoogleCloudAssuredworkloadsV1WorkloadKMSSettings `json:"kmsSettings,omitempty"` + Organizations *ProjectsOrganizationsService +} - // Labels: Optional. Labels applied to the workload. - Labels map[string]string `json:"labels,omitempty"` +func NewProjectsOrganizationsService(s *Service) *ProjectsOrganizationsService { + rs := &ProjectsOrganizationsService{s: s} + rs.Locations = NewProjectsOrganizationsLocationsService(s) + return rs +} - // Name: Optional. The resource name of the workload. Format: - // organizations/{organization}/locations/{location}/workloads/{workload} - // Read-only. - Name string `json:"name,omitempty"` +type ProjectsOrganizationsService struct { + s *Service - // ProvisionedResourcesParent: Input only. The parent resource for the - // resources managed by this Assured Workload. May be either an - // organization or a folder. Must be the same or a child of the Workload - // parent. If not specified all resources are created under the Workload - // parent. Formats: folders/{folder_id} organizations/{organization_id} - ProvisionedResourcesParent string `json:"provisionedResourcesParent,omitempty"` + Locations *ProjectsOrganizationsLocationsService +} - // Resources: Output only. The resources associated with this workload. - // These resources will be created when creating the workload. If any of - // the projects already exist, the workload creation will fail. Always - // read only. - Resources []*GoogleCloudAssuredworkloadsV1WorkloadResourceInfo `json:"resources,omitempty"` +func NewProjectsOrganizationsLocationsService(s *Service) *ProjectsOrganizationsLocationsService { + rs := &ProjectsOrganizationsLocationsService{s: s} + rs.Workloads = NewProjectsOrganizationsLocationsWorkloadsService(s) + return rs +} - // ForceSendFields is a list of field names (e.g. "BillingAccount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +type ProjectsOrganizationsLocationsService struct { + s *Service - // NullFields is a list of field names (e.g. "BillingAccount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` + Workloads *ProjectsOrganizationsLocationsWorkloadsService } -func (s *GoogleCloudAssuredworkloadsV1Workload) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1Workload - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func NewProjectsOrganizationsLocationsWorkloadsService(s *Service) *ProjectsOrganizationsLocationsWorkloadsService { + rs := &ProjectsOrganizationsLocationsWorkloadsService{s: s} + return rs } -// GoogleCloudAssuredworkloadsV1WorkloadKMSSettings: Settings specific -// to the Key Management Service. -type GoogleCloudAssuredworkloadsV1WorkloadKMSSettings struct { - // NextRotationTime: Required. Input only. Immutable. The time at which - // the Key Management Service will automatically create a new version of - // the crypto key and mark it as the primary. - NextRotationTime string `json:"nextRotationTime,omitempty"` +type ProjectsOrganizationsLocationsWorkloadsService struct { + s *Service +} - // RotationPeriod: Required. Input only. Immutable. [next_rotation_time] - // will be advanced by this period when the Key Management Service - // automatically rotates a key. Must be at least 24 hours and at most - // 876,000 hours. - RotationPeriod string `json:"rotationPeriod,omitempty"` +// GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest: +// Request for acknowledging the violation Next Id: 4 +type GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest struct { + // Comment: Required. Business justification explaining the need for + // violation acknowledgement + Comment string `json:"comment,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextRotationTime") to + // NonCompliantOrgPolicy: Optional. Name of the OrgPolicy which was + // modified with non-compliant change and resulted in this violation. + // Format: projects/{project_number}/policies/{constraint_name} + // folders/{folder_id}/policies/{constraint_name} + // organizations/{organization_id}/policies/{constraint_name} + NonCompliantOrgPolicy string `json:"nonCompliantOrgPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Comment") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextRotationTime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Comment") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudAssuredworkloadsV1WorkloadKMSSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1WorkloadKMSSettings +func (s *GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAssuredworkloadsV1WorkloadResourceInfo: Represent the -// resources that are children of this Workload. -type GoogleCloudAssuredworkloadsV1WorkloadResourceInfo struct { - // ResourceId: Resource identifier. For a project this represents - // project_number. - ResourceId int64 `json:"resourceId,omitempty,string"` +// GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse: +// Response for violation acknowledgement +type GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} - // ResourceType: Indicates the type of resource. - // - // Possible values: - // "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type. - // "CONSUMER_PROJECT" - Consumer project. - // "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption - // keys. - ResourceType string `json:"resourceType,omitempty"` +// GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse: A +// response that includes the analysis of the hypothetical resource +// move. +type GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse struct { + // Blockers: A list of blockers that should be addressed before moving + // the source project or project-based workload to the destination + // folder-based workload. + Blockers []string `json:"blockers,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceId") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Blockers") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceId") to include in + // NullFields is a list of field names (e.g. "Blockers") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -387,56 +353,45 @@ type GoogleCloudAssuredworkloadsV1WorkloadResourceInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudAssuredworkloadsV1WorkloadResourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1WorkloadResourceInfo +func (s *GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata: -// Operation metadata to give request details of CreateWorkload. -type GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata struct { - // ComplianceRegime: Optional. Compliance controls that should be - // applied to the resources managed by the workload. - // - // Possible values: - // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. - // "IL4" - Information protection as per DoD IL4 requirements. - // "CJIS" - Criminal Justice Information Services (CJIS) Security - // policies. - // "FEDRAMP_HIGH" - FedRAMP High data protection controls - // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls - ComplianceRegime string `json:"complianceRegime,omitempty"` - - // CreateTime: Optional. Time when the operation was created. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse: Response of +// ListViolations endpoint. +type GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse struct { + // NextPageToken: The next page token. Returns empty if reached the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` - // DisplayName: Optional. The display name of the workload. - DisplayName string `json:"displayName,omitempty"` + // Violations: List of Violations under a Workload. + Violations []*GoogleCloudAssuredworkloadsV1beta1Violation `json:"violations,omitempty"` - // Parent: Optional. The parent of the workload. - Parent string `json:"parent,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ComplianceRegime") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ComplianceRegime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata +func (s *GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -457,10 +412,10 @@ type GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse struct { // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "NextPageToken") to include @@ -478,106 +433,464 @@ func (s *GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAssuredworkloadsV1beta1Workload: An Workload object for -// managing highly regulated workloads of cloud customers. -type GoogleCloudAssuredworkloadsV1beta1Workload struct { - // BillingAccount: Required. Input only. The billing account used for - // the resources which are direct children of workload. This billing - // account is initially associated with the resources created as part of - // Workload creation. After the initial creation of these resources, the - // customer can change the assigned billing account. The resource name - // has the form `billingAccounts/{billing_account_id}`. For example, - // `billingAccounts/012345-567890-ABCDEF`. - BillingAccount string `json:"billingAccount,omitempty"` - - // CjisSettings: Required. Input only. Immutable. Settings specific to - // resources needed for CJIS. - CjisSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings `json:"cjisSettings,omitempty"` - - // ComplianceRegime: Required. Immutable. Compliance Regime associated - // with this workload. +// GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest: +// Request for restricting list of available resources in Workload +// environment. +type GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest struct { + // RestrictionType: Required. The type of restriction for using gcp + // products in the Workload environment. // // Possible values: - // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. - // "IL4" - Information protection as per DoD IL4 requirements. - // "CJIS" - Criminal Justice Information Services (CJIS) Security - // policies. - // "FEDRAMP_HIGH" - FedRAMP High data protection controls - // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls - ComplianceRegime string `json:"complianceRegime,omitempty"` + // "RESTRICTION_TYPE_UNSPECIFIED" - Unknown restriction type. + // "ALLOW_ALL_GCP_RESOURCES" - Allow the use all of all gcp products, + // irrespective of the compliance posture. This effectively removes + // gcp.restrictServiceUsage OrgPolicy on the AssuredWorkloads Folder. + // "ALLOW_COMPLIANT_RESOURCES" - Based on Workload's compliance + // regime, allowed list changes. See - + // https://cloud.google.com/assured-workloads/docs/supported-products + // for the list of supported resources. + RestrictionType string `json:"restrictionType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RestrictionType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // CreateTime: Output only. Immutable. The Workload creation timestamp. - CreateTime string `json:"createTime,omitempty"` + // NullFields is a list of field names (e.g. "RestrictionType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // DisplayName: Required. The user-assigned display name of the - // Workload. When present it must be between 4 to 30 characters. Allowed - // characters are: lowercase and uppercase letters, numbers, hyphen, and - // spaces. Example: My Workload - DisplayName string `json:"displayName,omitempty"` +func (s *GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Etag: Optional. ETag of the workload, it is calculated on the basis - // of the Workload contents. It will be used in Update & Delete - // operations. - Etag string `json:"etag,omitempty"` +// GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse: +// Response for restricting the list of allowed resources. +type GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} - // FedrampHighSettings: Required. Input only. Immutable. Settings - // specific to resources needed for FedRAMP High. - FedrampHighSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings `json:"fedrampHighSettings,omitempty"` +// GoogleCloudAssuredworkloadsV1beta1Violation: Workload monitoring +// Violation. +type GoogleCloudAssuredworkloadsV1beta1Violation struct { + // Acknowledged: A boolean that indicates if the violation is + // acknowledged + Acknowledged bool `json:"acknowledged,omitempty"` - // FedrampModerateSettings: Required. Input only. Immutable. Settings - // specific to resources needed for FedRAMP Moderate. - FedrampModerateSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings `json:"fedrampModerateSettings,omitempty"` + // AcknowledgementTime: Optional. Timestamp when this violation was + // acknowledged last. This will be absent when acknowledged field is + // marked as false. + AcknowledgementTime string `json:"acknowledgementTime,omitempty"` - // Il4Settings: Required. Input only. Immutable. Settings specific to - // resources needed for IL4. - Il4Settings *GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings `json:"il4Settings,omitempty"` + // AuditLogLink: Output only. Immutable. Audit Log Link for violated + // resource Format: + // https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder} + AuditLogLink string `json:"auditLogLink,omitempty"` - // KmsSettings: Input only. Settings used to create a CMEK crypto key. - // When set a project with a KMS CMEK key is provisioned. This field is - // mandatory for a subset of Compliance Regimes. - KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` + // BeginTime: Output only. Time of the event which triggered the + // Violation. + BeginTime string `json:"beginTime,omitempty"` - // Labels: Optional. Labels applied to the workload. - Labels map[string]string `json:"labels,omitempty"` + // Category: Output only. Category under which this violation is mapped. + // e.g. Location, Service Usage, Access, Encryption, etc. + Category string `json:"category,omitempty"` - // Name: Optional. The resource name of the workload. Format: - // organizations/{organization}/locations/{location}/workloads/{workload} - // Read-only. + // Description: Output only. Description for the Violation. e.g. + // OrgPolicy gcp.resourceLocations has non compliant value. + Description string `json:"description,omitempty"` + + // Name: Output only. Immutable. Name of the Violation. Format: + // organizations/{organization}/locations/{location}/workloads/{workload_ + // id}/violations/{violations_id} Name string `json:"name,omitempty"` - // ProvisionedResourcesParent: Input only. The parent resource for the - // resources managed by this Assured Workload. May be either an - // organization or a folder. Must be the same or a child of the Workload - // parent. If not specified all resources are created under the Workload - // parent. Formats: folders/{folder_id} organizations/{organization_id} - ProvisionedResourcesParent string `json:"provisionedResourcesParent,omitempty"` + // NonCompliantOrgPolicy: Output only. Immutable. Name of the OrgPolicy + // which was modified with non-compliant change and resulted this + // violation. Format: + // projects/{project_number}/policies/{constraint_name} + // folders/{folder_id}/policies/{constraint_name} + // organizations/{organization_id}/policies/{constraint_name} + NonCompliantOrgPolicy string `json:"nonCompliantOrgPolicy,omitempty"` - // Resources: Output only. The resources associated with this workload. - // These resources will be created when creating the workload. If any of - // the projects already exist, the workload creation will fail. Always - // read only. - Resources []*GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo `json:"resources,omitempty"` + // OrgPolicyConstraint: Output only. Immutable. The + // org-policy-constraint that was incorrectly changed, which resulted in + // this violation. + OrgPolicyConstraint string `json:"orgPolicyConstraint,omitempty"` + + // Remediation: Output only. Compliance violation remediation + Remediation *GoogleCloudAssuredworkloadsV1beta1ViolationRemediation `json:"remediation,omitempty"` + + // ResolveTime: Output only. Time of the event which fixed the + // Violation. If the violation is ACTIVE this will be empty. + ResolveTime string `json:"resolveTime,omitempty"` + + // State: Output only. State of the violation + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - Violation currently active. + // "RESOLVED" - Violation is resolved. + // "UNRESOLVED" - Violation is Unresolved + // "EXCEPTION" - Violation is Exception + State string `json:"state,omitempty"` + + // UpdateTime: Output only. The last time when the Violation record was + // 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. "BillingAccount") to + // ForceSendFields is a list of field names (e.g. "Acknowledged") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BillingAccount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Acknowledged") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1beta1Violation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1Violation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1beta1ViolationRemediation: Represents +// remediation guidance to resolve compliance violation for +// AssuredWorkload +type GoogleCloudAssuredworkloadsV1beta1ViolationRemediation struct { + // CompliantValues: Values that can resolve the violation For example: + // for list org policy violations, this will either be the list of + // allowed or denied values + CompliantValues []string `json:"compliantValues,omitempty"` + + // Instructions: Required. Remediation instructions to resolve + // violations + Instructions *GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions `json:"instructions,omitempty"` + + // RemediationType: Output only. Reemediation type based on the type of + // org policy values violated + // + // Possible values: + // "REMEDIATION_TYPE_UNSPECIFIED" - Unspecified remediation type + // "REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION" - Remediation type for + // boolean org policy + // "REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION" - + // Remediation type for list org policy which have allowed values in the + // monitoring rule + // "REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION" - Remediation + // type for list org policy which have denied values in the monitoring + // rule + // + // "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION" + // - Remediation type for gcp.restrictCmekCryptoKeyProjects + RemediationType string `json:"remediationType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompliantValues") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompliantValues") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1beta1ViolationRemediation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1ViolationRemediation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions: +// Instructions to remediate violation +type GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions struct { + // ConsoleInstructions: Remediation instructions to resolve violation + // via cloud console + ConsoleInstructions *GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole `json:"consoleInstructions,omitempty"` + + // GcloudInstructions: Remediation instructions to resolve violation via + // gcloud cli + GcloudInstructions *GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud `json:"gcloudInstructions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConsoleInstructions") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConsoleInstructions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsCons +// ole: Remediation instructions to resolve violation via cloud console +type GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole struct { + // AdditionalLinks: Additional urls for more information about steps + AdditionalLinks []string `json:"additionalLinks,omitempty"` + + // ConsoleUris: Link to console page where violations can be resolved + ConsoleUris []string `json:"consoleUris,omitempty"` + + // Steps: Steps to resolve violation via cloud console + Steps []string `json:"steps,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalLinks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalLinks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGclo +// ud: Remediation instructions to resolve violation via gcloud cli +type GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud struct { + // AdditionalLinks: Additional urls for more information about steps + AdditionalLinks []string `json:"additionalLinks,omitempty"` + + // GcloudCommands: Gcloud command to resolve violation + GcloudCommands []string `json:"gcloudCommands,omitempty"` + + // Steps: Steps to resolve violation via gcloud cli + Steps []string `json:"steps,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalLinks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalLinks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1beta1Workload: An Workload object for +// managing highly regulated workloads of cloud customers. +type GoogleCloudAssuredworkloadsV1beta1Workload struct { + // BillingAccount: Optional. The billing account used for the resources + // which are direct children of workload. This billing account is + // initially associated with the resources created as part of Workload + // creation. After the initial creation of these resources, the customer + // can change the assigned billing account. The resource name has the + // form `billingAccounts/{billing_account_id}`. For example, + // `billingAccounts/012345-567890-ABCDEF`. + BillingAccount string `json:"billingAccount,omitempty"` + + // CjisSettings: Input only. Immutable. Settings specific to resources + // needed for CJIS. + CjisSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings `json:"cjisSettings,omitempty"` + + // ComplianceRegime: Required. Immutable. Compliance Regime associated + // with this workload. + // + // Possible values: + // "COMPLIANCE_REGIME_UNSPECIFIED" - Unknown compliance regime. + // "IL4" - Information protection as per DoD IL4 requirements. + // "CJIS" - Criminal Justice Information Services (CJIS) Security + // policies. + // "FEDRAMP_HIGH" - FedRAMP High data protection controls + // "FEDRAMP_MODERATE" - FedRAMP Moderate data protection controls + // "US_REGIONAL_ACCESS" - Assured Workloads For US Regions data + // protection controls + // "HIPAA" - Health Insurance Portability and Accountability Act + // controls + // "HITRUST" - Health Information Trust Alliance controls + // "EU_REGIONS_AND_SUPPORT" - Assured Workloads For EU Regions and + // Support controls + // "CA_REGIONS_AND_SUPPORT" - Assured Workloads For Canada Regions and + // Support controls + // "ITAR" - International Traffic in Arms Regulations + ComplianceRegime string `json:"complianceRegime,omitempty"` + + // ComplianceStatus: Output only. Count of active Violations in the + // Workload. + ComplianceStatus *GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus `json:"complianceStatus,omitempty"` + + // CompliantButDisallowedServices: Output only. Urls for services which + // are compliant for this Assured Workload, but which are currently + // disallowed by the ResourceUsageRestriction org policy. Invoke + // RestrictAllowedResources endpoint to allow your project developers to + // use these services in their environment." + CompliantButDisallowedServices []string `json:"compliantButDisallowedServices,omitempty"` + + // CreateTime: Output only. Immutable. The Workload creation timestamp. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: Required. The user-assigned display name of the + // Workload. When present it must be between 4 to 30 characters. Allowed + // characters are: lowercase and uppercase letters, numbers, hyphen, and + // spaces. Example: My Workload + DisplayName string `json:"displayName,omitempty"` + + // EnableSovereignControls: Optional. Indicates the sovereignty status + // of the given workload. Currently meant to be used by Europe/Canada + // customers. + EnableSovereignControls bool `json:"enableSovereignControls,omitempty"` + + // Etag: Optional. ETag of the workload, it is calculated on the basis + // of the Workload contents. It will be used in Update & Delete + // operations. + Etag string `json:"etag,omitempty"` + + // FedrampHighSettings: Input only. Immutable. Settings specific to + // resources needed for FedRAMP High. + FedrampHighSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings `json:"fedrampHighSettings,omitempty"` + + // FedrampModerateSettings: Input only. Immutable. Settings specific to + // resources needed for FedRAMP Moderate. + FedrampModerateSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings `json:"fedrampModerateSettings,omitempty"` + + // Il4Settings: Input only. Immutable. Settings specific to resources + // needed for IL4. + Il4Settings *GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings `json:"il4Settings,omitempty"` + + // KajEnrollmentState: Output only. Represents the KAJ enrollment state + // of the given workload. + // + // Possible values: + // "KAJ_ENROLLMENT_STATE_UNSPECIFIED" - Default State for KAJ + // Enrollment. + // "KAJ_ENROLLMENT_STATE_PENDING" - Pending State for KAJ Enrollment. + // "KAJ_ENROLLMENT_STATE_COMPLETE" - Complete State for KAJ + // Enrollment. + KajEnrollmentState string `json:"kajEnrollmentState,omitempty"` + + // KmsSettings: Input only. Settings used to create a CMEK crypto key. + // When set, a project with a KMS CMEK key is provisioned. This field is + // deprecated as of Feb 28, 2022. In order to create a Keyring, callers + // should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in + // ResourceSettings.resource_type field. + KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` + + // Labels: Optional. Labels applied to the workload. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Optional. The resource name of the workload. Format: + // organizations/{organization}/locations/{location}/workloads/{workload} + // Read-only. + Name string `json:"name,omitempty"` + + // ProvisionedResourcesParent: Input only. The parent resource for the + // resources managed by this Assured Workload. May be either empty or a + // folder resource which is a child of the Workload parent. If not + // specified all resources are created under the parent organization. + // Format: folders/{folder_id} + ProvisionedResourcesParent string `json:"provisionedResourcesParent,omitempty"` + + // ResourceSettings: Input only. Resource properties that are used to + // customize workload resources. These properties (such as custom + // project id) will be used to create workload resources if possible. + // This field is optional. + ResourceSettings []*GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings `json:"resourceSettings,omitempty"` + + // Resources: Output only. The resources associated with this workload. + // These resources will be created when creating the workload. If any of + // the projects already exist, the workload creation will fail. Always + // read only. + Resources []*GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo `json:"resources,omitempty"` + + // SaaEnrollmentResponse: Output only. Represents the SAA enrollment + // response of the given workload. SAA enrollment response is queried + // during GetWorkload call. In failure cases, user friendly error + // message is shown in SAA details page. + SaaEnrollmentResponse *GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse `json:"saaEnrollmentResponse,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BillingAccount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BillingAccount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *GoogleCloudAssuredworkloadsV1beta1Workload) MarshalJSON() ([]byte, error) { @@ -589,16 +902,16 @@ func (s *GoogleCloudAssuredworkloadsV1beta1Workload) MarshalJSON() ([]byte, erro // GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings: Settings // specific to resources needed for CJIS. type GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings struct { - // KmsSettings: Required. Input only. Immutable. Settings used to create - // a CMEK crypto key. + // KmsSettings: Input only. Immutable. Settings used to create a CMEK + // crypto key. KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` // ForceSendFields is a list of field names (e.g. "KmsSettings") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "KmsSettings") to include @@ -616,19 +929,55 @@ func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus: +// Represents the Compliance Status of this workload +type GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus struct { + // AcknowledgedViolationCount: Count of active Violations which are + // acknowledged in the Workload. + AcknowledgedViolationCount int64 `json:"acknowledgedViolationCount,omitempty"` + + // ActiveViolationCount: Count of active Violations which haven't been + // acknowledged. + ActiveViolationCount int64 `json:"activeViolationCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AcknowledgedViolationCount") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AcknowledgedViolationCount") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings: // Settings specific to resources needed for FedRAMP High. type GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings struct { - // KmsSettings: Required. Input only. Immutable. Settings used to create - // a CMEK crypto key. + // KmsSettings: Input only. Immutable. Settings used to create a CMEK + // crypto key. KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` // ForceSendFields is a list of field names (e.g. "KmsSettings") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "KmsSettings") to include @@ -649,16 +998,16 @@ func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings) MarshalJ // GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings: // Settings specific to resources needed for FedRAMP Moderate. type GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings struct { - // KmsSettings: Required. Input only. Immutable. Settings used to create - // a CMEK crypto key. + // KmsSettings: Input only. Immutable. Settings used to create a CMEK + // crypto key. KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` // ForceSendFields is a list of field names (e.g. "KmsSettings") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "KmsSettings") to include @@ -679,16 +1028,16 @@ func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings) Mars // GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings: Settings // specific to resources needed for IL4. type GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings struct { - // KmsSettings: Required. Input only. Immutable. Settings used to create - // a CMEK crypto key. + // KmsSettings: Input only. Immutable. Settings used to create a CMEK + // crypto key. KmsSettings *GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings `json:"kmsSettings,omitempty"` // ForceSendFields is a list of field names (e.g. "KmsSettings") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "KmsSettings") to include @@ -722,10 +1071,10 @@ type GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings struct { // ForceSendFields is a list of field names (e.g. "NextRotationTime") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "NextRotationTime") to @@ -755,17 +1104,21 @@ type GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo struct { // // Possible values: // "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type. - // "CONSUMER_PROJECT" - Consumer project. + // "CONSUMER_PROJECT" - Deprecated. Existing workloads will continue + // to support this, but new CreateWorkloadRequests should not specify + // this as an input value. + // "CONSUMER_FOLDER" - Consumer Folder. // "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption // keys. + // "KEYRING" - Keyring resource that hosts encryption keys. ResourceType string `json:"resourceType,omitempty"` // ForceSendFields is a list of field names (e.g. "ResourceId") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ResourceId") to include in @@ -783,6 +1136,106 @@ func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings: Represent +// the custom settings for the resources to be created. +type GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings struct { + // DisplayName: User-assigned resource display name. If not empty it + // will be used to create a resource with the specified name. + DisplayName string `json:"displayName,omitempty"` + + // ResourceId: Resource identifier. For a project this represents + // project_id. If the project is already taken, the workload creation + // will fail. For KeyRing, this represents the keyring_id. For a folder, + // don't set this value as folder_id is assigned by Google. + ResourceId string `json:"resourceId,omitempty"` + + // ResourceType: Indicates the type of resource. This field should be + // specified to correspond the id to the right project type + // (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) + // + // Possible values: + // "RESOURCE_TYPE_UNSPECIFIED" - Unknown resource type. + // "CONSUMER_PROJECT" - Deprecated. Existing workloads will continue + // to support this, but new CreateWorkloadRequests should not specify + // this as an input value. + // "CONSUMER_FOLDER" - Consumer Folder. + // "ENCRYPTION_KEYS_PROJECT" - Consumer project containing encryption + // keys. + // "KEYRING" - Keyring resource that hosts encryption keys. + ResourceType string `json:"resourceType,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse: +// Signed Access Approvals (SAA) enrollment response. +type GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse struct { + // SetupErrors: Indicates SAA enrollment setup error if any. + // + // Possible values: + // "SETUP_ERROR_UNSPECIFIED" - Unspecified. + // "ERROR_INVALID_BASE_SETUP" - Invalid states for all customers, to + // be redirected to AA UI for additional details. + // "ERROR_MISSING_EXTERNAL_SIGNING_KEY" - Returned when there is not + // an EKM key configured. + // "ERROR_NOT_ALL_SERVICES_ENROLLED" - Returned when there are no + // enrolled services or the customer is enrolled in CAA only for a + // subset of services. + // "ERROR_SETUP_CHECK_FAILED" - Returned when exception was + // encountered during evaluation of other criteria. + SetupErrors []string `json:"setupErrors,omitempty"` + + // SetupStatus: Indicates SAA enrollment status of a given workload. + // + // Possible values: + // "SETUP_STATE_UNSPECIFIED" - Unspecified. + // "STATUS_PENDING" - SAA enrollment pending. + // "STATUS_COMPLETE" - SAA enrollment comopleted. + SetupStatus string `json:"setupStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SetupErrors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SetupErrors") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningListOperationsResponse: The response message for // Operations.ListOperations. type GoogleLongrunningListOperationsResponse struct { @@ -799,10 +1252,10 @@ type GoogleLongrunningListOperationsResponse struct { // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "NextPageToken") to include @@ -861,10 +1314,10 @@ type GoogleLongrunningOperation struct { // ForceSendFields is a list of field names (e.g. "Done") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Done") to include in API @@ -886,8 +1339,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -896,11 +1348,11 @@ type GoogleProtobufEmpty struct { // 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). +// 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. @@ -917,10 +1369,10 @@ type GoogleRpcStatus struct { // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Code") to include in API @@ -949,66 +1401,1104 @@ type OrganizationsLocationsOperationsGetCall 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. -func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { - c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// 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 *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { + c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "assuredworkloads.organizations.locations.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsGetCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "assuredworkloads.organizations.locations.operations.list": + +type OrganizationsLocationsOperationsListCall 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`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall { + c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "assuredworkloads.organizations.locations.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsListCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.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": "^organizations/[^/]+/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": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "assuredworkloads.organizations.locations.workloads.create": + +type OrganizationsLocationsWorkloadsCreateCall struct { + s *Service + parent string + googlecloudassuredworkloadsv1beta1workload *GoogleCloudAssuredworkloadsV1beta1Workload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates Assured Workload. +// +// - parent: The resource name of the new Workload's parent. Must be of +// the form `organizations/{org_id}/locations/{location_id}`. +func (r *OrganizationsLocationsWorkloadsService) Create(parent string, googlecloudassuredworkloadsv1beta1workload *GoogleCloudAssuredworkloadsV1beta1Workload) *OrganizationsLocationsWorkloadsCreateCall { + c := &OrganizationsLocationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudassuredworkloadsv1beta1workload = googlecloudassuredworkloadsv1beta1workload + return c +} + +// ExternalId sets the optional parameter "externalId": A identifier +// associated with the workload and underlying projects which allows for +// the break down of billing costs for a workload. The value provided +// for the identifier will add a label to the workload and contained +// projects with the identifier as the value. +func (c *OrganizationsLocationsWorkloadsCreateCall) ExternalId(externalId string) *OrganizationsLocationsWorkloadsCreateCall { + c.urlParams_.Set("externalId", externalId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsWorkloadsCreateCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsWorkloadsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsWorkloadsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1beta1workload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/workloads") + 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 "assuredworkloads.organizations.locations.workloads.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsWorkloadsCreateCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates Assured Workload.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads", + // "httpMethod": "POST", + // "id": "assuredworkloads.organizations.locations.workloads.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "externalId": { + // "description": "Optional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the identifier will add a label to the workload and contained projects with the identifier as the value.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/workloads", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "assuredworkloads.organizations.locations.workloads.delete": + +type OrganizationsLocationsWorkloadsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the workload. Make sure that workload's direct +// children are already in a deleted state, otherwise the request will +// fail with a FAILED_PRECONDITION error. In addition to +// assuredworkloads.workload.delete permission, the user should also +// have orgpolicy.policy.set permission on the deleted folder to remove +// Assured Workloads OrgPolicies. +// +// - name: The `name` field is used to identify the workload. Format: +// organizations/{org_id}/locations/{location_id}/workloads/{workload_i +// d}. +func (r *OrganizationsLocationsWorkloadsService) Delete(name string) *OrganizationsLocationsWorkloadsDeleteCall { + c := &OrganizationsLocationsWorkloadsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The etag of the workload. If +// this is provided, it must match the server's etag. +func (c *OrganizationsLocationsWorkloadsDeleteCall) Etag(etag string) *OrganizationsLocationsWorkloadsDeleteCall { + 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 information. +func (c *OrganizationsLocationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsWorkloadsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsWorkloadsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsWorkloadsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "assuredworkloads.organizations.locations.workloads.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsWorkloadsDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", + // "httpMethod": "DELETE", + // "id": "assuredworkloads.organizations.locations.workloads.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The etag of the workload. If this is provided, it must match the server's etag.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "assuredworkloads.organizations.locations.workloads.get": + +type OrganizationsLocationsWorkloadsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets Assured Workload associated with a CRM Node +// +// - name: The resource name of the Workload to fetch. This is the +// workloads's relative path in the API, formatted as +// "organizations/{organization_id}/locations/{location_id}/workloads/{ +// workload_id}". For example, +// "organizations/123/locations/us-east1/workloads/assured-workload-1". +func (r *OrganizationsLocationsWorkloadsService) Get(name string) *OrganizationsLocationsWorkloadsGetCall { + c := &OrganizationsLocationsWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsWorkloadsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsWorkloadsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsWorkloadsGetCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsWorkloadsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsWorkloadsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "assuredworkloads.organizations.locations.workloads.get" call. +// Exactly one of *GoogleCloudAssuredworkloadsV1beta1Workload or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1beta1Workload.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1Workload, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudAssuredworkloadsV1beta1Workload{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets Assured Workload associated with a CRM Node", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.workloads.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "assuredworkloads.organizations.locations.workloads.list": + +type OrganizationsLocationsWorkloadsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Assured Workloads under a CRM Node. +// +// - parent: Parent Resource to list workloads from. Must be of the form +// `organizations/{org_id}/locations/{location}`. +func (r *OrganizationsLocationsWorkloadsService) List(parent string) *OrganizationsLocationsWorkloadsListCall { + c := &OrganizationsLocationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A custom filter for +// filtering by properties of a workload. At this time, only filtering +// by labels is supported. +func (c *OrganizationsLocationsWorkloadsListCall) Filter(filter string) *OrganizationsLocationsWorkloadsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Page size. +func (c *OrganizationsLocationsWorkloadsListCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// returned from previous request. Page token contains context from +// previous request. Page token needs to be passed in the second and +// following requests. +func (c *OrganizationsLocationsWorkloadsListCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsWorkloadsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsWorkloadsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsWorkloadsListCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsWorkloadsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsWorkloadsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/workloads") + 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 "assuredworkloads.organizations.locations.workloads.list" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse.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 *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Assured Workloads under a CRM Node.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.workloads.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/workloads", + // "response": { + // "$ref": "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsWorkloadsListCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "assuredworkloads.organizations.locations.workloads.patch": + +type OrganizationsLocationsWorkloadsPatchCall struct { + s *Service + name string + googlecloudassuredworkloadsv1beta1workload *GoogleCloudAssuredworkloadsV1beta1Workload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing workload. Currently allows updating of +// workload display_name and labels. For force updates don't set etag +// field in the Workload. Only one update operation per workload can be +// in progress. +// +// - name: Optional. The resource name of the workload. Format: +// organizations/{organization}/locations/{location}/workloads/{workloa +// d} Read-only. +func (r *OrganizationsLocationsWorkloadsService) Patch(name string, googlecloudassuredworkloadsv1beta1workload *GoogleCloudAssuredworkloadsV1beta1Workload) *OrganizationsLocationsWorkloadsPatchCall { + c := &OrganizationsLocationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudassuredworkloadsv1beta1workload = googlecloudassuredworkloadsv1beta1workload + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. +func (c *OrganizationsLocationsWorkloadsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsWorkloadsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { +func (c *OrganizationsLocationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { +func (c *OrganizationsLocationsWorkloadsPatchCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201111") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1beta1workload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -1019,14 +2509,16 @@ func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "assuredworkloads.organizations.locations.workloads.patch" call. +// Exactly one of *GoogleCloudAssuredworkloadsV1beta1Workload or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1beta1Workload.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1Workload, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1045,7 +2537,7 @@ func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAssuredworkloadsV1beta1Workload{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1057,25 +2549,34 @@ func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "assuredworkloads.organizations.locations.operations.get", + // "description": "Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", + // "httpMethod": "PATCH", + // "id": "assuredworkloads.organizations.locations.workloads.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1084,105 +2585,80 @@ func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOptio } -// method id "assuredworkloads.organizations.locations.operations.list": +// method id "assuredworkloads.organizations.locations.workloads.restrictAllowedResources": -type OrganizationsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall struct { + s *Service + name string + googlecloudassuredworkloadsv1beta1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest + 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`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. -func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall { - c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// RestrictAllowedResources: Restrict the list of resources allowed in +// the Workload environment. The current list of allowed products can be +// found at +// https://cloud.google.com/assured-workloads/docs/supported-products In +// addition to assuredworkloads.workload.update permission, the user +// should also have orgpolicy.policy.set permission on the folder +// resource to use this functionality. +// +// - name: The resource name of the Workload. This is the workloads's +// relative path in the API, formatted as +// "organizations/{organization_id}/locations/{location_id}/workloads/{ +// workload_id}". For example, +// "organizations/123/locations/us-east1/workloads/assured-workload-1". +func (r *OrganizationsLocationsWorkloadsService) RestrictAllowedResources(name string, googlecloudassuredworkloadsv1beta1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { + c := &OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googlecloudassuredworkloadsv1beta1restrictallowedresourcesrequest = googlecloudassuredworkloadsv1beta1restrictallowedresourcesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall { +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall { +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOperationsListCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201111") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1beta1restrictallowedresourcesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:restrictAllowedResources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -1193,15 +2669,17 @@ func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "assuredworkloads.organizations.locations.workloads.restrictAllowedResources" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse.Se +// rverResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1220,7 +2698,7 @@ func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1232,41 +2710,28 @@ func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "assuredworkloads.organizations.locations.operations.list", + // "description": "Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:restrictAllowedResources", + // "httpMethod": "POST", + // "id": "assuredworkloads.organizations.locations.workloads.restrictAllowedResources", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "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", + // "path": "v1beta1/{+name}:restrictAllowedResources", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1275,117 +2740,125 @@ func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOpti } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} +// method id "assuredworkloads.organizations.locations.workloads.organizations.locations.workloads.analyzeWorkloadMove": -// method id "assuredworkloads.organizations.locations.workloads.create": - -type OrganizationsLocationsWorkloadsCreateCall struct { - s *Service - parent string - googlecloudassuredworkloadsv1beta1workload *GoogleCloudAssuredworkloadsV1beta1Workload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall struct { + s *Service + source string + target string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates Assured Workload. -func (r *OrganizationsLocationsWorkloadsService) Create(parent string, googlecloudassuredworkloadsv1beta1workload *GoogleCloudAssuredworkloadsV1beta1Workload) *OrganizationsLocationsWorkloadsCreateCall { - c := &OrganizationsLocationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudassuredworkloadsv1beta1workload = googlecloudassuredworkloadsv1beta1workload +// AnalyzeWorkloadMove: Analyzes a hypothetical move of a source project +// or project-based workload to a target (destination) folder-based +// workload. +// +// - source: The source type is a project-based workload. Specify the +// workloads's relative resource name, formatted as: +// "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{ +// WORKLOAD_ID}" For example: +// "organizations/123/locations/us-east1/workloads/assured-workload-1". +// - target: The resource ID of the folder-based destination workload. +// This workload is where the source project will hypothetically be +// moved to. Specify the workload's relative resource name, formatted +// as: +// "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{ +// WORKLOAD_ID}" For example: +// "organizations/123/locations/us-east1/workloads/assured-workload-2". +func (r *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsService) AnalyzeWorkloadMove(source string, target string) *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c := &OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.source = source + c.target = target return c } -// ExternalId sets the optional parameter "externalId": A identifier -// associated with the workload and underlying projects which allows for -// the break down of billing costs for a workload. The value provided -// for the identifier will add a label to the workload and contained -// projects with the identifier as the value. -func (c *OrganizationsLocationsWorkloadsCreateCall) ExternalId(externalId string) *OrganizationsLocationsWorkloadsCreateCall { - c.urlParams_.Set("externalId", externalId) +// Project sets the optional parameter "project": The source type is a +// project. Specify the project's relative resource name, formatted as +// either a project number or a project ID: "projects/{PROJECT_NUMBER}" +// or "projects/{PROJECT_ID}" For example: "projects/951040570662" when +// specifying a project number, or "projects/my-project-123" when +// specifying a project ID. +func (c *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Project(project string) *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.urlParams_.Set("project", project) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsCreateCall { +func (c *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsCreateCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsCreateCall { +func (c *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsCreateCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201111") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1beta1workload) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/workloads") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+source}/{+target}:analyzeWorkloadMove") 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, + "source": c.source, + "target": c.target, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "assuredworkloads.organizations.locations.workloads.organizations.locations.workloads.analyzeWorkloadMove" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse.ServerR +// esponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsWorkloadsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1404,7 +2877,7 @@ func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1416,33 +2889,38 @@ func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Creates Assured Workload.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads", - // "httpMethod": "POST", - // "id": "assuredworkloads.organizations.locations.workloads.create", + // "description": "Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/organizations/{organizationsId1}/locations/{locationsId1}/workloads/{workloadsId1}:analyzeWorkloadMove", + // "httpMethod": "GET", + // "id": "assuredworkloads.organizations.locations.workloads.organizations.locations.workloads.analyzeWorkloadMove", // "parameterOrder": [ - // "parent" + // "source", + // "target" // ], // "parameters": { - // "externalId": { - // "description": "Optional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the identifier will add a label to the workload and contained projects with the identifier as the value.", + // "project": { + // "description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`.", + // "source": { + // "description": "The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-1\"", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "target": { + // "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/workloads", - // "request": { - // "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" - // }, + // "path": "v1beta1/{+source}/{+target}:analyzeWorkloadMove", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1451,36 +2929,37 @@ func (c *OrganizationsLocationsWorkloadsCreateCall) Do(opts ...googleapi.CallOpt } -// method id "assuredworkloads.organizations.locations.workloads.delete": +// method id "assuredworkloads.organizations.locations.workloads.violations.acknowledge": -type OrganizationsLocationsWorkloadsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsWorkloadsViolationsAcknowledgeCall struct { + s *Service + name string + googlecloudassuredworkloadsv1beta1acknowledgeviolationrequest *GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the workload. Make sure that workload's direct -// children are already in a deleted state, otherwise the request will -// fail with a FAILED_PRECONDITION error. -func (r *OrganizationsLocationsWorkloadsService) Delete(name string) *OrganizationsLocationsWorkloadsDeleteCall { - c := &OrganizationsLocationsWorkloadsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Acknowledge: Acknowledges an existing violation. By acknowledging a +// violation, users acknowledge the existence of a compliance violation +// in their workload and decide to ignore it due to a valid business +// justification. Acknowledgement is a permanent operation and it cannot +// be reverted. +// +// - name: The resource name of the Violation to acknowledge. Format: +// organizations/{organization}/locations/{location}/workloads/{workloa +// d}/violations/{violation}. +func (r *OrganizationsLocationsWorkloadsViolationsService) Acknowledge(name string, googlecloudassuredworkloadsv1beta1acknowledgeviolationrequest *GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall { + c := &OrganizationsLocationsWorkloadsViolationsAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// Etag sets the optional parameter "etag": The etag of the workload. If -// this is provided, it must match the server's etag. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Etag(etag string) *OrganizationsLocationsWorkloadsDeleteCall { - c.urlParams_.Set("etag", etag) + c.googlecloudassuredworkloadsv1beta1acknowledgeviolationrequest = googlecloudassuredworkloadsv1beta1acknowledgeviolationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsDeleteCall { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1488,33 +2967,38 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsDeleteCall { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201111") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1beta1acknowledgeviolationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:acknowledge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -1525,14 +3009,17 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "assuredworkloads.organizations.locations.workloads.violations.acknowledge" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse.Server +// Response.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsWorkloadsViolationsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1551,7 +3038,7 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1563,30 +3050,28 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", - // "httpMethod": "DELETE", - // "id": "assuredworkloads.organizations.locations.workloads.delete", + // "description": "Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid business justification. Acknowledgement is a permanent operation and it cannot be reverted.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}:acknowledge", + // "httpMethod": "POST", + // "id": "assuredworkloads.organizations.locations.workloads.violations.acknowledge", // "parameterOrder": [ // "name" // ], // "parameters": { - // "etag": { - // "description": "Optional. The etag of the workload. If this is provided, it must match the server's etag.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}", + // "description": "Required. The resource name of the Violation to acknowledge. Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+name}:acknowledge", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1595,9 +3080,9 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOpt } -// method id "assuredworkloads.organizations.locations.workloads.get": +// method id "assuredworkloads.organizations.locations.workloads.violations.get": -type OrganizationsLocationsWorkloadsGetCall struct { +type OrganizationsLocationsWorkloadsViolationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1606,9 +3091,14 @@ type OrganizationsLocationsWorkloadsGetCall struct { header_ http.Header } -// Get: Gets Assured Workload associated with a CRM Node -func (r *OrganizationsLocationsWorkloadsService) Get(name string) *OrganizationsLocationsWorkloadsGetCall { - c := &OrganizationsLocationsWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Get: Retrieves Assured Workload Violation based on ID. +// +// - name: The resource name of the Violation to fetch (ie. +// Violation.name). Format: +// organizations/{organization}/locations/{location}/workloads/{workloa +// d}/violations/{violation}. +func (r *OrganizationsLocationsWorkloadsViolationsService) Get(name string) *OrganizationsLocationsWorkloadsViolationsGetCall { + c := &OrganizationsLocationsWorkloadsViolationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -1616,7 +3106,7 @@ func (r *OrganizationsLocationsWorkloadsService) Get(name string) *Organizations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsGetCall { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1626,7 +3116,7 @@ func (c *OrganizationsLocationsWorkloadsGetCall) Fields(s ...googleapi.Field) *O // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsWorkloadsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsGetCall { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsViolationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1634,23 +3124,23 @@ func (c *OrganizationsLocationsWorkloadsGetCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsGetCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsGetCall { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsGetCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201111") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -1674,16 +3164,16 @@ func (c *OrganizationsLocationsWorkloadsGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.get" call. -// Exactly one of *GoogleCloudAssuredworkloadsV1beta1Workload or error +// Do executes the "assuredworkloads.organizations.locations.workloads.violations.get" call. +// Exactly one of *GoogleCloudAssuredworkloadsV1beta1Violation or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudAssuredworkloadsV1beta1Workload.ServerResponse.Header or +// *GoogleCloudAssuredworkloadsV1beta1Violation.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1Workload, error) { +func (c *OrganizationsLocationsWorkloadsViolationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1Violation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1702,7 +3192,7 @@ func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudAssuredworkloadsV1beta1Workload{ + ret := &GoogleCloudAssuredworkloadsV1beta1Violation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1714,25 +3204,25 @@ func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets Assured Workload associated with a CRM Node", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", + // "description": "Retrieves Assured Workload Violation based on ID.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}", // "httpMethod": "GET", - // "id": "assuredworkloads.organizations.locations.workloads.get", + // "id": "assuredworkloads.organizations.locations.workloads.violations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", + // "description": "Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta1/{+name}", // "response": { - // "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + // "$ref": "GoogleCloudAssuredworkloadsV1beta1Violation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1741,9 +3231,9 @@ func (c *OrganizationsLocationsWorkloadsGetCall) Do(opts ...googleapi.CallOption } -// method id "assuredworkloads.organizations.locations.workloads.list": +// method id "assuredworkloads.organizations.locations.workloads.violations.list": -type OrganizationsLocationsWorkloadsListCall struct { +type OrganizationsLocationsWorkloadsViolationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -1752,32 +3242,51 @@ type OrganizationsLocationsWorkloadsListCall struct { header_ http.Header } -// List: Lists Assured Workloads under a CRM Node. -func (r *OrganizationsLocationsWorkloadsService) List(parent string) *OrganizationsLocationsWorkloadsListCall { - c := &OrganizationsLocationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// List: Lists the Violations in the AssuredWorkload Environment. +// Callers may also choose to read across multiple Workloads as per +// AIP-159 (https://google.aip.dev/159) by using '-' (the hyphen or dash +// character) as a wildcard character instead of workload-id in the +// parent. Format +// `organizations/{org_id}/locations/{location}/workloads/-` +// +// - parent: The Workload name. Format +// `organizations/{org_id}/locations/{location}/workloads/{workload}`. +func (r *OrganizationsLocationsWorkloadsViolationsService) List(parent string) *OrganizationsLocationsWorkloadsViolationsListCall { + c := &OrganizationsLocationsWorkloadsViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": A custom filter for -// filtering by properties of a workload. At this time, only filtering -// by labels is supported. -func (c *OrganizationsLocationsWorkloadsListCall) Filter(filter string) *OrganizationsLocationsWorkloadsListCall { +// filtering by the Violations properties. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Filter(filter string) *OrganizationsLocationsWorkloadsViolationsListCall { c.urlParams_.Set("filter", filter) return c } +// IntervalEndTime sets the optional parameter "interval.endTime": The +// end of the time window. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) IntervalEndTime(intervalEndTime string) *OrganizationsLocationsWorkloadsViolationsListCall { + c.urlParams_.Set("interval.endTime", intervalEndTime) + return c +} + +// IntervalStartTime sets the optional parameter "interval.startTime": +// The start of the time window. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) IntervalStartTime(intervalStartTime string) *OrganizationsLocationsWorkloadsViolationsListCall { + c.urlParams_.Set("interval.startTime", intervalStartTime) + return c +} + // PageSize sets the optional parameter "pageSize": Page size. -func (c *OrganizationsLocationsWorkloadsListCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsListCall { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsWorkloadsViolationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token -// returned from previous request. Page token contains context from -// previous request. Page token needs to be passed in the second and -// following requests. -func (c *OrganizationsLocationsWorkloadsListCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsListCall { +// returned from previous request. +func (c *OrganizationsLocationsWorkloadsViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsWorkloadsViolationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1785,7 +3294,7 @@ func (c *OrganizationsLocationsWorkloadsListCall) PageToken(pageToken string) *O // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsListCall { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsViolationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1795,7 +3304,7 @@ func (c *OrganizationsLocationsWorkloadsListCall) Fields(s ...googleapi.Field) * // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsWorkloadsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsListCall { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsWorkloadsViolationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1803,23 +3312,23 @@ func (c *OrganizationsLocationsWorkloadsListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsListCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsListCall { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsViolationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsListCall) Header() http.Header { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201111") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -1830,7 +3339,7 @@ func (c *OrganizationsLocationsWorkloadsListCall) 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, "v1beta1/{+parent}/workloads") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/violations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1843,17 +3352,17 @@ func (c *OrganizationsLocationsWorkloadsListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.list" call. +// Do executes the "assuredworkloads.organizations.locations.workloads.violations.list" call. // Exactly one of -// *GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse or error +// *GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// *GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse.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 *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse, error) { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1872,7 +3381,7 @@ func (c *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse{ + ret := &GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1884,41 +3393,53 @@ func (c *OrganizationsLocationsWorkloadsListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Lists Assured Workloads under a CRM Node.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads", + // "description": "Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations", // "httpMethod": "GET", - // "id": "assuredworkloads.organizations.locations.workloads.list", + // "id": "assuredworkloads.organizations.locations.workloads.violations.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "filter": { - // "description": "A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported.", + // "description": "Optional. A custom filter for filtering by the Violations properties.", + // "location": "query", + // "type": "string" + // }, + // "interval.endTime": { + // "description": "The end of the time window.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "interval.startTime": { + // "description": "The start of the time window.", + // "format": "google-datetime", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Page size.", + // "description": "Optional. Page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests.", + // "description": "Optional. Page token returned from previous request.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`.", + // "description": "Required. The Workload name. Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/workloads", + // "path": "v1beta1/{+parent}/violations", // "response": { - // "$ref": "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse" + // "$ref": "GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1930,7 +3451,7 @@ func (c *OrganizationsLocationsWorkloadsListCall) 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 *OrganizationsLocationsWorkloadsListCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse) error) error { +func (c *OrganizationsLocationsWorkloadsViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -1948,98 +3469,125 @@ func (c *OrganizationsLocationsWorkloadsListCall) Pages(ctx context.Context, f f } } -// method id "assuredworkloads.organizations.locations.workloads.patch": +// method id "assuredworkloads.projects.organizations.locations.workloads.analyzeWorkloadMove": -type OrganizationsLocationsWorkloadsPatchCall struct { - s *Service - name string - googlecloudassuredworkloadsv1beta1workload *GoogleCloudAssuredworkloadsV1beta1Workload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall struct { + s *Service + project string + target string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing workload. Currently allows updating of -// workload display_name and labels. For force updates don't set etag -// field in the Workload. Only one update operation per workload can be -// in progress. -func (r *OrganizationsLocationsWorkloadsService) Patch(name string, googlecloudassuredworkloadsv1beta1workload *GoogleCloudAssuredworkloadsV1beta1Workload) *OrganizationsLocationsWorkloadsPatchCall { - c := &OrganizationsLocationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudassuredworkloadsv1beta1workload = googlecloudassuredworkloadsv1beta1workload +// AnalyzeWorkloadMove: Analyzes a hypothetical move of a source project +// or project-based workload to a target (destination) folder-based +// workload. +// +// - project: The source type is a project. Specify the project's +// relative resource name, formatted as either a project number or a +// project ID: "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}" +// For example: "projects/951040570662" when specifying a project +// number, or "projects/my-project-123" when specifying a project ID. +// - target: The resource ID of the folder-based destination workload. +// This workload is where the source project will hypothetically be +// moved to. Specify the workload's relative resource name, formatted +// as: +// "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{ +// WORKLOAD_ID}" For example: +// "organizations/123/locations/us-east1/workloads/assured-workload-2". +func (r *ProjectsOrganizationsLocationsWorkloadsService) AnalyzeWorkloadMove(project string, target string) *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c := &ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.target = target return c } -// UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. -func (c *OrganizationsLocationsWorkloadsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsWorkloadsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Source sets the optional parameter "source": The source type is a +// project-based workload. Specify the workloads's relative resource +// name, formatted as: +// "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WO +// RKLOAD_ID}" For example: +// "organizations/123/locations/us-east1/workloads/assured-workload-1" +func (c *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Source(source string) *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.urlParams_.Set("source", source) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsPatchCall { +func (c *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Fields(s ...googleapi.Field) *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) IfNoneMatch(entityTag string) *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsWorkloadsPatchCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsPatchCall { +func (c *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Context(ctx context.Context) *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsWorkloadsPatchCall) Header() http.Header { +func (c *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsWorkloadsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201111") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1beta1workload) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+project}/{+target}:analyzeWorkloadMove") 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{ - "name": c.name, + "project": c.project, + "target": c.target, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "assuredworkloads.organizations.locations.workloads.patch" call. -// Exactly one of *GoogleCloudAssuredworkloadsV1beta1Workload or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "assuredworkloads.projects.organizations.locations.workloads.analyzeWorkloadMove" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudAssuredworkloadsV1beta1Workload.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse.ServerR +// esponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1Workload, error) { +func (c *ProjectsOrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2058,7 +3606,7 @@ func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudAssuredworkloadsV1beta1Workload{ + ret := &GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2070,34 +3618,38 @@ func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress.", - // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", - // "httpMethod": "PATCH", - // "id": "assuredworkloads.organizations.locations.workloads.patch", + // "description": "Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload.", + // "flatPath": "v1beta1/projects/{projectsId}/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove", + // "httpMethod": "GET", + // "id": "assuredworkloads.projects.organizations.locations.workloads.analyzeWorkloadMove", // "parameterOrder": [ - // "name" + // "project", + // "target" // ], // "parameters": { - // "name": { - // "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", + // "project": { + // "description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "Required. The list of fields to be updated.", - // "format": "google-fieldmask", + // "source": { + // "description": "The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-1\"", // "location": "query", // "type": "string" + // }, + // "target": { + // "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta1/{+name}", - // "request": { - // "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" - // }, + // "path": "v1beta1/{+project}/{+target}:analyzeWorkloadMove", // "response": { - // "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + // "$ref": "GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/baremetalsolution/v1/baremetalsolution-api.json b/baremetalsolution/v1/baremetalsolution-api.json index 240f392acf9..2890e6620d4 100644 --- a/baremetalsolution/v1/baremetalsolution-api.json +++ b/baremetalsolution/v1/baremetalsolution-api.json @@ -226,49 +226,9 @@ ] } } - }, - "projects": { - "resources": { - "locations": { - "resources": { - "instances": { - "methods": { - "resetInstance": { - "description": "Perform an ungraceful, hard reset on a machine (equivalent to shutting the power off, and then turning it back on).", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:resetInstance", - "httpMethod": "POST", - "id": "baremetalsolution.projects.locations.instances.resetInstance", - "parameterOrder": [ - "instance" - ], - "parameters": { - "instance": { - "description": "Required. Name of the instance to reset.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+instance}:resetInstance", - "request": { - "$ref": "ResetInstanceRequest" - }, - "response": { - "$ref": "ResetInstanceResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } } }, - "revision": "20220322", + "revision": "20220921", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -336,18 +296,6 @@ }, "type": "object" }, - "ResetInstanceRequest": { - "description": "Request for ResetInstance.", - "id": "ResetInstanceRequest", - "properties": {}, - "type": "object" - }, - "ResetInstanceResponse": { - "description": "Response for ResetInstance.", - "id": "ResetInstanceResponse", - "properties": {}, - "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", diff --git a/baremetalsolution/v1/baremetalsolution-gen.go b/baremetalsolution/v1/baremetalsolution-gen.go index 1d76f5d8ab2..8276521a7a4 100644 --- a/baremetalsolution/v1/baremetalsolution-gen.go +++ b/baremetalsolution/v1/baremetalsolution-gen.go @@ -119,7 +119,6 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Operations = NewOperationsService(s) - s.Projects = NewProjectsService(s) return s, nil } @@ -129,8 +128,6 @@ type Service struct { UserAgent string // optional additional User-Agent fragment Operations *OperationsService - - Projects *ProjectsService } func (s *Service) userAgent() string { @@ -149,39 +146,6 @@ type OperationsService struct { s *Service } -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Locations = NewProjectsLocationsService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Locations *ProjectsLocationsService -} - -func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { - rs := &ProjectsLocationsService{s: s} - rs.Instances = NewProjectsLocationsInstancesService(s) - return rs -} - -type ProjectsLocationsService struct { - s *Service - - Instances *ProjectsLocationsInstancesService -} - -func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService { - rs := &ProjectsLocationsInstancesService{s: s} - return rs -} - -type ProjectsLocationsInstancesService struct { - s *Service -} - // CancelOperationRequest: The request message for // Operations.CancelOperation. type CancelOperationRequest struct { @@ -297,17 +261,6 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResetInstanceRequest: Request for ResetInstance. -type ResetInstanceRequest struct { -} - -// ResetInstanceResponse: Response for ResetInstance. -type ResetInstanceResponse struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - // 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 @@ -998,146 +951,3 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsRe c.PageToken(x.NextPageToken) } } - -// method id "baremetalsolution.projects.locations.instances.resetInstance": - -type ProjectsLocationsInstancesResetInstanceCall struct { - s *Service - instance string - resetinstancerequest *ResetInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResetInstance: Perform an ungraceful, hard reset on a machine -// (equivalent to shutting the power off, and then turning it back on). -// -// - instance: Name of the instance to reset. -func (r *ProjectsLocationsInstancesService) ResetInstance(instance string, resetinstancerequest *ResetInstanceRequest) *ProjectsLocationsInstancesResetInstanceCall { - c := &ProjectsLocationsInstancesResetInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.instance = instance - c.resetinstancerequest = resetinstancerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsInstancesResetInstanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesResetInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsInstancesResetInstanceCall) Context(ctx context.Context) *ProjectsLocationsInstancesResetInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsInstancesResetInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsInstancesResetInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetinstancerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+instance}:resetInstance") - 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{ - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "baremetalsolution.projects.locations.instances.resetInstance" call. -// Exactly one of *ResetInstanceResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ResetInstanceResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesResetInstanceCall) Do(opts ...googleapi.CallOption) (*ResetInstanceResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ResetInstanceResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Perform an ungraceful, hard reset on a machine (equivalent to shutting the power off, and then turning it back on).", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:resetInstance", - // "httpMethod": "POST", - // "id": "baremetalsolution.projects.locations.instances.resetInstance", - // "parameterOrder": [ - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Required. Name of the instance to reset.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+instance}:resetInstance", - // "request": { - // "$ref": "ResetInstanceRequest" - // }, - // "response": { - // "$ref": "ResetInstanceResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/baremetalsolution/v2/baremetalsolution-api.json b/baremetalsolution/v2/baremetalsolution-api.json index b6f1bb323bd..c97f9befd45 100644 --- a/baremetalsolution/v2/baremetalsolution-api.json +++ b/baremetalsolution/v2/baremetalsolution-api.json @@ -263,6 +263,62 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "disableInteractiveSerialConsole": { + "description": "Disable the interactive serial console feature on an instance.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:disableInteractiveSerialConsole", + "httpMethod": "POST", + "id": "baremetalsolution.projects.locations.instances.disableInteractiveSerialConsole", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:disableInteractiveSerialConsole", + "request": { + "$ref": "DisableInteractiveSerialConsoleRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "enableInteractiveSerialConsole": { + "description": "Enable the interactive serial console feature on an instance.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:enableInteractiveSerialConsole", + "httpMethod": "POST", + "id": "baremetalsolution.projects.locations.instances.enableInteractiveSerialConsole", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:enableInteractiveSerialConsole", + "request": { + "$ref": "EnableInteractiveSerialConsoleRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Get details about a single server.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", @@ -559,7 +615,7 @@ "type": "string" }, "updateMask": { - "description": "The list of fields to update. The only currently supported fields are: `labels`, `reservations`", + "description": "The list of fields to update. The only currently supported fields are: `labels`, `reservations`, `vrf.vlan_attachments`", "format": "google-fieldmask", "location": "query", "type": "string" @@ -839,7 +895,7 @@ "type": "string" }, "name": { - "description": "Output only. The name of the provisioning config.", + "description": "Output only. The system-generated name of the provisioning config. This follows the UUID format.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+$", "required": true, @@ -933,6 +989,104 @@ } } }, + "sshKeys": { + "methods": { + "create": { + "description": "Register a public SSH key in the specified project for use with the interactive serial console feature.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/sshKeys", + "httpMethod": "POST", + "id": "baremetalsolution.projects.locations.sshKeys.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent containing the SSH keys.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "sshKeyId": { + "description": "Required. The ID to use for the key, which will become the final component of the key's resource name. This value must match the regex: [a-zA-Z0-9@.\\-_]{1,64}", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+parent}/sshKeys", + "request": { + "$ref": "SSHKey" + }, + "response": { + "$ref": "SSHKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a public SSH key registered in the specified project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/sshKeys/{sshKeysId}", + "httpMethod": "DELETE", + "id": "baremetalsolution.projects.locations.sshKeys.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the SSH key to delete. Currently, the only valid value for the location is \"global\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sshKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/sshKeys", + "httpMethod": "GET", + "id": "baremetalsolution.projects.locations.sshKeys.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent containing the SSH keys. Currently, the only valid value for the location is \"global\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/sshKeys", + "response": { + "$ref": "ListSSHKeysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "volumes": { "methods": { "get": { @@ -1137,7 +1291,7 @@ } } }, - "revision": "20220829", + "revision": "20220921", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { "AllowedClient": { @@ -1206,6 +1360,24 @@ }, "type": "object" }, + "DisableInteractiveSerialConsoleRequest": { + "description": "Message for disabling the interactive serial console on an instance.", + "id": "DisableInteractiveSerialConsoleRequest", + "properties": {}, + "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" + }, + "EnableInteractiveSerialConsoleRequest": { + "description": "Message for enabling the interactive serial console on an instance.", + "id": "EnableInteractiveSerialConsoleRequest", + "properties": {}, + "type": "object" + }, "FetchInstanceProvisioningSettingsResponse": { "description": "Response with all provisioning settings.", "id": "FetchInstanceProvisioningSettingsResponse", @@ -1356,13 +1528,21 @@ "STATE_UNSPECIFIED", "PROVISIONING", "RUNNING", - "DELETED" + "DELETED", + "UPDATING", + "STARTING", + "STOPPING", + "SHUTDOWN" ], "enumDescriptions": [ "The server is in an unknown state.", "The server is being provisioned.", "The server is running.", - "The server has been deleted." + "The server has been deleted.", + "The server is being updated.", + "The server is starting.", + "The server is stopping.", + "The server is shutdown." ], "readOnly": true, "type": "string" @@ -1646,6 +1826,24 @@ }, "type": "object" }, + "ListSSHKeysResponse": { + "description": "Message for response of ListSSHKeys.", + "id": "ListSSHKeysResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "sshKeys": { + "description": "The SSH keys registered in the project.", + "items": { + "$ref": "SSHKey" + }, + "type": "array" + } + }, + "type": "object" + }, "ListVolumesResponse": { "description": "Response message containing the list of storage volumes.", "id": "ListVolumesResponse", @@ -1848,6 +2046,11 @@ "description": "The cidr of the Network.", "type": "string" }, + "gatewayIp": { + "description": "Output only. Gateway ip address.", + "readOnly": true, + "type": "string" + }, "id": { "description": "An identifier for the `Network`, generated by the backend.", "type": "string" @@ -1908,13 +2111,15 @@ "STATE_UNSPECIFIED", "PROVISIONING", "PROVISIONED", - "DEPROVISIONING" + "DEPROVISIONING", + "UPDATING" ], "enumDescriptions": [ "The Network is in an unknown state.", "The Network is provisioning.", "The Network has been provisioned.", - "The Network is being deprovisioned." + "The Network is being deprovisioned.", + "The Network is being updated." ], "type": "string" }, @@ -2360,6 +2565,10 @@ "readOnly": true, "type": "string" }, + "customId": { + "description": "Optional. The user-defined identifier of the provisioning config.", + "type": "string" + }, "email": { "description": "Email provided to send a confirmation with provisioning config to. Deprecated in favour of email field in request messages.", "type": "string" @@ -2380,7 +2589,7 @@ "type": "string" }, "name": { - "description": "Output only. The name of the provisioning config.", + "description": "Output only. The system-generated name of the provisioning config. This follows the UUID format.", "readOnly": true, "type": "string" }, @@ -2534,6 +2743,22 @@ }, "type": "object" }, + "SSHKey": { + "description": "An SSH key, used for authorizing with the interactive serial console feature.", + "id": "SSHKey", + "properties": { + "name": { + "description": "Output only. The name of this SSH key. Currently, the only valid value for the location is \"global\".", + "readOnly": true, + "type": "string" + }, + "publicKey": { + "description": "The public SSH key. This must be in OpenSSH .authorized_keys format.", + "type": "string" + } + }, + "type": "object" + }, "ServerNetworkTemplate": { "description": "Network template.", "id": "ServerNetworkTemplate", @@ -2779,12 +3004,14 @@ "enum": [ "VOLUME_PERFORMANCE_TIER_UNSPECIFIED", "VOLUME_PERFORMANCE_TIER_SHARED", - "VOLUME_PERFORMANCE_TIER_DEDICATED" + "VOLUME_PERFORMANCE_TIER_ASSIGNED", + "VOLUME_PERFORMANCE_TIER_HT" ], "enumDescriptions": [ "Value is not specified.", "Regular volumes, shared aggregates.", - "Dedicated (assigned) aggregates." + "Assigned aggregates.", + "High throughput aggregates." ], "type": "string" }, @@ -2851,13 +3078,15 @@ "STATE_UNSPECIFIED", "CREATING", "READY", - "DELETING" + "DELETING", + "UPDATING" ], "enumDescriptions": [ "The storage volume is in an unknown state.", "The storage volume is being created.", "The storage volume is ready for use.", - "The storage volume has been requested to be deleted." + "The storage volume has been requested to be deleted.", + "The storage volume is being updated." ], "type": "string" }, @@ -2921,12 +3150,14 @@ "enum": [ "VOLUME_PERFORMANCE_TIER_UNSPECIFIED", "VOLUME_PERFORMANCE_TIER_SHARED", - "VOLUME_PERFORMANCE_TIER_DEDICATED" + "VOLUME_PERFORMANCE_TIER_ASSIGNED", + "VOLUME_PERFORMANCE_TIER_HT" ], "enumDescriptions": [ "Value is not specified.", "Regular volumes, shared aggregates.", - "Dedicated (assigned) aggregates." + "Assigned aggregates.", + "High throughput aggregates." ], "type": "string" }, diff --git a/baremetalsolution/v2/baremetalsolution-gen.go b/baremetalsolution/v2/baremetalsolution-gen.go index bca7aaaf12a..4c98d5e4bf7 100644 --- a/baremetalsolution/v2/baremetalsolution-gen.go +++ b/baremetalsolution/v2/baremetalsolution-gen.go @@ -158,6 +158,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Operations = NewProjectsLocationsOperationsService(s) rs.ProvisioningConfigs = NewProjectsLocationsProvisioningConfigsService(s) rs.ProvisioningQuotas = NewProjectsLocationsProvisioningQuotasService(s) + rs.SshKeys = NewProjectsLocationsSshKeysService(s) rs.Volumes = NewProjectsLocationsVolumesService(s) return rs } @@ -179,6 +180,8 @@ type ProjectsLocationsService struct { ProvisioningQuotas *ProjectsLocationsProvisioningQuotasService + SshKeys *ProjectsLocationsSshKeysService + Volumes *ProjectsLocationsVolumesService } @@ -245,6 +248,15 @@ type ProjectsLocationsProvisioningQuotasService struct { s *Service } +func NewProjectsLocationsSshKeysService(s *Service) *ProjectsLocationsSshKeysService { + rs := &ProjectsLocationsSshKeysService{s: s} + return rs +} + +type ProjectsLocationsSshKeysService struct { + s *Service +} + func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService { rs := &ProjectsLocationsVolumesService{s: s} rs.Luns = NewProjectsLocationsVolumesLunsService(s) @@ -359,6 +371,27 @@ func (s *DetachLunRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DisableInteractiveSerialConsoleRequest: Message for disabling the +// interactive serial console on an instance. +type DisableInteractiveSerialConsoleRequest struct { +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// EnableInteractiveSerialConsoleRequest: Message for enabling the +// interactive serial console on an instance. +type EnableInteractiveSerialConsoleRequest struct { +} + // FetchInstanceProvisioningSettingsResponse: Response with all // provisioning settings. type FetchInstanceProvisioningSettingsResponse struct { @@ -547,6 +580,10 @@ type Instance struct { // "PROVISIONING" - The server is being provisioned. // "RUNNING" - The server is running. // "DELETED" - The server has been deleted. + // "UPDATING" - The server is being updated. + // "STARTING" - The server is starting. + // "STOPPING" - The server is stopping. + // "SHUTDOWN" - The server is shutdown. State string `json:"state,omitempty"` // UpdateTime: Output only. Update a time stamp. @@ -1002,6 +1039,42 @@ func (s *ListProvisioningQuotasResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListSSHKeysResponse: Message for response of ListSSHKeys. +type ListSSHKeysResponse struct { + // 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"` + + // SshKeys: The SSH keys registered in the project. + SshKeys []*SSHKey `json:"sshKeys,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListSSHKeysResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSSHKeysResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListVolumesResponse: Response message containing the list of storage // volumes. type ListVolumesResponse struct { @@ -1255,6 +1328,9 @@ type Network struct { // Cidr: The cidr of the Network. Cidr string `json:"cidr,omitempty"` + // GatewayIp: Output only. Gateway ip address. + GatewayIp string `json:"gatewayIp,omitempty"` + // Id: An identifier for the `Network`, generated by the backend. Id string `json:"id,omitempty"` @@ -1299,6 +1375,7 @@ type Network struct { // "PROVISIONING" - The Network is provisioning. // "PROVISIONED" - The Network has been provisioned. // "DEPROVISIONING" - The Network is being deprovisioned. + // "UPDATING" - The Network is being updated. State string `json:"state,omitempty"` // Type: The type of this network. @@ -1867,6 +1944,10 @@ type ProvisioningConfig struct { // provisioning config. CloudConsoleUri string `json:"cloudConsoleUri,omitempty"` + // CustomId: Optional. The user-defined identifier of the provisioning + // config. + CustomId string `json:"customId,omitempty"` + // Email: Email provided to send a confirmation with provisioning config // to. Deprecated in favour of email field in request messages. Email string `json:"email,omitempty"` @@ -1882,7 +1963,8 @@ type ProvisioningConfig struct { // optional only for Intake UI transition period. Location string `json:"location,omitempty"` - // Name: Output only. The name of the provisioning config. + // Name: Output only. The system-generated name of the provisioning + // config. This follows the UUID format. Name string `json:"name,omitempty"` // Networks: Networks to be created. @@ -2083,6 +2165,44 @@ func (s *ResizeVolumeRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SSHKey: An SSH key, used for authorizing with the interactive serial +// console feature. +type SSHKey struct { + // Name: Output only. The name of this SSH key. Currently, the only + // valid value for the location is "global". + Name string `json:"name,omitempty"` + + // PublicKey: The public SSH key. This must be in OpenSSH + // .authorized_keys format. + PublicKey string `json:"publicKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SSHKey) MarshalJSON() ([]byte, error) { + type NoMethod SSHKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ServerNetworkTemplate: Network template. type ServerNetworkTemplate struct { // ApplicableInstanceTypes: Instance types this template is applicable @@ -2431,8 +2551,8 @@ type Volume struct { // "VOLUME_PERFORMANCE_TIER_UNSPECIFIED" - Value is not specified. // "VOLUME_PERFORMANCE_TIER_SHARED" - Regular volumes, shared // aggregates. - // "VOLUME_PERFORMANCE_TIER_DEDICATED" - Dedicated (assigned) - // aggregates. + // "VOLUME_PERFORMANCE_TIER_ASSIGNED" - Assigned aggregates. + // "VOLUME_PERFORMANCE_TIER_HT" - High throughput aggregates. PerformanceTier string `json:"performanceTier,omitempty"` // Pod: Immutable. Pod name. @@ -2484,6 +2604,7 @@ type Volume struct { // "CREATING" - The storage volume is being created. // "READY" - The storage volume is ready for use. // "DELETING" - The storage volume has been requested to be deleted. + // "UPDATING" - The storage volume is being updated. State string `json:"state,omitempty"` // StorageType: The storage type for this volume. @@ -2554,8 +2675,8 @@ type VolumeConfig struct { // "VOLUME_PERFORMANCE_TIER_UNSPECIFIED" - Value is not specified. // "VOLUME_PERFORMANCE_TIER_SHARED" - Regular volumes, shared // aggregates. - // "VOLUME_PERFORMANCE_TIER_DEDICATED" - Dedicated (assigned) - // aggregates. + // "VOLUME_PERFORMANCE_TIER_ASSIGNED" - Assigned aggregates. + // "VOLUME_PERFORMANCE_TIER_HT" - High throughput aggregates. PerformanceTier string `json:"performanceTier,omitempty"` // Protocol: Volume protocol. @@ -3396,77 +3517,71 @@ func (c *ProjectsLocationsInstancesDetachLunCall) Do(opts ...googleapi.CallOptio } -// method id "baremetalsolution.projects.locations.instances.get": +// method id "baremetalsolution.projects.locations.instances.disableInteractiveSerialConsole": -type ProjectsLocationsInstancesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall struct { + s *Service + name string + disableinteractiveserialconsolerequest *DisableInteractiveSerialConsoleRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get details about a single server. +// DisableInteractiveSerialConsole: Disable the interactive serial +// console feature on an instance. // // - name: Name of the resource. -func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall { - c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInstancesService) DisableInteractiveSerialConsole(name string, disableinteractiveserialconsolerequest *DisableInteractiveSerialConsoleRequest) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall { + c := &ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.disableinteractiveserialconsolerequest = disableinteractiveserialconsolerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall { +func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall { +func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Context(ctx context.Context) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInstancesGetCall) Header() http.Header { +func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disableinteractiveserialconsolerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:disableInteractiveSerialConsole") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -3477,14 +3592,14 @@ func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.instances.get" call. -// Exactly one of *Instance or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Instance.ServerResponse.Header or (if a response was returned at +// Do executes the "baremetalsolution.projects.locations.instances.disableInteractiveSerialConsole" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { +func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3503,7 +3618,7 @@ func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*I if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Instance{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3515,10 +3630,10 @@ func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*I } return ret, nil // { - // "description": "Get details about a single server.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", - // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.instances.get", + // "description": "Disable the interactive serial console feature on an instance.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:disableInteractiveSerialConsole", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.instances.disableInteractiveSerialConsole", // "parameterOrder": [ // "name" // ], @@ -3531,9 +3646,12 @@ func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*I // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+name}:disableInteractiveSerialConsole", + // "request": { + // "$ref": "DisableInteractiveSerialConsoleRequest" + // }, // "response": { - // "$ref": "Instance" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3542,116 +3660,89 @@ func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*I } -// method id "baremetalsolution.projects.locations.instances.list": +// method id "baremetalsolution.projects.locations.instances.enableInteractiveSerialConsole": -type ProjectsLocationsInstancesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall struct { + s *Service + name string + enableinteractiveserialconsolerequest *EnableInteractiveSerialConsoleRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: List servers in a given project and location. +// EnableInteractiveSerialConsole: Enable the interactive serial console +// feature on an instance. // -// - parent: Parent value for ListInstancesRequest. -func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall { - c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": List filter. -func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall { - c.urlParams_.Set("filter", filter) - 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 *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results from the server. -func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) EnableInteractiveSerialConsole(name string, enableinteractiveserialconsolerequest *EnableInteractiveSerialConsoleRequest) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall { + c := &ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.enableinteractiveserialconsolerequest = enableinteractiveserialconsolerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall { +func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall { +func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Context(ctx context.Context) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInstancesListCall) Header() http.Header { +func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.enableinteractiveserialconsolerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:enableInteractiveSerialConsole") 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 "baremetalsolution.projects.locations.instances.list" call. -// Exactly one of *ListInstancesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListInstancesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { +// Do executes the "baremetalsolution.projects.locations.instances.enableInteractiveSerialConsole" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3670,7 +3761,7 @@ func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListInstancesResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3682,41 +3773,28 @@ func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "List servers in a given project and location.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances", - // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.instances.list", + // "description": "Enable the interactive serial console feature on an instance.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:enableInteractiveSerialConsole", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.instances.enableInteractiveSerialConsole", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "List filter.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "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": "A token identifying a page of results from the server.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent value for ListInstancesRequest.", + // "name": { + // "description": "Required. Name of the resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/instances", + // "path": "v2/{+name}:enableInteractiveSerialConsole", + // "request": { + // "$ref": "EnableInteractiveSerialConsoleRequest" + // }, // "response": { - // "$ref": "ListInstancesResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3725,63 +3803,825 @@ func (c *ProjectsLocationsInstancesListCall) 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 *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } +// method id "baremetalsolution.projects.locations.instances.get": + +type ProjectsLocationsInstancesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get details about a single server. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall { + c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsInstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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 "baremetalsolution.projects.locations.instances.get" call. +// Exactly one of *Instance or error will be non-nil. 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 *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Instance{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get details about a single server.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.instances.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Instance" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.instances.list": + +type ProjectsLocationsInstancesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List servers in a given project and location. +// +// - parent: Parent value for ListInstancesRequest. +func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall { + c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("filter", filter) + 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 *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results from the server. +func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsInstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/instances") + 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 "baremetalsolution.projects.locations.instances.list" call. +// Exactly one of *ListInstancesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListInstancesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListInstancesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List servers in a given project and location.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.instances.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "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": "A token identifying a page of results from the server.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListInstancesRequest.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/instances", + // "response": { + // "$ref": "ListInstancesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } if err := f(x); err != nil { return err } - if x.NextPageToken == "" { - return nil + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "baremetalsolution.projects.locations.instances.patch": + +type ProjectsLocationsInstancesPatchCall struct { + s *Service + name string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update details of a single server. +// +// - name: Immutable. The resource name of this `Instance`. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. Format: +// `projects/{project}/locations/{location}/instances/{instance}`. +func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall { + c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.instance = instance + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. The currently supported fields are: `labels` +// `hyperthreading_enabled` `os_image` +func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "baremetalsolution.projects.locations.instances.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update details of a single server.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + // "httpMethod": "PATCH", + // "id": "baremetalsolution.projects.locations.instances.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The resource name of this `Instance`. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: `projects/{project}/locations/{location}/instances/{instance}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to update. The currently supported fields are: `labels` `hyperthreading_enabled` `os_image`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.instances.reset": + +type ProjectsLocationsInstancesResetCall struct { + s *Service + name string + resetinstancerequest *ResetInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Reset: Perform an ungraceful, hard reset on a server. Equivalent to +// shutting the power off and then turning it back on. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Reset(name string, resetinstancerequest *ResetInstanceRequest) *ProjectsLocationsInstancesResetCall { + c := &ProjectsLocationsInstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.resetinstancerequest = resetinstancerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsInstancesResetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesResetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsInstancesResetCall) Context(ctx context.Context) *ProjectsLocationsInstancesResetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsInstancesResetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesResetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetinstancerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:reset") + 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 "baremetalsolution.projects.locations.instances.reset" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesResetCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, } - c.PageToken(x.NextPageToken) } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reset", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.instances.reset", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:reset", + // "request": { + // "$ref": "ResetInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "baremetalsolution.projects.locations.instances.patch": +// method id "baremetalsolution.projects.locations.instances.start": -type ProjectsLocationsInstancesPatchCall struct { - s *Service - name string - instance *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInstancesStartCall struct { + s *Service + name string + startinstancerequest *StartInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Update details of a single server. +// Start: Starts a server that was shutdown. // -// - name: Immutable. The resource name of this `Instance`. Resource -// names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. Format: -// `projects/{project}/locations/{location}/instances/{instance}`. -func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall { - c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Start(name string, startinstancerequest *StartInstanceRequest) *ProjectsLocationsInstancesStartCall { + c := &ProjectsLocationsInstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.instance = instance + c.startinstancerequest = startinstancerequest return c } -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to update. The currently supported fields are: `labels` -// `hyperthreading_enabled` `os_image` -func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsInstancesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStartCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsInstancesStartCall) Context(ctx context.Context) *ProjectsLocationsInstancesStartCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsInstancesStartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesStartCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.startinstancerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "baremetalsolution.projects.locations.instances.start" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesStartCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts a server that was shutdown.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:start", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.instances.start", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:start", + // "request": { + // "$ref": "StartInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.instances.stop": + +type ProjectsLocationsInstancesStopCall struct { + s *Service + name string + stopinstancerequest *StopInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stop a running server. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Stop(name string, stopinstancerequest *StopInstanceRequest) *ProjectsLocationsInstancesStopCall { + c := &ProjectsLocationsInstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.stopinstancerequest = stopinstancerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall { +func (c *ProjectsLocationsInstancesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStopCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3789,21 +4629,21 @@ func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall { +func (c *ProjectsLocationsInstancesStopCall) Context(ctx context.Context) *ProjectsLocationsInstancesStopCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header { +func (c *ProjectsLocationsInstancesStopCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInstancesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3811,16 +4651,16 @@ func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopinstancerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}: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 } @@ -3831,14 +4671,14 @@ func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.instances.patch" call. +// Do executes the "baremetalsolution.projects.locations.instances.stop" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3869,31 +4709,25 @@ func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Update details of a single server.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", - // "httpMethod": "PATCH", - // "id": "baremetalsolution.projects.locations.instances.patch", + // "description": "Stop a running server.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:stop", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.instances.stop", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The resource name of this `Instance`. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: `projects/{project}/locations/{location}/instances/{instance}`", + // "description": "Required. Name of the resource.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The list of fields to update. The currently supported fields are: `labels` `hyperthreading_enabled` `os_image`", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+name}:stop", // "request": { - // "$ref": "Instance" + // "$ref": "StopInstanceRequest" // }, // "response": { // "$ref": "Operation" @@ -3905,71 +4739,77 @@ func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) ( } -// method id "baremetalsolution.projects.locations.instances.reset": +// method id "baremetalsolution.projects.locations.networks.get": -type ProjectsLocationsInstancesResetCall struct { - s *Service - name string - resetinstancerequest *ResetInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNetworksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Reset: Perform an ungraceful, hard reset on a server. Equivalent to -// shutting the power off and then turning it back on. +// Get: Get details of a single network. // // - name: Name of the resource. -func (r *ProjectsLocationsInstancesService) Reset(name string, resetinstancerequest *ResetInstanceRequest) *ProjectsLocationsInstancesResetCall { - c := &ProjectsLocationsInstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNetworksService) Get(name string) *ProjectsLocationsNetworksGetCall { + c := &ProjectsLocationsNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.resetinstancerequest = resetinstancerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInstancesResetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesResetCall { +func (c *ProjectsLocationsNetworksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsNetworksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInstancesResetCall) Context(ctx context.Context) *ProjectsLocationsInstancesResetCall { +func (c *ProjectsLocationsNetworksGetCall) Context(ctx context.Context) *ProjectsLocationsNetworksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInstancesResetCall) Header() http.Header { +func (c *ProjectsLocationsNetworksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesResetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNetworksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetinstancerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:reset") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 } @@ -3980,14 +4820,14 @@ func (c *ProjectsLocationsInstancesResetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.instances.reset" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "baremetalsolution.projects.locations.networks.get" call. +// Exactly one of *Network or error will be non-nil. 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 error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsNetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4006,7 +4846,7 @@ func (c *ProjectsLocationsInstancesResetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &Network{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4018,10 +4858,10 @@ func (c *ProjectsLocationsInstancesResetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reset", - // "httpMethod": "POST", - // "id": "baremetalsolution.projects.locations.instances.reset", + // "description": "Get details of a single network.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks/{networksId}", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.networks.get", // "parameterOrder": [ // "name" // ], @@ -4029,17 +4869,14 @@ func (c *ProjectsLocationsInstancesResetCall) Do(opts ...googleapi.CallOption) ( // "name": { // "description": "Required. Name of the resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/networks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:reset", - // "request": { - // "$ref": "ResetInstanceRequest" - // }, + // "path": "v2/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "Network" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4048,88 +4885,116 @@ func (c *ProjectsLocationsInstancesResetCall) Do(opts ...googleapi.CallOption) ( } -// method id "baremetalsolution.projects.locations.instances.start": +// method id "baremetalsolution.projects.locations.networks.list": -type ProjectsLocationsInstancesStartCall struct { - s *Service - name string - startinstancerequest *StartInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNetworksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Start: Starts a server that was shutdown. +// List: List network in a given project and location. // -// - name: Name of the resource. -func (r *ProjectsLocationsInstancesService) Start(name string, startinstancerequest *StartInstanceRequest) *ProjectsLocationsInstancesStartCall { - c := &ProjectsLocationsInstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.startinstancerequest = startinstancerequest +// - parent: Parent value for ListNetworksRequest. +func (r *ProjectsLocationsNetworksService) List(parent string) *ProjectsLocationsNetworksListCall { + c := &ProjectsLocationsNetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsNetworksListCall) Filter(filter string) *ProjectsLocationsNetworksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// server will pick an appropriate default. +func (c *ProjectsLocationsNetworksListCall) PageSize(pageSize int64) *ProjectsLocationsNetworksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results from the server. +func (c *ProjectsLocationsNetworksListCall) PageToken(pageToken string) *ProjectsLocationsNetworksListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInstancesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStartCall { +func (c *ProjectsLocationsNetworksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsNetworksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInstancesStartCall) Context(ctx context.Context) *ProjectsLocationsInstancesStartCall { +func (c *ProjectsLocationsNetworksListCall) Context(ctx context.Context) *ProjectsLocationsNetworksListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInstancesStartCall) Header() http.Header { +func (c *ProjectsLocationsNetworksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesStartCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.startinstancerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:start") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.instances.start" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "baremetalsolution.projects.locations.networks.list" call. +// Exactly one of *ListNetworksResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNetworksResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworksListCall) Do(opts ...googleapi.CallOption) (*ListNetworksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4148,7 +5013,7 @@ func (c *ProjectsLocationsInstancesStartCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ListNetworksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4160,28 +5025,41 @@ func (c *ProjectsLocationsInstancesStartCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Starts a server that was shutdown.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:start", - // "httpMethod": "POST", - // "id": "baremetalsolution.projects.locations.instances.start", + // "description": "List network in a given project and location.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.networks.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the resource.", + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results from the server.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListNetworksRequest.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:start", - // "request": { - // "$ref": "StartInstanceRequest" - // }, + // "path": "v2/{+parent}/networks", // "response": { - // "$ref": "Operation" + // "$ref": "ListNetworksResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4190,88 +5068,117 @@ func (c *ProjectsLocationsInstancesStartCall) Do(opts ...googleapi.CallOption) ( } -// method id "baremetalsolution.projects.locations.instances.stop": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsNetworksListCall) Pages(ctx context.Context, f func(*ListNetworksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsInstancesStopCall struct { - s *Service - name string - stopinstancerequest *StopInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "baremetalsolution.projects.locations.networks.listNetworkUsage": + +type ProjectsLocationsNetworksListNetworkUsageCall struct { + s *Service + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Stop: Stop a running server. +// ListNetworkUsage: List all Networks (and used IPs for each Network) +// in the vendor account associated with the specified project. // -// - name: Name of the resource. -func (r *ProjectsLocationsInstancesService) Stop(name string, stopinstancerequest *StopInstanceRequest) *ProjectsLocationsInstancesStopCall { - c := &ProjectsLocationsInstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.stopinstancerequest = stopinstancerequest +// - location: Parent value (project and location). +func (r *ProjectsLocationsNetworksService) ListNetworkUsage(location string) *ProjectsLocationsNetworksListNetworkUsageCall { + c := &ProjectsLocationsNetworksListNetworkUsageCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInstancesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStopCall { +func (c *ProjectsLocationsNetworksListNetworkUsageCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksListNetworkUsageCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsNetworksListNetworkUsageCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksListNetworkUsageCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInstancesStopCall) Context(ctx context.Context) *ProjectsLocationsInstancesStopCall { +func (c *ProjectsLocationsNetworksListNetworkUsageCall) Context(ctx context.Context) *ProjectsLocationsNetworksListNetworkUsageCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInstancesStopCall) Header() http.Header { +func (c *ProjectsLocationsNetworksListNetworkUsageCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesStopCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNetworksListNetworkUsageCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopinstancerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:stop") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+location}/networks:listNetworkUsage") 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, + "location": c.location, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.instances.stop" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "baremetalsolution.projects.locations.networks.listNetworkUsage" call. +// Exactly one of *ListNetworkUsageResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListNetworkUsageResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworksListNetworkUsageCall) Do(opts ...googleapi.CallOption) (*ListNetworkUsageResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4290,7 +5197,7 @@ func (c *ProjectsLocationsInstancesStopCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ListNetworkUsageResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4302,28 +5209,25 @@ func (c *ProjectsLocationsInstancesStopCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Stop a running server.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:stop", - // "httpMethod": "POST", - // "id": "baremetalsolution.projects.locations.instances.stop", + // "description": "List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks:listNetworkUsage", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.networks.listNetworkUsage", // "parameterOrder": [ - // "name" + // "location" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the resource.", + // "location": { + // "description": "Required. Parent value (project and location).", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:stop", - // "request": { - // "$ref": "StopInstanceRequest" - // }, + // "path": "v2/{+location}/networks:listNetworkUsage", // "response": { - // "$ref": "Operation" + // "$ref": "ListNetworkUsageResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4332,77 +5236,81 @@ func (c *ProjectsLocationsInstancesStopCall) Do(opts ...googleapi.CallOption) (* } -// method id "baremetalsolution.projects.locations.networks.get": +// method id "baremetalsolution.projects.locations.networks.patch": -type ProjectsLocationsNetworksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNetworksPatchCall struct { + s *Service + name string + network *Network + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get details of a single network. +// Patch: Update details of a single network. // -// - name: Name of the resource. -func (r *ProjectsLocationsNetworksService) Get(name string) *ProjectsLocationsNetworksGetCall { - c := &ProjectsLocationsNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The resource name of this `Network`. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. Format: +// `projects/{project}/locations/{location}/networks/{network}`. +func (r *ProjectsLocationsNetworksService) Patch(name string, network *Network) *ProjectsLocationsNetworksPatchCall { + c := &ProjectsLocationsNetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.network = network + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. The only currently supported fields are: `labels`, +// `reservations`, `vrf.vlan_attachments` +func (c *ProjectsLocationsNetworksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworksPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetworksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksGetCall { +func (c *ProjectsLocationsNetworksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsNetworksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNetworksGetCall) Context(ctx context.Context) *ProjectsLocationsNetworksGetCall { +func (c *ProjectsLocationsNetworksPatchCall) Context(ctx context.Context) *ProjectsLocationsNetworksPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNetworksGetCall) Header() http.Header { +func (c *ProjectsLocationsNetworksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNetworksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 } @@ -4413,14 +5321,14 @@ func (c *ProjectsLocationsNetworksGetCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.networks.get" call. -// Exactly one of *Network or error will be non-nil. 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 error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsNetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { +// Do executes the "baremetalsolution.projects.locations.networks.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4439,7 +5347,7 @@ func (c *ProjectsLocationsNetworksGetCall) Do(opts ...googleapi.CallOption) (*Ne if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Network{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4451,26 +5359,35 @@ func (c *ProjectsLocationsNetworksGetCall) Do(opts ...googleapi.CallOption) (*Ne } return ret, nil // { - // "description": "Get details of a single network.", + // "description": "Update details of a single network.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks/{networksId}", - // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.networks.get", + // "httpMethod": "PATCH", + // "id": "baremetalsolution.projects.locations.networks.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the resource.", + // "description": "Output only. The resource name of this `Network`. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: `projects/{project}/locations/{location}/networks/{network}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/networks/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to update. The only currently supported fields are: `labels`, `reservations`, `vrf.vlan_attachments`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+name}", - // "response": { + // "request": { // "$ref": "Network" // }, + // "response": { + // "$ref": "Operation" + // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -4478,98 +5395,70 @@ func (c *ProjectsLocationsNetworksGetCall) Do(opts ...googleapi.CallOption) (*Ne } -// method id "baremetalsolution.projects.locations.networks.list": - -type ProjectsLocationsNetworksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List network in a given project and location. -// -// - parent: Parent value for ListNetworksRequest. -func (r *ProjectsLocationsNetworksService) List(parent string) *ProjectsLocationsNetworksListCall { - c := &ProjectsLocationsNetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": List filter. -func (c *ProjectsLocationsNetworksListCall) Filter(filter string) *ProjectsLocationsNetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} +// method id "baremetalsolution.projects.locations.nfsShares.create": -// PageSize sets the optional parameter "pageSize": Requested page size. -// The server might return fewer items than requested. If unspecified, -// server will pick an appropriate default. -func (c *ProjectsLocationsNetworksListCall) PageSize(pageSize int64) *ProjectsLocationsNetworksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsNfsSharesCreateCall struct { + s *Service + parent string + nfsshare *NfsShare + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results from the server. -func (c *ProjectsLocationsNetworksListCall) PageToken(pageToken string) *ProjectsLocationsNetworksListCall { - c.urlParams_.Set("pageToken", pageToken) +// Create: Create an NFS share. +// +// - parent: The parent project and location. +func (r *ProjectsLocationsNfsSharesService) Create(parent string, nfsshare *NfsShare) *ProjectsLocationsNfsSharesCreateCall { + c := &ProjectsLocationsNfsSharesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.nfsshare = nfsshare return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetworksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksListCall { +func (c *ProjectsLocationsNfsSharesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsNetworksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNetworksListCall) Context(ctx context.Context) *ProjectsLocationsNetworksListCall { +func (c *ProjectsLocationsNfsSharesCreateCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNetworksListCall) Header() http.Header { +func (c *ProjectsLocationsNfsSharesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNfsSharesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nfsshare) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/networks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nfsShares") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -4580,14 +5469,14 @@ func (c *ProjectsLocationsNetworksListCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.networks.list" call. -// Exactly one of *ListNetworksResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListNetworksResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsNetworksListCall) Do(opts ...googleapi.CallOption) (*ListNetworksResponse, error) { +// Do executes the "baremetalsolution.projects.locations.nfsShares.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNfsSharesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4606,7 +5495,7 @@ func (c *ProjectsLocationsNetworksListCall) Do(opts ...googleapi.CallOption) (*L if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListNetworksResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4618,41 +5507,28 @@ func (c *ProjectsLocationsNetworksListCall) Do(opts ...googleapi.CallOption) (*L } return ret, nil // { - // "description": "List network in a given project and location.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks", - // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.networks.list", + // "description": "Create an NFS share.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.nfsShares.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "List filter.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A token identifying a page of results from the server.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Parent value for ListNetworksRequest.", + // "description": "Required. The parent project and location.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/networks", + // "path": "v2/{+parent}/nfsShares", + // "request": { + // "$ref": "NfsShare" + // }, // "response": { - // "$ref": "ListNetworksResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4661,117 +5537,82 @@ func (c *ProjectsLocationsNetworksListCall) Do(opts ...googleapi.CallOption) (*L } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsNetworksListCall) Pages(ctx context.Context, f func(*ListNetworksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "baremetalsolution.projects.locations.networks.listNetworkUsage": +// method id "baremetalsolution.projects.locations.nfsShares.delete": -type ProjectsLocationsNetworksListNetworkUsageCall struct { - s *Service - location string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNfsSharesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListNetworkUsage: List all Networks (and used IPs for each Network) -// in the vendor account associated with the specified project. +// Delete: Delete an NFS share. The underlying volume is automatically +// deleted. // -// - location: Parent value (project and location). -func (r *ProjectsLocationsNetworksService) ListNetworkUsage(location string) *ProjectsLocationsNetworksListNetworkUsageCall { - c := &ProjectsLocationsNetworksListNetworkUsageCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location +// - name: The name of the NFS share to delete. +func (r *ProjectsLocationsNfsSharesService) Delete(name string) *ProjectsLocationsNfsSharesDeleteCall { + c := &ProjectsLocationsNfsSharesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetworksListNetworkUsageCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksListNetworkUsageCall { +func (c *ProjectsLocationsNfsSharesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsNetworksListNetworkUsageCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksListNetworkUsageCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNetworksListNetworkUsageCall) Context(ctx context.Context) *ProjectsLocationsNetworksListNetworkUsageCall { +func (c *ProjectsLocationsNfsSharesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNetworksListNetworkUsageCall) Header() http.Header { +func (c *ProjectsLocationsNfsSharesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworksListNetworkUsageCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNfsSharesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+location}/networks:listNetworkUsage") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.networks.listNetworkUsage" call. -// Exactly one of *ListNetworkUsageResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListNetworkUsageResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsNetworksListNetworkUsageCall) Do(opts ...googleapi.CallOption) (*ListNetworkUsageResponse, error) { +// Do executes the "baremetalsolution.projects.locations.nfsShares.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNfsSharesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4790,7 +5631,7 @@ func (c *ProjectsLocationsNetworksListNetworkUsageCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListNetworkUsageResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4802,25 +5643,25 @@ func (c *ProjectsLocationsNetworksListNetworkUsageCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks:listNetworkUsage", - // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.networks.listNetworkUsage", + // "description": "Delete an NFS share. The underlying volume is automatically deleted.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + // "httpMethod": "DELETE", + // "id": "baremetalsolution.projects.locations.nfsShares.delete", // "parameterOrder": [ - // "location" + // "name" // ], // "parameters": { - // "location": { - // "description": "Required. Parent value (project and location).", + // "name": { + // "description": "Required. The name of the NFS share to delete.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+location}/networks:listNetworkUsage", + // "path": "v2/{+name}", // "response": { - // "$ref": "ListNetworkUsageResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4829,81 +5670,77 @@ func (c *ProjectsLocationsNetworksListNetworkUsageCall) Do(opts ...googleapi.Cal } -// method id "baremetalsolution.projects.locations.networks.patch": +// method id "baremetalsolution.projects.locations.nfsShares.get": -type ProjectsLocationsNetworksPatchCall struct { - s *Service - name string - network *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNfsSharesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Update details of a single network. +// Get: Get details of a single NFS share. // -// - name: Output only. The resource name of this `Network`. Resource -// names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. Format: -// `projects/{project}/locations/{location}/networks/{network}`. -func (r *ProjectsLocationsNetworksService) Patch(name string, network *Network) *ProjectsLocationsNetworksPatchCall { - c := &ProjectsLocationsNetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsNfsSharesService) Get(name string) *ProjectsLocationsNfsSharesGetCall { + c := &ProjectsLocationsNfsSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.network = network - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to update. The only currently supported fields are: `labels`, -// `reservations` -func (c *ProjectsLocationsNetworksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworksPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetworksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksPatchCall { +func (c *ProjectsLocationsNfsSharesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsNfsSharesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNetworksPatchCall) Context(ctx context.Context) *ProjectsLocationsNetworksPatchCall { +func (c *ProjectsLocationsNfsSharesGetCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNetworksPatchCall) Header() http.Header { +func (c *ProjectsLocationsNfsSharesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNfsSharesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 } @@ -4914,14 +5751,14 @@ func (c *ProjectsLocationsNetworksPatchCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.networks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at +// Do executes the "baremetalsolution.projects.locations.nfsShares.get" call. +// Exactly one of *NfsShare or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *NfsShare.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsNetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsNfsSharesGetCall) Do(opts ...googleapi.CallOption) (*NfsShare, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4940,7 +5777,7 @@ func (c *ProjectsLocationsNetworksPatchCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &NfsShare{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4952,34 +5789,25 @@ func (c *ProjectsLocationsNetworksPatchCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Update details of a single network.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks/{networksId}", - // "httpMethod": "PATCH", - // "id": "baremetalsolution.projects.locations.networks.patch", + // "description": "Get details of a single NFS share.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.nfsShares.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The resource name of this `Network`. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: `projects/{project}/locations/{location}/networks/{network}`", + // "description": "Required. Name of the resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/networks/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The list of fields to update. The only currently supported fields are: `labels`, `reservations`", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "Network" - // }, // "response": { - // "$ref": "Operation" + // "$ref": "NfsShare" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4988,70 +5816,98 @@ func (c *ProjectsLocationsNetworksPatchCall) Do(opts ...googleapi.CallOption) (* } -// method id "baremetalsolution.projects.locations.nfsShares.create": +// method id "baremetalsolution.projects.locations.nfsShares.list": -type ProjectsLocationsNfsSharesCreateCall struct { - s *Service - parent string - nfsshare *NfsShare - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNfsSharesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Create an NFS share. +// List: List NFS shares. // -// - parent: The parent project and location. -func (r *ProjectsLocationsNfsSharesService) Create(parent string, nfsshare *NfsShare) *ProjectsLocationsNfsSharesCreateCall { - c := &ProjectsLocationsNfsSharesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListNfsSharesRequest. +func (r *ProjectsLocationsNfsSharesService) List(parent string) *ProjectsLocationsNfsSharesListCall { + c := &ProjectsLocationsNfsSharesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.nfsshare = nfsshare + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsNfsSharesListCall) Filter(filter string) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// server will pick an appropriate default. +func (c *ProjectsLocationsNfsSharesListCall) PageSize(pageSize int64) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results from the server. +func (c *ProjectsLocationsNfsSharesListCall) PageToken(pageToken string) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNfsSharesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesCreateCall { +func (c *ProjectsLocationsNfsSharesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsNfsSharesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNfsSharesCreateCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesCreateCall { +func (c *ProjectsLocationsNfsSharesListCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNfsSharesCreateCall) Header() http.Header { +func (c *ProjectsLocationsNfsSharesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNfsSharesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNfsSharesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nfsshare) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nfsShares") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -5062,14 +5918,14 @@ func (c *ProjectsLocationsNfsSharesCreateCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.nfsShares.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsNfsSharesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "baremetalsolution.projects.locations.nfsShares.list" call. +// Exactly one of *ListNfsSharesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNfsSharesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNfsSharesListCall) Do(opts ...googleapi.CallOption) (*ListNfsSharesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5088,7 +5944,7 @@ func (c *ProjectsLocationsNfsSharesCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ListNfsSharesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5100,16 +5956,32 @@ func (c *ProjectsLocationsNfsSharesCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Create an NFS share.", + // "description": "List NFS shares.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares", - // "httpMethod": "POST", - // "id": "baremetalsolution.projects.locations.nfsShares.create", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.nfsShares.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results from the server.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The parent project and location.", + // "description": "Required. Parent value for ListNfsSharesRequest.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -5117,11 +5989,8 @@ func (c *ProjectsLocationsNfsSharesCreateCall) Do(opts ...googleapi.CallOption) // } // }, // "path": "v2/{+parent}/nfsShares", - // "request": { - // "$ref": "NfsShare" - // }, // "response": { - // "$ref": "Operation" + // "$ref": "ListNfsSharesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5130,30 +5999,60 @@ func (c *ProjectsLocationsNfsSharesCreateCall) Do(opts ...googleapi.CallOption) } -// method id "baremetalsolution.projects.locations.nfsShares.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsNfsSharesListCall) Pages(ctx context.Context, f func(*ListNfsSharesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsNfsSharesDeleteCall struct { +// method id "baremetalsolution.projects.locations.nfsShares.patch": + +type ProjectsLocationsNfsSharesPatchCall struct { s *Service name string + nfsshare *NfsShare urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Delete an NFS share. The underlying volume is automatically -// deleted. +// Patch: Update details of a single NFS share. // -// - name: The name of the NFS share to delete. -func (r *ProjectsLocationsNfsSharesService) Delete(name string) *ProjectsLocationsNfsSharesDeleteCall { - c := &ProjectsLocationsNfsSharesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The name of the NFS share. +func (r *ProjectsLocationsNfsSharesService) Patch(name string, nfsshare *NfsShare) *ProjectsLocationsNfsSharesPatchCall { + c := &ProjectsLocationsNfsSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.nfsshare = nfsshare + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. The only currently supported fields are: `labels` +// `allowed_clients` +func (c *ProjectsLocationsNfsSharesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNfsSharesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNfsSharesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesDeleteCall { +func (c *ProjectsLocationsNfsSharesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5161,21 +6060,21 @@ func (c *ProjectsLocationsNfsSharesDeleteCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNfsSharesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesDeleteCall { +func (c *ProjectsLocationsNfsSharesPatchCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNfsSharesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNfsSharesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNfsSharesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNfsSharesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5183,11 +6082,16 @@ func (c *ProjectsLocationsNfsSharesDeleteCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nfsshare) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 } @@ -5198,14 +6102,14 @@ func (c *ProjectsLocationsNfsSharesDeleteCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.nfsShares.delete" call. +// Do executes the "baremetalsolution.projects.locations.nfsShares.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsNfsSharesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsNfsSharesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5236,23 +6140,32 @@ func (c *ProjectsLocationsNfsSharesDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Delete an NFS share. The underlying volume is automatically deleted.", + // "description": "Update details of a single NFS share.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", - // "httpMethod": "DELETE", - // "id": "baremetalsolution.projects.locations.nfsShares.delete", + // "httpMethod": "PATCH", + // "id": "baremetalsolution.projects.locations.nfsShares.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the NFS share to delete.", + // "description": "Immutable. The name of the NFS share.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to update. The only currently supported fields are: `labels` `allowed_clients`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+name}", + // "request": { + // "$ref": "NfsShare" + // }, // "response": { // "$ref": "Operation" // }, @@ -5263,9 +6176,9 @@ func (c *ProjectsLocationsNfsSharesDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "baremetalsolution.projects.locations.nfsShares.get": +// method id "baremetalsolution.projects.locations.operations.get": -type ProjectsLocationsNfsSharesGetCall struct { +type ProjectsLocationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -5274,11 +6187,12 @@ type ProjectsLocationsNfsSharesGetCall struct { header_ http.Header } -// Get: Get details of a single NFS share. +// Get: Get details about an operation. This method used only to work +// around CCFE lack of passthrough LRO support (b/221498758). // -// - name: Name of the resource. -func (r *ProjectsLocationsNfsSharesService) Get(name string) *ProjectsLocationsNfsSharesGetCall { - c := &ProjectsLocationsNfsSharesGetCall{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 } @@ -5286,7 +6200,7 @@ func (r *ProjectsLocationsNfsSharesService) Get(name string) *ProjectsLocationsN // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNfsSharesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesGetCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5296,7 +6210,7 @@ func (c *ProjectsLocationsNfsSharesGetCall) Fields(s ...googleapi.Field) *Projec // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsNfsSharesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesGetCall { +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5304,21 +6218,21 @@ func (c *ProjectsLocationsNfsSharesGetCall) IfNoneMatch(entityTag string) *Proje // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNfsSharesGetCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesGetCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNfsSharesGetCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNfsSharesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5344,14 +6258,14 @@ func (c *ProjectsLocationsNfsSharesGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.nfsShares.get" call. -// Exactly one of *NfsShare or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *NfsShare.ServerResponse.Header or (if a response was returned at +// Do executes the "baremetalsolution.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsNfsSharesGetCall) Do(opts ...googleapi.CallOption) (*NfsShare, error) { +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5370,7 +6284,7 @@ func (c *ProjectsLocationsNfsSharesGetCall) Do(opts ...googleapi.CallOption) (*N if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &NfsShare{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5382,25 +6296,25 @@ func (c *ProjectsLocationsNfsSharesGetCall) Do(opts ...googleapi.CallOption) (*N } return ret, nil // { - // "description": "Get details of a single NFS share.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + // "description": "Get details about an operation. This method used only to work around CCFE lack of passthrough LRO support (b/221498758).", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.nfsShares.get", + // "id": "baremetalsolution.projects.locations.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the resource.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/.*$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "NfsShare" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5409,98 +6323,78 @@ func (c *ProjectsLocationsNfsSharesGetCall) Do(opts ...googleapi.CallOption) (*N } -// method id "baremetalsolution.projects.locations.nfsShares.list": +// method id "baremetalsolution.projects.locations.provisioningConfigs.create": -type ProjectsLocationsNfsSharesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsProvisioningConfigsCreateCall struct { + s *Service + parent string + provisioningconfig *ProvisioningConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: List NFS shares. +// Create: Create new ProvisioningConfig. // -// - parent: Parent value for ListNfsSharesRequest. -func (r *ProjectsLocationsNfsSharesService) List(parent string) *ProjectsLocationsNfsSharesListCall { - c := &ProjectsLocationsNfsSharesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent project and location containing the +// ProvisioningConfig. +func (r *ProjectsLocationsProvisioningConfigsService) Create(parent string, provisioningconfig *ProvisioningConfig) *ProjectsLocationsProvisioningConfigsCreateCall { + c := &ProjectsLocationsProvisioningConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.provisioningconfig = provisioningconfig return c } -// Filter sets the optional parameter "filter": List filter. -func (c *ProjectsLocationsNfsSharesListCall) Filter(filter string) *ProjectsLocationsNfsSharesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// The server might return fewer items than requested. If unspecified, -// server will pick an appropriate default. -func (c *ProjectsLocationsNfsSharesListCall) PageSize(pageSize int64) *ProjectsLocationsNfsSharesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results from the server. -func (c *ProjectsLocationsNfsSharesListCall) PageToken(pageToken string) *ProjectsLocationsNfsSharesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Email sets the optional parameter "email": Email provided to send a +// confirmation with provisioning config to. +func (c *ProjectsLocationsProvisioningConfigsCreateCall) Email(email string) *ProjectsLocationsProvisioningConfigsCreateCall { + c.urlParams_.Set("email", email) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNfsSharesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesListCall { +func (c *ProjectsLocationsProvisioningConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsNfsSharesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNfsSharesListCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesListCall { +func (c *ProjectsLocationsProvisioningConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNfsSharesListCall) Header() http.Header { +func (c *ProjectsLocationsProvisioningConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNfsSharesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsProvisioningConfigsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.provisioningconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nfsShares") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -5511,14 +6405,14 @@ func (c *ProjectsLocationsNfsSharesListCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.nfsShares.list" call. -// Exactly one of *ListNfsSharesResponse or error will be non-nil. Any +// Do executes the "baremetalsolution.projects.locations.provisioningConfigs.create" call. +// Exactly one of *ProvisioningConfig or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListNfsSharesResponse.ServerResponse.Header or (if a response was +// *ProvisioningConfig.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsNfsSharesListCall) Do(opts ...googleapi.CallOption) (*ListNfsSharesResponse, error) { +func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5537,7 +6431,7 @@ func (c *ProjectsLocationsNfsSharesListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListNfsSharesResponse{ + ret := &ProvisioningConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5549,41 +6443,33 @@ func (c *ProjectsLocationsNfsSharesListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "List NFS shares.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares", - // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.nfsShares.list", + // "description": "Create new ProvisioningConfig.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.provisioningConfigs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "List filter.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A token identifying a page of results from the server.", + // "email": { + // "description": "Optional. Email provided to send a confirmation with provisioning config to.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent value for ListNfsSharesRequest.", + // "description": "Required. The parent project and location containing the ProvisioningConfig.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/nfsShares", + // "path": "v2/{+parent}/provisioningConfigs", + // "request": { + // "$ref": "ProvisioningConfig" + // }, // "response": { - // "$ref": "ListNfsSharesResponse" + // "$ref": "ProvisioningConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5592,99 +6478,77 @@ func (c *ProjectsLocationsNfsSharesListCall) 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 *ProjectsLocationsNfsSharesListCall) Pages(ctx context.Context, f func(*ListNfsSharesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "baremetalsolution.projects.locations.nfsShares.patch": +// method id "baremetalsolution.projects.locations.provisioningConfigs.get": -type ProjectsLocationsNfsSharesPatchCall struct { - s *Service - name string - nfsshare *NfsShare - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsProvisioningConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Update details of a single NFS share. +// Get: Get ProvisioningConfig by name. // -// - name: Immutable. The name of the NFS share. -func (r *ProjectsLocationsNfsSharesService) Patch(name string, nfsshare *NfsShare) *ProjectsLocationsNfsSharesPatchCall { - c := &ProjectsLocationsNfsSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the ProvisioningConfig. +func (r *ProjectsLocationsProvisioningConfigsService) Get(name string) *ProjectsLocationsProvisioningConfigsGetCall { + c := &ProjectsLocationsProvisioningConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.nfsshare = nfsshare - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to update. The only currently supported fields are: `labels` -// `allowed_clients` -func (c *ProjectsLocationsNfsSharesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNfsSharesPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNfsSharesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesPatchCall { +func (c *ProjectsLocationsProvisioningConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsProvisioningConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNfsSharesPatchCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesPatchCall { +func (c *ProjectsLocationsProvisioningConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNfsSharesPatchCall) Header() http.Header { +func (c *ProjectsLocationsProvisioningConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNfsSharesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsProvisioningConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nfsshare) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 } @@ -5695,14 +6559,14 @@ func (c *ProjectsLocationsNfsSharesPatchCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.nfsShares.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsNfsSharesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "baremetalsolution.projects.locations.provisioningConfigs.get" call. +// Exactly one of *ProvisioningConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ProvisioningConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsProvisioningConfigsGetCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5721,7 +6585,7 @@ func (c *ProjectsLocationsNfsSharesPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ProvisioningConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5733,34 +6597,25 @@ func (c *ProjectsLocationsNfsSharesPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Update details of a single NFS share.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", - // "httpMethod": "PATCH", - // "id": "baremetalsolution.projects.locations.nfsShares.patch", + // "description": "Get ProvisioningConfig by name.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs/{provisioningConfigsId}", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.provisioningConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The name of the NFS share.", + // "description": "Required. Name of the ProvisioningConfig.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The list of fields to update. The only currently supported fields are: `labels` `allowed_clients`", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "NfsShare" - // }, // "response": { - // "$ref": "Operation" + // "$ref": "ProvisioningConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5769,78 +6624,85 @@ func (c *ProjectsLocationsNfsSharesPatchCall) Do(opts ...googleapi.CallOption) ( } -// method id "baremetalsolution.projects.locations.operations.get": +// method id "baremetalsolution.projects.locations.provisioningConfigs.patch": -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsProvisioningConfigsPatchCall struct { + s *Service + name string + provisioningconfig *ProvisioningConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get details about an operation. This method used only to work -// around CCFE lack of passthrough LRO support (b/221498758). +// Patch: Update existing ProvisioningConfig. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The system-generated name of the provisioning +// config. This follows the UUID format. +func (r *ProjectsLocationsProvisioningConfigsService) Patch(name string, provisioningconfig *ProvisioningConfig) *ProjectsLocationsProvisioningConfigsPatchCall { + c := &ProjectsLocationsProvisioningConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.provisioningconfig = provisioningconfig + return c +} + +// Email sets the optional parameter "email": Email provided to send a +// confirmation with provisioning config to. +func (c *ProjectsLocationsProvisioningConfigsPatchCall) Email(email string) *ProjectsLocationsProvisioningConfigsPatchCall { + c.urlParams_.Set("email", email) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to update. +func (c *ProjectsLocationsProvisioningConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsProvisioningConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsProvisioningConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsProvisioningConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsProvisioningConfigsPatchCall) 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 *ProjectsLocationsProvisioningConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.provisioningconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 } @@ -5851,14 +6713,14 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "baremetalsolution.projects.locations.provisioningConfigs.patch" call. +// Exactly one of *ProvisioningConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ProvisioningConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsProvisioningConfigsPatchCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5877,7 +6739,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ProvisioningConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5889,25 +6751,39 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Get details about an operation. This method used only to work around CCFE lack of passthrough LRO support (b/221498758).", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.operations.get", + // "description": "Update existing ProvisioningConfig.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs/{provisioningConfigsId}", + // "httpMethod": "PATCH", + // "id": "baremetalsolution.projects.locations.provisioningConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "email": { + // "description": "Optional. Email provided to send a confirmation with provisioning config to.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "Output only. The system-generated name of the provisioning config. This follows the UUID format.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+name}", + // "request": { + // "$ref": "ProvisioningConfig" + // }, // "response": { - // "$ref": "Operation" + // "$ref": "ProvisioningConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5916,39 +6792,32 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "baremetalsolution.projects.locations.provisioningConfigs.create": +// method id "baremetalsolution.projects.locations.provisioningConfigs.submit": -type ProjectsLocationsProvisioningConfigsCreateCall struct { - s *Service - parent string - provisioningconfig *ProvisioningConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsProvisioningConfigsSubmitCall struct { + s *Service + parent string + submitprovisioningconfigrequest *SubmitProvisioningConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create new ProvisioningConfig. +// Submit: Submit a provisiong configuration for a given project. // // - parent: The parent project and location containing the // ProvisioningConfig. -func (r *ProjectsLocationsProvisioningConfigsService) Create(parent string, provisioningconfig *ProvisioningConfig) *ProjectsLocationsProvisioningConfigsCreateCall { - c := &ProjectsLocationsProvisioningConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsProvisioningConfigsService) Submit(parent string, submitprovisioningconfigrequest *SubmitProvisioningConfigRequest) *ProjectsLocationsProvisioningConfigsSubmitCall { + c := &ProjectsLocationsProvisioningConfigsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.provisioningconfig = provisioningconfig - return c -} - -// Email sets the optional parameter "email": Email provided to send a -// confirmation with provisioning config to. -func (c *ProjectsLocationsProvisioningConfigsCreateCall) Email(email string) *ProjectsLocationsProvisioningConfigsCreateCall { - c.urlParams_.Set("email", email) + c.submitprovisioningconfigrequest = submitprovisioningconfigrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsProvisioningConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsCreateCall { +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsSubmitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5956,21 +6825,21 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsProvisioningConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsCreateCall { +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsSubmitCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsProvisioningConfigsCreateCall) Header() http.Header { +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsProvisioningConfigsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5978,14 +6847,14 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.provisioningconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitprovisioningconfigrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningConfigs:submit") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5998,14 +6867,14 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.provisioningConfigs.create" call. -// Exactly one of *ProvisioningConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ProvisioningConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "baremetalsolution.projects.locations.provisioningConfigs.submit" call. +// Exactly one of *SubmitProvisioningConfigResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *SubmitProvisioningConfigResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) { +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Do(opts ...googleapi.CallOption) (*SubmitProvisioningConfigResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6024,7 +6893,7 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ProvisioningConfig{ + ret := &SubmitProvisioningConfigResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6036,19 +6905,14 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Create new ProvisioningConfig.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs", + // "description": "Submit a provisiong configuration for a given project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs:submit", // "httpMethod": "POST", - // "id": "baremetalsolution.projects.locations.provisioningConfigs.create", + // "id": "baremetalsolution.projects.locations.provisioningConfigs.submit", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "email": { - // "description": "Optional. Email provided to send a confirmation with provisioning config to.", - // "location": "query", - // "type": "string" - // }, // "parent": { // "description": "Required. The parent project and location containing the ProvisioningConfig.", // "location": "path", @@ -6057,12 +6921,12 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.Ca // "type": "string" // } // }, - // "path": "v2/{+parent}/provisioningConfigs", + // "path": "v2/{+parent}/provisioningConfigs:submit", // "request": { - // "$ref": "ProvisioningConfig" + // "$ref": "SubmitProvisioningConfigRequest" // }, // "response": { - // "$ref": "ProvisioningConfig" + // "$ref": "SubmitProvisioningConfigResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6071,30 +6935,48 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.Ca } -// method id "baremetalsolution.projects.locations.provisioningConfigs.get": +// method id "baremetalsolution.projects.locations.provisioningQuotas.list": -type ProjectsLocationsProvisioningConfigsGetCall struct { +type ProjectsLocationsProvisioningQuotasListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Get ProvisioningConfig by name. +// List: List the budget details to provision resources on a given +// project. // -// - name: Name of the ProvisioningConfig. -func (r *ProjectsLocationsProvisioningConfigsService) Get(name string) *ProjectsLocationsProvisioningConfigsGetCall { - c := &ProjectsLocationsProvisioningConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent value for ListProvisioningQuotasRequest. +func (r *ProjectsLocationsProvisioningQuotasService) List(parent string) *ProjectsLocationsProvisioningQuotasListCall { + c := &ProjectsLocationsProvisioningQuotasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// server will pick an appropriate default. Notice that page_size field +// is not supported and won't be respected in the API request for now, +// will be updated when pagination is supported. +func (c *ProjectsLocationsProvisioningQuotasListCall) PageSize(pageSize int64) *ProjectsLocationsProvisioningQuotasListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results from the server. +func (c *ProjectsLocationsProvisioningQuotasListCall) PageToken(pageToken string) *ProjectsLocationsProvisioningQuotasListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsProvisioningConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsGetCall { +func (c *ProjectsLocationsProvisioningQuotasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningQuotasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6104,7 +6986,7 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) Fields(s ...googleapi.Fiel // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsProvisioningConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningConfigsGetCall { +func (c *ProjectsLocationsProvisioningQuotasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningQuotasListCall { c.ifNoneMatch_ = entityTag return c } @@ -6112,21 +6994,21 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) IfNoneMatch(entityTag stri // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsProvisioningConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsGetCall { +func (c *ProjectsLocationsProvisioningQuotasListCall) Context(ctx context.Context) *ProjectsLocationsProvisioningQuotasListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsProvisioningConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsProvisioningQuotasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsProvisioningConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsProvisioningQuotasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6139,7 +7021,7 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) 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, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningQuotas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6147,19 +7029,19 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) doRequest(alt string) (*ht } 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 "baremetalsolution.projects.locations.provisioningConfigs.get" call. -// Exactly one of *ProvisioningConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ProvisioningConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "baremetalsolution.projects.locations.provisioningQuotas.list" call. +// Exactly one of *ListProvisioningQuotasResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListProvisioningQuotasResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsProvisioningConfigsGetCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) { +func (c *ProjectsLocationsProvisioningQuotasListCall) Do(opts ...googleapi.CallOption) (*ListProvisioningQuotasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6178,7 +7060,7 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ProvisioningConfig{ + ret := &ListProvisioningQuotasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6190,25 +7072,36 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Get ProvisioningConfig by name.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs/{provisioningConfigsId}", + // "description": "List the budget details to provision resources on a given project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningQuotas", // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.provisioningConfigs.get", + // "id": "baremetalsolution.projects.locations.provisioningQuotas.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the ProvisioningConfig.", + // "pageSize": { + // "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default. Notice that page_size field is not supported and won't be respected in the API request for now, will be updated when pagination is supported.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results from the server.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListProvisioningQuotasRequest.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/provisioningQuotas", // "response": { - // "$ref": "ProvisioningConfig" + // "$ref": "ListProvisioningQuotasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6217,45 +7110,62 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) Do(opts ...googleapi.CallO } -// method id "baremetalsolution.projects.locations.provisioningConfigs.patch": - -type ProjectsLocationsProvisioningConfigsPatchCall struct { - s *Service - name string - provisioningconfig *ProvisioningConfig - 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 *ProjectsLocationsProvisioningQuotasListCall) Pages(ctx context.Context, f func(*ListProvisioningQuotasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Patch: Update existing ProvisioningConfig. -// -// - name: Output only. The name of the provisioning config. -func (r *ProjectsLocationsProvisioningConfigsService) Patch(name string, provisioningconfig *ProvisioningConfig) *ProjectsLocationsProvisioningConfigsPatchCall { - c := &ProjectsLocationsProvisioningConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.provisioningconfig = provisioningconfig - return c +// method id "baremetalsolution.projects.locations.sshKeys.create": + +type ProjectsLocationsSshKeysCreateCall struct { + s *Service + parent string + sshkey *SSHKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Email sets the optional parameter "email": Email provided to send a -// confirmation with provisioning config to. -func (c *ProjectsLocationsProvisioningConfigsPatchCall) Email(email string) *ProjectsLocationsProvisioningConfigsPatchCall { - c.urlParams_.Set("email", email) +// Create: Register a public SSH key in the specified project for use +// with the interactive serial console feature. +// +// - parent: The parent containing the SSH keys. +func (r *ProjectsLocationsSshKeysService) Create(parent string, sshkey *SSHKey) *ProjectsLocationsSshKeysCreateCall { + c := &ProjectsLocationsSshKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.sshkey = sshkey return c } -// UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to update. -func (c *ProjectsLocationsProvisioningConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsProvisioningConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// SshKeyId sets the optional parameter "sshKeyId": Required. The ID to +// use for the key, which will become the final component of the key's +// resource name. This value must match the regex: +// [a-zA-Z0-9@.\-_]{1,64} +func (c *ProjectsLocationsSshKeysCreateCall) SshKeyId(sshKeyId string) *ProjectsLocationsSshKeysCreateCall { + c.urlParams_.Set("sshKeyId", sshKeyId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsProvisioningConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsPatchCall { +func (c *ProjectsLocationsSshKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSshKeysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6263,21 +7173,21 @@ func (c *ProjectsLocationsProvisioningConfigsPatchCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsProvisioningConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsPatchCall { +func (c *ProjectsLocationsSshKeysCreateCall) Context(ctx context.Context) *ProjectsLocationsSshKeysCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsProvisioningConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsSshKeysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsProvisioningConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSshKeysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6285,34 +7195,34 @@ func (c *ProjectsLocationsProvisioningConfigsPatchCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.provisioningconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.sshkey) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sshKeys") 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 "baremetalsolution.projects.locations.provisioningConfigs.patch" call. -// Exactly one of *ProvisioningConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ProvisioningConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsProvisioningConfigsPatchCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) { +// Do executes the "baremetalsolution.projects.locations.sshKeys.create" call. +// Exactly one of *SSHKey or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *SSHKey.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsSshKeysCreateCall) Do(opts ...googleapi.CallOption) (*SSHKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6331,7 +7241,7 @@ func (c *ProjectsLocationsProvisioningConfigsPatchCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ProvisioningConfig{ + ret := &SSHKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6343,39 +7253,33 @@ func (c *ProjectsLocationsProvisioningConfigsPatchCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Update existing ProvisioningConfig.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs/{provisioningConfigsId}", - // "httpMethod": "PATCH", - // "id": "baremetalsolution.projects.locations.provisioningConfigs.patch", + // "description": "Register a public SSH key in the specified project for use with the interactive serial console feature.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/sshKeys", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.sshKeys.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "email": { - // "description": "Optional. Email provided to send a confirmation with provisioning config to.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "Output only. The name of the provisioning config.", + // "parent": { + // "description": "Required. The parent containing the SSH keys.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/provisioningConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "Required. The list of fields to update.", - // "format": "google-fieldmask", + // "sshKeyId": { + // "description": "Required. The ID to use for the key, which will become the final component of the key's resource name. This value must match the regex: [a-zA-Z0-9@.\\-_]{1,64}", // "location": "query", // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/sshKeys", // "request": { - // "$ref": "ProvisioningConfig" + // "$ref": "SSHKey" // }, // "response": { - // "$ref": "ProvisioningConfig" + // "$ref": "SSHKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6384,32 +7288,30 @@ func (c *ProjectsLocationsProvisioningConfigsPatchCall) Do(opts ...googleapi.Cal } -// method id "baremetalsolution.projects.locations.provisioningConfigs.submit": +// method id "baremetalsolution.projects.locations.sshKeys.delete": -type ProjectsLocationsProvisioningConfigsSubmitCall struct { - s *Service - parent string - submitprovisioningconfigrequest *SubmitProvisioningConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSshKeysDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Submit: Submit a provisiong configuration for a given project. +// Delete: Deletes a public SSH key registered in the specified project. // -// - parent: The parent project and location containing the -// ProvisioningConfig. -func (r *ProjectsLocationsProvisioningConfigsService) Submit(parent string, submitprovisioningconfigrequest *SubmitProvisioningConfigRequest) *ProjectsLocationsProvisioningConfigsSubmitCall { - c := &ProjectsLocationsProvisioningConfigsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.submitprovisioningconfigrequest = submitprovisioningconfigrequest +// - name: The name of the SSH key to delete. Currently, the only valid +// value for the location is "global". +func (r *ProjectsLocationsSshKeysService) Delete(name string) *ProjectsLocationsSshKeysDeleteCall { + c := &ProjectsLocationsSshKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsSubmitCall { +func (c *ProjectsLocationsSshKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSshKeysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6417,21 +7319,21 @@ func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsSubmitCall { +func (c *ProjectsLocationsSshKeysDeleteCall) Context(ctx context.Context) *ProjectsLocationsSshKeysDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Header() http.Header { +func (c *ProjectsLocationsSshKeysDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsProvisioningConfigsSubmitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSshKeysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6439,34 +7341,29 @@ func (c *ProjectsLocationsProvisioningConfigsSubmitCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitprovisioningconfigrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningConfigs:submit") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "baremetalsolution.projects.locations.provisioningConfigs.submit" call. -// Exactly one of *SubmitProvisioningConfigResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *SubmitProvisioningConfigResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Do(opts ...googleapi.CallOption) (*SubmitProvisioningConfigResponse, error) { +// Do executes the "baremetalsolution.projects.locations.sshKeys.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsSshKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6485,7 +7382,7 @@ func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &SubmitProvisioningConfigResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6497,28 +7394,25 @@ func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Submit a provisiong configuration for a given project.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs:submit", - // "httpMethod": "POST", - // "id": "baremetalsolution.projects.locations.provisioningConfigs.submit", + // "description": "Deletes a public SSH key registered in the specified project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/sshKeys/{sshKeysId}", + // "httpMethod": "DELETE", + // "id": "baremetalsolution.projects.locations.sshKeys.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent project and location containing the ProvisioningConfig.", + // "name": { + // "description": "Required. The name of the SSH key to delete. Currently, the only valid value for the location is \"global\".", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/sshKeys/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/provisioningConfigs:submit", - // "request": { - // "$ref": "SubmitProvisioningConfigRequest" - // }, + // "path": "v2/{+name}", // "response": { - // "$ref": "SubmitProvisioningConfigResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6527,9 +7421,9 @@ func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Do(opts ...googleapi.Ca } -// method id "baremetalsolution.projects.locations.provisioningQuotas.list": +// method id "baremetalsolution.projects.locations.sshKeys.list": -type ProjectsLocationsProvisioningQuotasListCall struct { +type ProjectsLocationsSshKeysListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -6538,29 +7432,28 @@ type ProjectsLocationsProvisioningQuotasListCall struct { header_ http.Header } -// List: List the budget details to provision resources on a given -// project. +// List: Lists the public SSH keys registered for the specified project. +// These SSH keys are used only for the interactive serial console +// feature. // -// - parent: Parent value for ListProvisioningQuotasRequest. -func (r *ProjectsLocationsProvisioningQuotasService) List(parent string) *ProjectsLocationsProvisioningQuotasListCall { - c := &ProjectsLocationsProvisioningQuotasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent containing the SSH keys. Currently, the only +// valid value for the location is "global". +func (r *ProjectsLocationsSshKeysService) List(parent string) *ProjectsLocationsSshKeysListCall { + c := &ProjectsLocationsSshKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Requested page size. -// The server might return fewer items than requested. If unspecified, -// server will pick an appropriate default. Notice that page_size field -// is not supported and won't be respected in the API request for now, -// will be updated when pagination is supported. -func (c *ProjectsLocationsProvisioningQuotasListCall) PageSize(pageSize int64) *ProjectsLocationsProvisioningQuotasListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. +func (c *ProjectsLocationsSshKeysListCall) PageSize(pageSize int64) *ProjectsLocationsSshKeysListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results from the server. -func (c *ProjectsLocationsProvisioningQuotasListCall) PageToken(pageToken string) *ProjectsLocationsProvisioningQuotasListCall { +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous List request, if any. +func (c *ProjectsLocationsSshKeysListCall) PageToken(pageToken string) *ProjectsLocationsSshKeysListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -6568,7 +7461,7 @@ func (c *ProjectsLocationsProvisioningQuotasListCall) PageToken(pageToken string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsProvisioningQuotasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningQuotasListCall { +func (c *ProjectsLocationsSshKeysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSshKeysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6578,7 +7471,7 @@ func (c *ProjectsLocationsProvisioningQuotasListCall) Fields(s ...googleapi.Fiel // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsProvisioningQuotasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningQuotasListCall { +func (c *ProjectsLocationsSshKeysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSshKeysListCall { c.ifNoneMatch_ = entityTag return c } @@ -6586,21 +7479,21 @@ func (c *ProjectsLocationsProvisioningQuotasListCall) IfNoneMatch(entityTag stri // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsProvisioningQuotasListCall) Context(ctx context.Context) *ProjectsLocationsProvisioningQuotasListCall { +func (c *ProjectsLocationsSshKeysListCall) Context(ctx context.Context) *ProjectsLocationsSshKeysListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsProvisioningQuotasListCall) Header() http.Header { +func (c *ProjectsLocationsSshKeysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsProvisioningQuotasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSshKeysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6613,7 +7506,7 @@ func (c *ProjectsLocationsProvisioningQuotasListCall) 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, "v2/{+parent}/provisioningQuotas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sshKeys") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6626,14 +7519,14 @@ func (c *ProjectsLocationsProvisioningQuotasListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "baremetalsolution.projects.locations.provisioningQuotas.list" call. -// Exactly one of *ListProvisioningQuotasResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListProvisioningQuotasResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "baremetalsolution.projects.locations.sshKeys.list" call. +// Exactly one of *ListSSHKeysResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSSHKeysResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsProvisioningQuotasListCall) Do(opts ...googleapi.CallOption) (*ListProvisioningQuotasResponse, error) { +func (c *ProjectsLocationsSshKeysListCall) Do(opts ...googleapi.CallOption) (*ListSSHKeysResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6652,7 +7545,7 @@ func (c *ProjectsLocationsProvisioningQuotasListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListProvisioningQuotasResponse{ + ret := &ListSSHKeysResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6664,36 +7557,36 @@ func (c *ProjectsLocationsProvisioningQuotasListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "List the budget details to provision resources on a given project.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningQuotas", + // "description": "Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/sshKeys", // "httpMethod": "GET", - // "id": "baremetalsolution.projects.locations.provisioningQuotas.list", + // "id": "baremetalsolution.projects.locations.sshKeys.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default. Notice that page_size field is not supported and won't be respected in the API request for now, will be updated when pagination is supported.", + // "description": "The maximum number of items to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A token identifying a page of results from the server.", + // "description": "The next_page_token value returned from a previous List request, if any.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent value for ListProvisioningQuotasRequest.", + // "description": "Required. The parent containing the SSH keys. Currently, the only valid value for the location is \"global\".", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/provisioningQuotas", + // "path": "v2/{+parent}/sshKeys", // "response": { - // "$ref": "ListProvisioningQuotasResponse" + // "$ref": "ListSSHKeysResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6705,7 +7598,7 @@ func (c *ProjectsLocationsProvisioningQuotasListCall) 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 *ProjectsLocationsProvisioningQuotasListCall) Pages(ctx context.Context, f func(*ListProvisioningQuotasResponse) error) error { +func (c *ProjectsLocationsSshKeysListCall) Pages(ctx context.Context, f func(*ListSSHKeysResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index 8e206bae699..8c3de93aaed 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1710,7 +1710,7 @@ } } }, - "revision": "20220903", + "revision": "20220913", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -2698,6 +2698,17 @@ }, "type": "object" }, + "DataMaskingStatistics": { + "id": "DataMaskingStatistics", + "properties": { + "dataMaskingApplied": { + "default": "false", + "description": "[Output-only] [Preview] Whether any accessed data was protected by data masking. The actual evaluation is done by accessStats.masked_field_count \u003e 0. Since this is only used for the discovery_doc generation purpose, as long as the type (boolean) matches, client library can leverage this. The actual evaluation of the variable is done else-where.", + "type": "boolean" + } + }, + "type": "object" + }, "DataSplitResult": { "description": "Data split result. This contains references to the training and evaluation data tables that were used to train the model.", "id": "DataSplitResult", @@ -4096,6 +4107,10 @@ "description": "[Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.", "type": "string" }, + "createSession": { + "description": "If true, creates a new session, where session id will be a server generated random id. If false, runs query with an existing session_id passed in ConnectionProperty, otherwise runs the load job in non-session mode.", + "type": "boolean" + }, "decimalTargetTypes": { "description": "[Optional] Defines the list of possible SQL data types to which the source decimal values are converted. This list and the precision and the scale parameters of the decimal field determine the target type. In the order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the specified list and if it supports the precision and the scale. STRING supports all precision and scale values. If none of the listed types supports the precision and the scale, the type supporting the widest range in the specified list is picked, and if a value exceeds the supported range when reading the data, an error will be thrown. Example: Suppose the value of this field is [\"NUMERIC\", \"BIGNUMERIC\"]. If (precision,scale) is: (38,9) -\u003e NUMERIC; (39,9) -\u003e BIGNUMERIC (NUMERIC cannot hold 30 integer digits); (38,10) -\u003e BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); (76,38) -\u003e BIGNUMERIC; (77,38) -\u003e BIGNUMERIC (error if value exeeds supported range). This field cannot contain duplicate types. The order of the types in this field is ignored. For example, [\"BIGNUMERIC\", \"NUMERIC\"] is the same as [\"NUMERIC\", \"BIGNUMERIC\"] and NUMERIC always takes precedence over BIGNUMERIC. Defaults to [\"NUMERIC\", \"STRING\"] for ORC and [\"NUMERIC\"] for the other file formats.", "items": { @@ -4498,6 +4513,10 @@ "format": "int64", "type": "string" }, + "dataMaskingStatistics": { + "$ref": "DataMaskingStatistics", + "description": "[Output-only] Statistics for data masking. Present only for query and extract jobs." + }, "endTime": { "description": "[Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.", "format": "int64", @@ -4592,25 +4611,25 @@ "properties": { "biEngineStatistics": { "$ref": "BiEngineStatistics", - "description": "BI Engine specific Statistics. [Output-only] BI Engine specific Statistics." + "description": "BI Engine specific Statistics. [Output only] BI Engine specific Statistics." }, "billingTier": { - "description": "[Output-only] Billing tier for the job.", + "description": "[Output only] Billing tier for the job.", "format": "int32", "type": "integer" }, "cacheHit": { - "description": "[Output-only] Whether the query result was fetched from the query cache.", + "description": "[Output only] Whether the query result was fetched from the query cache.", "type": "boolean" }, "ddlAffectedRowAccessPolicyCount": { - "description": "[Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.", + "description": "[Output only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.", "format": "int64", "type": "string" }, "ddlDestinationTable": { "$ref": "TableReference", - "description": "[Output-only] The DDL destination table. Present only for ALTER TABLE RENAME TO queries. Note that ddl_target_table is used just for its type information." + "description": "[Output only] The DDL destination table. Present only for ALTER TABLE RENAME TO queries. Note that ddl_target_table is used just for its type information." }, "ddlOperationPerformed": { "description": "The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): \"CREATE\": The query created the DDL target. \"SKIP\": No-op. Example cases: the query is CREATE TABLE IF NOT EXISTS while the table already exists, or the query is DROP TABLE IF EXISTS while the table does not exist. \"REPLACE\": The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. \"DROP\": The query deleted the DDL target.", @@ -4618,7 +4637,7 @@ }, "ddlTargetDataset": { "$ref": "DatasetReference", - "description": "[Output-only] The DDL target dataset. Present only for CREATE/ALTER/DROP SCHEMA queries." + "description": "[Output only] The DDL target dataset. Present only for CREATE/ALTER/DROP SCHEMA queries." }, "ddlTargetRoutine": { "$ref": "RoutineReference", @@ -4626,75 +4645,75 @@ }, "ddlTargetRowAccessPolicy": { "$ref": "RowAccessPolicyReference", - "description": "[Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries." + "description": "[Output only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries." }, "ddlTargetTable": { "$ref": "TableReference", - "description": "[Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries." + "description": "[Output only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries." }, "dmlStats": { "$ref": "DmlStatistics", - "description": "[Output-only] Detailed statistics for DML statements Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE." + "description": "[Output only] Detailed statistics for DML statements Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE." }, "estimatedBytesProcessed": { - "description": "[Output-only] The original estimate of bytes processed for the job.", + "description": "[Output only] The original estimate of bytes processed for the job.", "format": "int64", "type": "string" }, "mlStatistics": { "$ref": "MlStatistics", - "description": "[Output-only] Statistics of a BigQuery ML training job." + "description": "[Output only] Statistics of a BigQuery ML training job." }, "modelTraining": { "$ref": "BigQueryModelTraining", - "description": "[Output-only, Beta] Information about create model query job progress." + "description": "[Output only, Beta] Information about create model query job progress." }, "modelTrainingCurrentIteration": { - "description": "[Output-only, Beta] Deprecated; do not use.", + "description": "[Output only, Beta] Deprecated; do not use.", "format": "int32", "type": "integer" }, "modelTrainingExpectedTotalIteration": { - "description": "[Output-only, Beta] Deprecated; do not use.", + "description": "[Output only, Beta] Deprecated; do not use.", "format": "int64", "type": "string" }, "numDmlAffectedRows": { - "description": "[Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.", + "description": "[Output only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.", "format": "int64", "type": "string" }, "queryPlan": { - "description": "[Output-only] Describes execution plan for the query.", + "description": "[Output only] Describes execution plan for the query.", "items": { "$ref": "ExplainQueryStage" }, "type": "array" }, "referencedRoutines": { - "description": "[Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job.", + "description": "[Output only] Referenced routines (persistent user-defined functions and stored procedures) for the job.", "items": { "$ref": "RoutineReference" }, "type": "array" }, "referencedTables": { - "description": "[Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.", + "description": "[Output only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.", "items": { "$ref": "TableReference" }, "type": "array" }, "reservationUsage": { - "description": "[Output-only] Job resource usage breakdown by reservation.", + "description": "[Output only] Job resource usage breakdown by reservation.", "items": { "properties": { "name": { - "description": "[Output-only] Reservation name or \"unreserved\" for on-demand resources usage.", + "description": "[Output only] Reservation name or \"unreserved\" for on-demand resources usage.", "type": "string" }, "slotMs": { - "description": "[Output-only] Slot-milliseconds the job spent in the given reservation.", + "description": "[Output only] Slot-milliseconds the job spent in the given reservation.", "format": "int64", "type": "string" } @@ -4705,48 +4724,48 @@ }, "schema": { "$ref": "TableSchema", - "description": "[Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries." + "description": "[Output only] The schema of the results. Present only for successful dry run of non-legacy SQL queries." }, "searchStatistics": { "$ref": "SearchStatistics", - "description": "[Output-only] Search query specific statistics." + "description": "[Output only] Search query specific statistics." }, "sparkStatistics": { "$ref": "SparkStatistics", - "description": "[Output-only] Statistics of a Spark procedure job." + "description": "[Output only] Statistics of a Spark procedure job." }, "statementType": { "description": "The type of query statement, if valid. Possible values (new values might be added in the future): \"SELECT\": SELECT query. \"INSERT\": INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"UPDATE\": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"DELETE\": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"MERGE\": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. \"ALTER_TABLE\": ALTER TABLE query. \"ALTER_VIEW\": ALTER VIEW query. \"ASSERT\": ASSERT condition AS 'description'. \"CREATE_FUNCTION\": CREATE FUNCTION query. \"CREATE_MODEL\": CREATE [OR REPLACE] MODEL ... AS SELECT ... . \"CREATE_PROCEDURE\": CREATE PROCEDURE query. \"CREATE_TABLE\": CREATE [OR REPLACE] TABLE without AS SELECT. \"CREATE_TABLE_AS_SELECT\": CREATE [OR REPLACE] TABLE ... AS SELECT ... . \"CREATE_VIEW\": CREATE [OR REPLACE] VIEW ... AS SELECT ... . \"DROP_FUNCTION\" : DROP FUNCTION query. \"DROP_PROCEDURE\": DROP PROCEDURE query. \"DROP_TABLE\": DROP TABLE query. \"DROP_VIEW\": DROP VIEW query.", "type": "string" }, "timeline": { - "description": "[Output-only] [Beta] Describes a timeline of job execution.", + "description": "[Output only] [Beta] Describes a timeline of job execution.", "items": { "$ref": "QueryTimelineSample" }, "type": "array" }, "totalBytesBilled": { - "description": "[Output-only] Total bytes billed for the job.", + "description": "[Output only] Total bytes billed for the job.", "format": "int64", "type": "string" }, "totalBytesProcessed": { - "description": "[Output-only] Total bytes processed for the job.", + "description": "[Output only] Total bytes processed for the job.", "format": "int64", "type": "string" }, "totalBytesProcessedAccuracy": { - "description": "[Output-only] For dry-run jobs, totalBytesProcessed is an estimate and this field specifies the accuracy of the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound of what the query would cost. UPPER_BOUND: estimate is upper bound of what the query would cost.", + "description": "[Output only] For dry-run jobs, totalBytesProcessed is an estimate and this field specifies the accuracy of the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound of what the query would cost. UPPER_BOUND: estimate is upper bound of what the query would cost.", "type": "string" }, "totalPartitionsProcessed": { - "description": "[Output-only] Total number of partitions processed from all partitioned tables referenced in the job.", + "description": "[Output only] Total number of partitions processed from all partitioned tables referenced in the job.", "format": "int64", "type": "string" }, "totalSlotMs": { - "description": "[Output-only] Slot-milliseconds for the job.", + "description": "[Output only] Slot-milliseconds for the job.", "format": "int64", "type": "string" }, @@ -5117,11 +5136,10 @@ "type": "array" }, "trainingRuns": { - "description": "Output only. Information for all training runs in increasing order of start_time.", + "description": "Information for all training runs in increasing order of start_time.", "items": { "$ref": "TrainingRun" }, - "readOnly": true, "type": "array" } }, @@ -7513,43 +7531,51 @@ "id": "TrainingRun", "properties": { "classLevelGlobalExplanations": { - "description": "Global explanation contains the explanation of top features on the class level. Applies to classification models only.", + "description": "Output only. Global explanation contains the explanation of top features on the class level. Applies to classification models only.", "items": { "$ref": "GlobalExplanation" }, + "readOnly": true, "type": "array" }, "dataSplitResult": { "$ref": "DataSplitResult", - "description": "Data split result of the training run. Only set when the input data is actually split." + "description": "Output only. Data split result of the training run. Only set when the input data is actually split.", + "readOnly": true }, "evaluationMetrics": { "$ref": "EvaluationMetrics", - "description": "The evaluation metrics over training/eval data that were computed at the end of training." + "description": "Output only. The evaluation metrics over training/eval data that were computed at the end of training.", + "readOnly": true }, "modelLevelGlobalExplanation": { "$ref": "GlobalExplanation", - "description": "Global explanation contains the explanation of top features on the model level. Applies to both regression and classification models." + "description": "Output only. Global explanation contains the explanation of top features on the model level. Applies to both regression and classification models.", + "readOnly": true }, "results": { - "description": "Output of each iteration run, results.size() \u003c= max_iterations.", + "description": "Output only. Output of each iteration run, results.size() \u003c= max_iterations.", "items": { "$ref": "IterationResult" }, + "readOnly": true, "type": "array" }, "startTime": { - "description": "The start time of this training run.", + "description": "Output only. The start time of this training run.", "format": "google-datetime", + "readOnly": true, "type": "string" }, "trainingOptions": { "$ref": "TrainingOptions", - "description": "Options that were used for this training run, includes user specified and default options that were used." + "description": "Output only. Options that were used for this training run, includes user specified and default options that were used.", + "readOnly": true }, "trainingStartTime": { - "description": "The start time of this training run, in milliseconds since epoch.", + "description": "Output only. The start time of this training run, in milliseconds since epoch.", "format": "int64", + "readOnly": true, "type": "string" }, "vertexAiModelId": { @@ -7557,7 +7583,8 @@ "type": "string" }, "vertexAiModelVersion": { - "description": "The model version in Vertex AI Model Registry for this training run", + "description": "Output only. The model version in Vertex AI Model Registry for this training run", + "readOnly": true, "type": "string" } }, diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 857b483d566..ea70af8d849 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -2011,6 +2011,39 @@ func (s *CsvOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type DataMaskingStatistics struct { + // DataMaskingApplied: [Output-only] [Preview] Whether any accessed data + // was protected by data masking. The actual evaluation is done by + // accessStats.masked_field_count > 0. Since this is only used for the + // discovery_doc generation purpose, as long as the type (boolean) + // matches, client library can leverage this. The actual evaluation of + // the variable is done else-where. + DataMaskingApplied bool `json:"dataMaskingApplied,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataMaskingApplied") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataMaskingApplied") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DataMaskingStatistics) MarshalJSON() ([]byte, error) { + type NoMethod DataMaskingStatistics + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DataSplitResult: Data split result. This contains references to the // training and evaluation data tables that were used to train the // model. @@ -4329,6 +4362,12 @@ type JobConfigurationLoad struct { // one atomic update upon job completion. CreateDisposition string `json:"createDisposition,omitempty"` + // CreateSession: If true, creates a new session, where session id will + // be a server generated random id. If false, runs query with an + // existing session_id passed in ConnectionProperty, otherwise runs the + // load job in non-session mode. + CreateSession bool `json:"createSession,omitempty"` + // DecimalTargetTypes: [Optional] Defines the list of possible SQL data // types to which the source decimal values are converted. This list and // the precision and the scale parameters of the decimal field determine @@ -4937,6 +4976,10 @@ type JobStatistics struct { // milliseconds since the epoch. This field will be present on all jobs. CreationTime int64 `json:"creationTime,omitempty,string"` + // DataMaskingStatistics: [Output-only] Statistics for data masking. + // Present only for query and extract jobs. + DataMaskingStatistics *DataMaskingStatistics `json:"dataMaskingStatistics,omitempty"` + // EndTime: [Output-only] End time of this job, in milliseconds since // the epoch. This field will be present whenever a job is in the DONE // state. @@ -5071,23 +5114,23 @@ func (s *JobStatisticsReservationUsage) MarshalJSON() ([]byte, error) { } type JobStatistics2 struct { - // BiEngineStatistics: BI Engine specific Statistics. [Output-only] BI + // BiEngineStatistics: BI Engine specific Statistics. [Output only] BI // Engine specific Statistics. BiEngineStatistics *BiEngineStatistics `json:"biEngineStatistics,omitempty"` - // BillingTier: [Output-only] Billing tier for the job. + // BillingTier: [Output only] Billing tier for the job. BillingTier int64 `json:"billingTier,omitempty"` - // CacheHit: [Output-only] Whether the query result was fetched from the + // CacheHit: [Output only] Whether the query result was fetched from the // query cache. CacheHit bool `json:"cacheHit,omitempty"` - // DdlAffectedRowAccessPolicyCount: [Output-only] [Preview] The number + // DdlAffectedRowAccessPolicyCount: [Output only] [Preview] The number // of row access policies affected by a DDL statement. Present only for // DROP ALL ROW ACCESS POLICIES queries. DdlAffectedRowAccessPolicyCount int64 `json:"ddlAffectedRowAccessPolicyCount,omitempty,string"` - // DdlDestinationTable: [Output-only] The DDL destination table. Present + // DdlDestinationTable: [Output only] The DDL destination table. Present // only for ALTER TABLE RENAME TO queries. Note that ddl_target_table is // used just for its type information. DdlDestinationTable *TableReference `json:"ddlDestinationTable,omitempty"` @@ -5103,7 +5146,7 @@ type JobStatistics2 struct { // query deleted the DDL target. DdlOperationPerformed string `json:"ddlOperationPerformed,omitempty"` - // DdlTargetDataset: [Output-only] The DDL target dataset. Present only + // DdlTargetDataset: [Output only] The DDL target dataset. Present only // for CREATE/ALTER/DROP SCHEMA queries. DdlTargetDataset *DatasetReference `json:"ddlTargetDataset,omitempty"` @@ -5111,67 +5154,67 @@ type JobStatistics2 struct { // CREATE/DROP FUNCTION/PROCEDURE queries. DdlTargetRoutine *RoutineReference `json:"ddlTargetRoutine,omitempty"` - // DdlTargetRowAccessPolicy: [Output-only] [Preview] The DDL target row + // DdlTargetRowAccessPolicy: [Output only] [Preview] The DDL target row // access policy. Present only for CREATE/DROP ROW ACCESS POLICY // queries. DdlTargetRowAccessPolicy *RowAccessPolicyReference `json:"ddlTargetRowAccessPolicy,omitempty"` - // DdlTargetTable: [Output-only] The DDL target table. Present only for + // DdlTargetTable: [Output only] The DDL target table. Present only for // CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries. DdlTargetTable *TableReference `json:"ddlTargetTable,omitempty"` - // DmlStats: [Output-only] Detailed statistics for DML statements + // DmlStats: [Output only] Detailed statistics for DML statements // Present only for DML statements INSERT, UPDATE, DELETE or TRUNCATE. DmlStats *DmlStatistics `json:"dmlStats,omitempty"` - // EstimatedBytesProcessed: [Output-only] The original estimate of bytes + // EstimatedBytesProcessed: [Output only] The original estimate of bytes // processed for the job. EstimatedBytesProcessed int64 `json:"estimatedBytesProcessed,omitempty,string"` - // MlStatistics: [Output-only] Statistics of a BigQuery ML training job. + // MlStatistics: [Output only] Statistics of a BigQuery ML training job. MlStatistics *MlStatistics `json:"mlStatistics,omitempty"` - // ModelTraining: [Output-only, Beta] Information about create model + // ModelTraining: [Output only, Beta] Information about create model // query job progress. ModelTraining *BigQueryModelTraining `json:"modelTraining,omitempty"` - // ModelTrainingCurrentIteration: [Output-only, Beta] Deprecated; do not + // ModelTrainingCurrentIteration: [Output only, Beta] Deprecated; do not // use. ModelTrainingCurrentIteration int64 `json:"modelTrainingCurrentIteration,omitempty"` - // ModelTrainingExpectedTotalIteration: [Output-only, Beta] Deprecated; + // ModelTrainingExpectedTotalIteration: [Output only, Beta] Deprecated; // do not use. ModelTrainingExpectedTotalIteration int64 `json:"modelTrainingExpectedTotalIteration,omitempty,string"` - // NumDmlAffectedRows: [Output-only] The number of rows affected by a + // NumDmlAffectedRows: [Output only] The number of rows affected by a // DML statement. Present only for DML statements INSERT, UPDATE or // DELETE. NumDmlAffectedRows int64 `json:"numDmlAffectedRows,omitempty,string"` - // QueryPlan: [Output-only] Describes execution plan for the query. + // QueryPlan: [Output only] Describes execution plan for the query. QueryPlan []*ExplainQueryStage `json:"queryPlan,omitempty"` - // ReferencedRoutines: [Output-only] Referenced routines (persistent + // ReferencedRoutines: [Output only] Referenced routines (persistent // user-defined functions and stored procedures) for the job. ReferencedRoutines []*RoutineReference `json:"referencedRoutines,omitempty"` - // ReferencedTables: [Output-only] Referenced tables for the job. + // ReferencedTables: [Output only] Referenced tables for the job. // Queries that reference more than 50 tables will not have a complete // list. ReferencedTables []*TableReference `json:"referencedTables,omitempty"` - // ReservationUsage: [Output-only] Job resource usage breakdown by + // ReservationUsage: [Output only] Job resource usage breakdown by // reservation. ReservationUsage []*JobStatistics2ReservationUsage `json:"reservationUsage,omitempty"` - // Schema: [Output-only] The schema of the results. Present only for + // Schema: [Output only] The schema of the results. Present only for // successful dry run of non-legacy SQL queries. Schema *TableSchema `json:"schema,omitempty"` - // SearchStatistics: [Output-only] Search query specific statistics. + // SearchStatistics: [Output only] Search query specific statistics. SearchStatistics *SearchStatistics `json:"searchStatistics,omitempty"` - // SparkStatistics: [Output-only] Statistics of a Spark procedure job. + // SparkStatistics: [Output only] Statistics of a Spark procedure job. SparkStatistics *SparkStatistics `json:"sparkStatistics,omitempty"` // StatementType: The type of query statement, if valid. Possible values @@ -5196,16 +5239,16 @@ type JobStatistics2 struct { // VIEW query. StatementType string `json:"statementType,omitempty"` - // Timeline: [Output-only] [Beta] Describes a timeline of job execution. + // Timeline: [Output only] [Beta] Describes a timeline of job execution. Timeline []*QueryTimelineSample `json:"timeline,omitempty"` - // TotalBytesBilled: [Output-only] Total bytes billed for the job. + // TotalBytesBilled: [Output only] Total bytes billed for the job. TotalBytesBilled int64 `json:"totalBytesBilled,omitempty,string"` - // TotalBytesProcessed: [Output-only] Total bytes processed for the job. + // TotalBytesProcessed: [Output only] Total bytes processed for the job. TotalBytesProcessed int64 `json:"totalBytesProcessed,omitempty,string"` - // TotalBytesProcessedAccuracy: [Output-only] For dry-run jobs, + // TotalBytesProcessedAccuracy: [Output only] For dry-run jobs, // totalBytesProcessed is an estimate and this field specifies the // accuracy of the estimate. Possible values can be: UNKNOWN: accuracy // of the estimate is unknown. PRECISE: estimate is precise. @@ -5213,11 +5256,11 @@ type JobStatistics2 struct { // UPPER_BOUND: estimate is upper bound of what the query would cost. TotalBytesProcessedAccuracy string `json:"totalBytesProcessedAccuracy,omitempty"` - // TotalPartitionsProcessed: [Output-only] Total number of partitions + // TotalPartitionsProcessed: [Output only] Total number of partitions // processed from all partitioned tables referenced in the job. TotalPartitionsProcessed int64 `json:"totalPartitionsProcessed,omitempty,string"` - // TotalSlotMs: [Output-only] Slot-milliseconds for the job. + // TotalSlotMs: [Output only] Slot-milliseconds for the job. TotalSlotMs int64 `json:"totalSlotMs,omitempty,string"` // UndeclaredQueryParameters: Standard SQL only: list of undeclared @@ -5249,11 +5292,11 @@ func (s *JobStatistics2) MarshalJSON() ([]byte, error) { } type JobStatistics2ReservationUsage struct { - // Name: [Output-only] Reservation name or "unreserved" for on-demand + // Name: [Output only] Reservation name or "unreserved" for on-demand // resources usage. Name string `json:"name,omitempty"` - // SlotMs: [Output-only] Slot-milliseconds the job spent in the given + // SlotMs: [Output only] Slot-milliseconds the job spent in the given // reservation. SlotMs int64 `json:"slotMs,omitempty,string"` @@ -5770,8 +5813,8 @@ type Model struct { // trial_id. OptimalTrialIds googleapi.Int64s `json:"optimalTrialIds,omitempty"` - // TrainingRuns: Output only. Information for all training runs in - // increasing order of start_time. + // TrainingRuns: Information for all training runs in increasing order + // of start_time. TrainingRuns []*TrainingRun `json:"trainingRuns,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -9276,45 +9319,46 @@ func (s *TrainingOptions) UnmarshalJSON(data []byte) error { // TrainingRun: Information about a single training query run for the // model. type TrainingRun struct { - // ClassLevelGlobalExplanations: Global explanation contains the - // explanation of top features on the class level. Applies to - // classification models only. + // ClassLevelGlobalExplanations: Output only. Global explanation + // contains the explanation of top features on the class level. Applies + // to classification models only. ClassLevelGlobalExplanations []*GlobalExplanation `json:"classLevelGlobalExplanations,omitempty"` - // DataSplitResult: Data split result of the training run. Only set when - // the input data is actually split. + // DataSplitResult: Output only. Data split result of the training run. + // Only set when the input data is actually split. DataSplitResult *DataSplitResult `json:"dataSplitResult,omitempty"` - // EvaluationMetrics: The evaluation metrics over training/eval data - // that were computed at the end of training. + // EvaluationMetrics: Output only. The evaluation metrics over + // training/eval data that were computed at the end of training. EvaluationMetrics *EvaluationMetrics `json:"evaluationMetrics,omitempty"` - // ModelLevelGlobalExplanation: Global explanation contains the - // explanation of top features on the model level. Applies to both + // ModelLevelGlobalExplanation: Output only. Global explanation contains + // the explanation of top features on the model level. Applies to both // regression and classification models. ModelLevelGlobalExplanation *GlobalExplanation `json:"modelLevelGlobalExplanation,omitempty"` - // Results: Output of each iteration run, results.size() <= + // Results: Output only. Output of each iteration run, results.size() <= // max_iterations. Results []*IterationResult `json:"results,omitempty"` - // StartTime: The start time of this training run. + // StartTime: Output only. The start time of this training run. StartTime string `json:"startTime,omitempty"` - // TrainingOptions: Options that were used for this training run, - // includes user specified and default options that were used. + // TrainingOptions: Output only. Options that were used for this + // training run, includes user specified and default options that were + // used. TrainingOptions *TrainingOptions `json:"trainingOptions,omitempty"` - // TrainingStartTime: The start time of this training run, in - // milliseconds since epoch. + // TrainingStartTime: Output only. The start time of this training run, + // in milliseconds since epoch. TrainingStartTime int64 `json:"trainingStartTime,omitempty,string"` // VertexAiModelId: The model id in Vertex AI Model Registry for this // training run VertexAiModelId string `json:"vertexAiModelId,omitempty"` - // VertexAiModelVersion: The model version in Vertex AI Model Registry - // for this training run + // VertexAiModelVersion: Output only. The model version in Vertex AI + // Model Registry for this training run VertexAiModelVersion string `json:"vertexAiModelVersion,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index c5276d0760f..c4cd73fb7ad 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -1892,7 +1892,7 @@ } } }, - "revision": "20220819", + "revision": "20220914", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2100,7 +2100,7 @@ "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. * `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`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "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`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", "items": { "type": "string" }, diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index 83c92a2cc36..bad2caaec16 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -664,11 +664,12 @@ type Binding struct { // `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. * - // `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, + // 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 diff --git a/certificatemanager/v1/certificatemanager-api.json b/certificatemanager/v1/certificatemanager-api.json index 3be2776aa8d..b86fee43e1a 100644 --- a/certificatemanager/v1/certificatemanager-api.json +++ b/certificatemanager/v1/certificatemanager-api.json @@ -975,7 +975,7 @@ } } }, - "revision": "20220804", + "revision": "20220914", "rootUrl": "https://certificatemanager.googleapis.com/", "schemas": { "AuthorizationAttemptInfo": { @@ -1122,7 +1122,7 @@ "type": "string" }, "gclbTargets": { - "description": "Output only. A list of GCLB targets which use this Certificate Map.", + "description": "Output only. A list of GCLB targets which use this Certificate Map. A Target Proxy is only present on this list if it's attached to a Forwarding Rule.", "items": { "$ref": "GclbTarget" }, diff --git a/certificatemanager/v1/certificatemanager-gen.go b/certificatemanager/v1/certificatemanager-gen.go index 4d36db816ed..621135c1544 100644 --- a/certificatemanager/v1/certificatemanager-gen.go +++ b/certificatemanager/v1/certificatemanager-gen.go @@ -371,7 +371,8 @@ type CertificateMap struct { Description string `json:"description,omitempty"` // GclbTargets: Output only. A list of GCLB targets which use this - // Certificate Map. + // Certificate Map. A Target Proxy is only present on this list if it's + // attached to a Forwarding Rule. GclbTargets []*GclbTarget `json:"gclbTargets,omitempty"` // Labels: Set of labels associated with a Certificate Map. diff --git a/chromeuxreport/v1/chromeuxreport-api.json b/chromeuxreport/v1/chromeuxreport-api.json index cff34f21498..1cd8aba9bbb 100644 --- a/chromeuxreport/v1/chromeuxreport-api.json +++ b/chromeuxreport/v1/chromeuxreport-api.json @@ -116,7 +116,7 @@ } } }, - "revision": "20220504", + "revision": "20220922", "rootUrl": "https://chromeuxreport.googleapis.com/", "schemas": { "Bin": { @@ -139,6 +139,43 @@ }, "type": "object" }, + "CollectionPeriod": { + "description": "The collection period is a date range which includes the `first` and `last` day.", + "id": "CollectionPeriod", + "properties": { + "firstDate": { + "$ref": "Date", + "description": "The first day in the collection period, inclusive." + }, + "lastDate": { + "$ref": "Date", + "description": "The last day in the collection period, inclusive." + } + }, + "type": "object" + }, + "Date": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "Date", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Key": { "description": "Key defines all the dimensions that identify this record as unique.", "id": "Key", @@ -264,6 +301,10 @@ "description": "Record is a single Chrome UX report data record. It contains use experience statistics for a single url pattern and set of dimensions.", "id": "Record", "properties": { + "collectionPeriod": { + "$ref": "CollectionPeriod", + "description": "The collection period indicates when the data reflected in this record was collected." + }, "key": { "$ref": "Key", "description": "Key defines all of the unique querying parameters needed to look up a user experience record." diff --git a/chromeuxreport/v1/chromeuxreport-gen.go b/chromeuxreport/v1/chromeuxreport-gen.go index c5907a5fa81..ff0eeb60636 100644 --- a/chromeuxreport/v1/chromeuxreport-gen.go +++ b/chromeuxreport/v1/chromeuxreport-gen.go @@ -191,6 +191,85 @@ func (s *Bin) UnmarshalJSON(data []byte) error { return nil } +// CollectionPeriod: The collection period is a date range which +// includes the `first` and `last` day. +type CollectionPeriod struct { + // FirstDate: The first day in the collection period, inclusive. + FirstDate *Date `json:"firstDate,omitempty"` + + // LastDate: The last day in the collection period, inclusive. + LastDate *Date `json:"lastDate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FirstDate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FirstDate") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CollectionPeriod) MarshalJSON() ([]byte, error) { + type NoMethod CollectionPeriod + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Date: 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 Date struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Date) MarshalJSON() ([]byte, error) { + type NoMethod Date + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Key: Key defines all the dimensions that identify this record as // unique. type Key struct { @@ -438,6 +517,10 @@ func (s *QueryResponse) MarshalJSON() ([]byte, error) { // use experience statistics for a single url pattern and set of // dimensions. type Record struct { + // CollectionPeriod: The collection period indicates when the data + // reflected in this record was collected. + CollectionPeriod *CollectionPeriod `json:"collectionPeriod,omitempty"` + // Key: Key defines all of the unique querying parameters needed to look // up a user experience record. Key *Key `json:"key,omitempty"` @@ -449,7 +532,7 @@ type Record struct { // "cumulative_layout_shift"] Metrics map[string]Metric `json:"metrics,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "CollectionPeriod") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -457,12 +540,13 @@ type Record struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CollectionPeriod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index 1fdc84a0b82..5529b7c72cf 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -929,7 +929,7 @@ } } }, - "revision": "20220910", + "revision": "20220923", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -3263,9 +3263,16 @@ "type": "array" }, "kmsKey": { - "description": "The Cloud KMS [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) name or [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) name. This field is available only when the resource's Protobuf contains it. To search against the `kms_key`: * Use a field query. Example: `kmsKey:key` * Use a free text query. Example: `key`", + "description": "This field only presents for the purpose of backward-compatibility. Please use `kms_keys` field to retrieve KMS key information. This field will only be populated for the resource types included in this list for backward compatible purpose. To search against the `kms_key`: * Use a field query. Example: `kmsKey:key` * Use a free text query. Example: `key`", "type": "string" }, + "kmsKeys": { + "description": "The Cloud KMS [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) names or [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) names. This field is available only when the resource's Protobuf contains it. To search against the `kms_keys`: * Use a field query. Example: `kmsKeys:key` * Use a free text query. Example: `key`", + "items": { + "type": "string" + }, + "type": "array" + }, "labels": { "additionalProperties": { "type": "string" diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index f982d7d495c..8ed8d6ea06e 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -4913,14 +4913,22 @@ type ResourceSearchResult struct { // search request. Folders []string `json:"folders,omitempty"` - // KmsKey: The Cloud KMS CryptoKey + // KmsKey: This field only presents for the purpose of + // backward-compatibility. Please use `kms_keys` field to retrieve KMS + // key information. This field will only be populated for the resource + // types included in this list for backward compatible purpose. To + // search against the `kms_key`: * Use a field query. Example: + // `kmsKey:key` * Use a free text query. Example: `key` + KmsKey string `json:"kmsKey,omitempty"` + + // KmsKeys: The Cloud KMS CryptoKey // (https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) - // name or CryptoKeyVersion + // names or CryptoKeyVersion // (https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) - // name. This field is available only when the resource's Protobuf - // contains it. To search against the `kms_key`: * Use a field query. - // Example: `kmsKey:key` * Use a free text query. Example: `key` - KmsKey string `json:"kmsKey,omitempty"` + // names. This field is available only when the resource's Protobuf + // contains it. To search against the `kms_keys`: * Use a field query. + // Example: `kmsKeys:key` * Use a free text query. Example: `key` + KmsKeys []string `json:"kmsKeys,omitempty"` // Labels: Labels associated with this resource. See Labelling and // grouping GCP resources diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index 781ab8da12d..cdea78323ad 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -1075,6 +1075,265 @@ } } }, + "gitLabConfigs": { + "methods": { + "create": { + "description": "Creates a new `GitLabConfig`. This API is experimental", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.gitLabConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "gitlabConfigId": { + "description": "Optional. The ID to use for the GitLabConfig, which will become the final component of the GitLabConfig’s resource name. gitlab_config_id must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/gitLabConfigs", + "request": { + "$ref": "GitLabConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a `GitLabConfig`. This API is experimental", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}", + "httpMethod": "DELETE", + "id": "cloudbuild.projects.locations.gitLabConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The config resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `GitLabConfig`. This API is experimental", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.gitLabConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The config resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GitLabConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List all `GitLabConfigs` for a given project. This API is experimental", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.gitLabConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 50 configs will be returned. The maximum value is 1000;, values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous ‘ListGitlabConfigsRequest’ call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ‘ListGitlabConfigsRequest’ must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/gitLabConfigs", + "response": { + "$ref": "ListGitLabConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing `GitLabConfig`. This API is experimental", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}", + "httpMethod": "PATCH", + "id": "cloudbuild.projects.locations.gitLabConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name for the config.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GitLabConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeGitLabConnectedRepository": { + "description": "Remove a GitLab repository from a given GitLabConfig's connected repositories. This API is experimental.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}:removeGitLabConnectedRepository", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.gitLabConfigs.removeGitLabConnectedRepository", + "parameterOrder": [ + "config" + ], + "parameters": { + "config": { + "description": "Required. The name of the `GitLabConfig` to remove a connected repository. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+config}:removeGitLabConnectedRepository", + "request": { + "$ref": "RemoveGitLabConnectedRepositoryRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "connectedRepositories": { + "methods": { + "batchCreate": { + "description": "Batch connecting GitLab repositories to Cloud Build. This API is experimental.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}/connectedRepositories:batchCreate", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.gitLabConfigs.connectedRepositories.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The name of the `GitLabConfig` that adds connected repositories. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/connectedRepositories:batchCreate", + "request": { + "$ref": "BatchCreateGitLabConnectedRepositoriesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "repos": { + "methods": { + "list": { + "description": "List all repositories for a given `GitLabConfig`. This API is experimental", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}/repos", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.gitLabConfigs.repos.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of repositories to return. The service may return fewer than this value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous ListGitLabRepositoriesRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGitLabRepositoriesRequest` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/repos", + "response": { + "$ref": "ListGitLabRepositoriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "githubEnterpriseConfigs": { "methods": { "create": { @@ -2036,7 +2295,7 @@ } } }, - "revision": "20220826", + "revision": "20220916", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -2209,6 +2468,55 @@ }, "type": "object" }, + "BatchCreateGitLabConnectedRepositoriesRequest": { + "description": "RPC request object accepted by BatchCreateGitLabConnectedRepositories RPC method.", + "id": "BatchCreateGitLabConnectedRepositoriesRequest", + "properties": { + "requests": { + "description": "Required. Requests to connect GitLab repositories.", + "items": { + "$ref": "CreateGitLabConnectedRepositoryRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateGitLabConnectedRepositoriesResponse": { + "description": "Response of BatchCreateGitLabConnectedRepositories RPC method.", + "id": "BatchCreateGitLabConnectedRepositoriesResponse", + "properties": { + "gitlabConnectedRepositories": { + "description": "The GitLab connected repository requests' responses.", + "items": { + "$ref": "GitLabConnectedRepository" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateGitLabConnectedRepositoriesResponseMetadata": { + "description": "Metadata for `BatchCreateGitLabConnectedRepositories` operation.", + "id": "BatchCreateGitLabConnectedRepositoriesResponseMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "config": { + "description": "The name of the `GitLabConfig` that added connected repositories. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "BitbucketServerConfig": { "description": "BitbucketServerConfig represents the configuration for a Bitbucket Server.", "id": "BitbucketServerConfig", @@ -2947,6 +3255,10 @@ "$ref": "GitHubEventsConfig", "description": "GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`." }, + "gitlabEnterpriseEventsConfig": { + "$ref": "GitLabEventsConfig", + "description": "GitLabEnterpriseEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab Enterprise event is received." + }, "id": { "description": "Output only. Unique identifier of the trigger.", "readOnly": true, @@ -3125,6 +3437,42 @@ }, "type": "object" }, + "CreateGitLabConfigOperationMetadata": { + "description": "Metadata for `CreateGitLabConfig` operation.", + "id": "CreateGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, + "CreateGitLabConnectedRepositoryRequest": { + "description": "Request to connect a repository from a connected GitLab host.", + "id": "CreateGitLabConnectedRepositoryRequest", + "properties": { + "gitlabConnectedRepository": { + "$ref": "GitLabConnectedRepository", + "description": "Required. The GitLab repository to connect." + }, + "parent": { + "description": "Required. The name of the `GitLabConfig` that adds connected repository. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + } + }, + "type": "object" + }, "CreateWorkerPoolOperationMetadata": { "description": "Metadata for the `CreateWorkerPool` operation.", "id": "CreateWorkerPoolOperationMetadata", @@ -3188,6 +3536,27 @@ }, "type": "object" }, + "DeleteGitLabConfigOperationMetadata": { + "description": "Metadata for `DeleteGitLabConfig` operation.", + "id": "DeleteGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "DeleteWorkerPoolOperationMetadata": { "description": "Metadata for the `DeleteWorkerPool` operation.", "id": "DeleteWorkerPoolOperationMetadata", @@ -3422,6 +3791,181 @@ }, "type": "object" }, + "GitLabConfig": { + "description": "GitLabConfig represents the configuration for a GitLab integration.", + "id": "GitLabConfig", + "properties": { + "connectedRepositories": { + "description": "Connected GitLab.com or GitLabEnterprise repositories for this config.", + "items": { + "$ref": "GitLabRepositoryId" + }, + "type": "array" + }, + "createTime": { + "description": "Output only. Time when the config was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "enterpriseConfig": { + "$ref": "GitLabEnterpriseConfig", + "description": "Optional. GitLabEnterprise config." + }, + "name": { + "description": "The resource name for the config.", + "type": "string" + }, + "secrets": { + "$ref": "GitLabSecrets", + "description": "Required. Secret Manager secrets needed by the config." + }, + "username": { + "description": "Username of the GitLab.com or GitLab Enterprise account Cloud Build will use.", + "type": "string" + }, + "webhookKey": { + "description": "Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GitLabConnectedRepository": { + "description": "GitLabConnectedRepository represents a GitLab connected repository request response.", + "id": "GitLabConnectedRepository", + "properties": { + "parent": { + "description": "The name of the `GitLabConfig` that added connected repository. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + }, + "repo": { + "$ref": "GitLabRepositoryId", + "description": "The GitLab repositories to connect." + }, + "status": { + "$ref": "Status", + "description": "Output only. The status of the repo connection request.", + "readOnly": true + } + }, + "type": "object" + }, + "GitLabEnterpriseConfig": { + "description": "GitLabEnterpriseConfig represents the configuration for a GitLabEnterprise integration.", + "id": "GitLabEnterpriseConfig", + "properties": { + "hostUri": { + "description": "Immutable. The URI of the GitlabEnterprise host.", + "type": "string" + }, + "serviceDirectoryConfig": { + "$ref": "ServiceDirectoryConfig", + "description": "The Service Directory configuration to be used when reaching out to the GitLab Enterprise instance." + }, + "sslCa": { + "description": "The SSL certificate to use in requests to GitLab Enterprise instances.", + "type": "string" + } + }, + "type": "object" + }, + "GitLabEventsConfig": { + "description": "GitLabEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab event is received.", + "id": "GitLabEventsConfig", + "properties": { + "gitlabConfig": { + "$ref": "GitLabConfig", + "description": "Output only. The GitLabConfig specified in the gitlab_config_resource field.", + "readOnly": true + }, + "gitlabConfigResource": { + "description": "The GitLab config resource that this trigger config maps to.", + "type": "string" + }, + "projectNamespace": { + "description": "Namespace of the GitLab project.", + "type": "string" + }, + "pullRequest": { + "$ref": "PullRequestFilter", + "description": "Filter to match changes in pull requests." + }, + "push": { + "$ref": "PushFilter", + "description": "Filter to match changes in refs like branches, tags." + } + }, + "type": "object" + }, + "GitLabRepository": { + "description": "Proto Representing a GitLabRepository", + "id": "GitLabRepository", + "properties": { + "browseUri": { + "description": "Link to the browse repo page on the GitLab instance", + "type": "string" + }, + "description": { + "description": "Description of the repository", + "type": "string" + }, + "displayName": { + "description": "Display name of the repository", + "type": "string" + }, + "name": { + "description": "The resource name of the repository", + "type": "string" + }, + "repositoryId": { + "$ref": "GitLabRepositoryId", + "description": "Identifier for a repository" + } + }, + "type": "object" + }, + "GitLabRepositoryId": { + "description": "GitLabRepositoryId identifies a specific repository hosted on GitLab.com or GitLabEnterprise", + "id": "GitLabRepositoryId", + "properties": { + "id": { + "description": "Required. Identifier for the repository. example: \"namespace/project-slug\", namespace is usually the username or group ID", + "type": "string" + }, + "webhookId": { + "description": "Output only. The ID of the webhook that was created for receiving events from this repo. We only create and manage a single webhook for each repo.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GitLabSecrets": { + "description": "GitLabSecrets represents the secrets in Secret Manager for a GitLab integration.", + "id": "GitLabSecrets", + "properties": { + "apiAccessTokenVersion": { + "description": "Required. The resource name for the api access token’s secret version", + "type": "string" + }, + "apiKeyVersion": { + "description": "Required. Immutable. API Key that will be attached to webhook requests from GitLab to Cloud Build.", + "type": "string" + }, + "readAccessTokenVersion": { + "description": "Required. The resource name for the read access token’s secret version", + "type": "string" + }, + "webhookSecretVersion": { + "description": "Required. Immutable. The resource name for the webhook secret’s secret version. Once this field has been set, it cannot be changed. If you need to change it, please create another GitLabConfig.", + "type": "string" + } + }, + "type": "object" + }, "GitRepoSource": { "description": "GitRepoSource describes a repo and ref of a code repository.", "id": "GitRepoSource", @@ -3660,6 +4204,42 @@ }, "type": "object" }, + "ListGitLabConfigsResponse": { + "description": "RPC response object returned by ListGitLabConfigs RPC method.", + "id": "ListGitLabConfigsResponse", + "properties": { + "gitlabConfigs": { + "description": "A list of GitLabConfigs", + "items": { + "$ref": "GitLabConfig" + }, + "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" + } + }, + "type": "object" + }, + "ListGitLabRepositoriesResponse": { + "description": "RPC response object returned by the ListGitLabRepositories RPC method.", + "id": "ListGitLabRepositoriesResponse", + "properties": { + "gitlabRepositories": { + "description": "List of GitLab repositories", + "items": { + "$ref": "GitLabRepository" + }, + "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" + } + }, + "type": "object" + }, "ListGithubEnterpriseConfigsResponse": { "description": "RPC response object returned by ListGithubEnterpriseConfigs RPC method.", "id": "ListGithubEnterpriseConfigsResponse", @@ -4059,6 +4639,17 @@ }, "type": "object" }, + "RemoveGitLabConnectedRepositoryRequest": { + "description": "RPC request object accepted by RemoveGitLabConnectedRepository RPC method.", + "id": "RemoveGitLabConnectedRepositoryRequest", + "properties": { + "connectedRepository": { + "$ref": "GitLabRepositoryId", + "description": "The connected repository to remove." + } + }, + "type": "object" + }, "RepoSource": { "description": "Location of the source in a Google Cloud Source Repository.", "id": "RepoSource", @@ -4314,6 +4905,17 @@ }, "type": "object" }, + "ServiceDirectoryConfig": { + "description": "ServiceDirectoryConfig represents Service Directory configuration for a SCM host connection.", + "id": "ServiceDirectoryConfig", + "properties": { + "service": { + "description": "The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.", + "type": "string" + } + }, + "type": "object" + }, "SlackDelivery": { "description": "SlackDelivery is the delivery configuration for delivering Slack messages via webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/webhooks.", "id": "SlackDelivery", @@ -4497,6 +5099,27 @@ }, "type": "object" }, + "UpdateGitLabConfigOperationMetadata": { + "description": "Metadata for `UpdateGitLabConfig` operation.", + "id": "UpdateGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "UpdateWorkerPoolOperationMetadata": { "description": "Metadata for the `UpdateWorkerPool` operation.", "id": "UpdateWorkerPoolOperationMetadata", diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index bcb26ac03d7..a75a5615a88 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -219,6 +219,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.BitbucketServerConfigs = NewProjectsLocationsBitbucketServerConfigsService(s) rs.Builds = NewProjectsLocationsBuildsService(s) + rs.GitLabConfigs = NewProjectsLocationsGitLabConfigsService(s) rs.GithubEnterpriseConfigs = NewProjectsLocationsGithubEnterpriseConfigsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.Triggers = NewProjectsLocationsTriggersService(s) @@ -233,6 +234,8 @@ type ProjectsLocationsService struct { Builds *ProjectsLocationsBuildsService + GitLabConfigs *ProjectsLocationsGitLabConfigsService + GithubEnterpriseConfigs *ProjectsLocationsGithubEnterpriseConfigsService Operations *ProjectsLocationsOperationsService @@ -284,6 +287,39 @@ type ProjectsLocationsBuildsService struct { s *Service } +func NewProjectsLocationsGitLabConfigsService(s *Service) *ProjectsLocationsGitLabConfigsService { + rs := &ProjectsLocationsGitLabConfigsService{s: s} + rs.ConnectedRepositories = NewProjectsLocationsGitLabConfigsConnectedRepositoriesService(s) + rs.Repos = NewProjectsLocationsGitLabConfigsReposService(s) + return rs +} + +type ProjectsLocationsGitLabConfigsService struct { + s *Service + + ConnectedRepositories *ProjectsLocationsGitLabConfigsConnectedRepositoriesService + + Repos *ProjectsLocationsGitLabConfigsReposService +} + +func NewProjectsLocationsGitLabConfigsConnectedRepositoriesService(s *Service) *ProjectsLocationsGitLabConfigsConnectedRepositoriesService { + rs := &ProjectsLocationsGitLabConfigsConnectedRepositoriesService{s: s} + return rs +} + +type ProjectsLocationsGitLabConfigsConnectedRepositoriesService struct { + s *Service +} + +func NewProjectsLocationsGitLabConfigsReposService(s *Service) *ProjectsLocationsGitLabConfigsReposService { + rs := &ProjectsLocationsGitLabConfigsReposService{s: s} + return rs +} + +type ProjectsLocationsGitLabConfigsReposService struct { + s *Service +} + func NewProjectsLocationsGithubEnterpriseConfigsService(s *Service) *ProjectsLocationsGithubEnterpriseConfigsService { rs := &ProjectsLocationsGithubEnterpriseConfigsService{s: s} return rs @@ -672,6 +708,104 @@ func (s *BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BatchCreateGitLabConnectedRepositoriesRequest: RPC request object +// accepted by BatchCreateGitLabConnectedRepositories RPC method. +type BatchCreateGitLabConnectedRepositoriesRequest struct { + // Requests: Required. Requests to connect GitLab repositories. + Requests []*CreateGitLabConnectedRepositoryRequest `json:"requests,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Requests") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchCreateGitLabConnectedRepositoriesResponse: Response of +// BatchCreateGitLabConnectedRepositories RPC method. +type BatchCreateGitLabConnectedRepositoriesResponse struct { + // GitlabConnectedRepositories: The GitLab connected repository + // requests' responses. + GitlabConnectedRepositories []*GitLabConnectedRepository `json:"gitlabConnectedRepositories,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "GitlabConnectedRepositories") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "GitlabConnectedRepositories") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchCreateGitLabConnectedRepositoriesResponseMetadata: Metadata for +// `BatchCreateGitLabConnectedRepositories` operation. +type BatchCreateGitLabConnectedRepositoriesResponseMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // Config: The name of the `GitLabConfig` that added connected + // repositories. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Config string `json:"config,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesResponseMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BitbucketServerConfig: BitbucketServerConfig represents the // configuration for a Bitbucket Server. type BitbucketServerConfig struct { @@ -1557,6 +1691,11 @@ type BuildTrigger struct { // exclusive with `trigger_template`. Github *GitHubEventsConfig `json:"github,omitempty"` + // GitlabEnterpriseEventsConfig: GitLabEnterpriseEventsConfig describes + // the configuration of a trigger that creates a build whenever a GitLab + // Enterprise event is received. + GitlabEnterpriseEventsConfig *GitLabEventsConfig `json:"gitlabEnterpriseEventsConfig,omitempty"` + // Id: Output only. Unique identifier of the trigger. Id string `json:"id,omitempty"` @@ -1860,6 +1999,79 @@ func (s *CreateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreateGitLabConfigOperationMetadata: Metadata for +// `CreateGitLabConfig` operation. +type CreateGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CreateGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateGitLabConnectedRepositoryRequest: Request to connect a +// repository from a connected GitLab host. +type CreateGitLabConnectedRepositoryRequest struct { + // GitlabConnectedRepository: Required. The GitLab repository to + // connect. + GitlabConnectedRepository *GitLabConnectedRepository `json:"gitlabConnectedRepository,omitempty"` + + // Parent: Required. The name of the `GitLabConfig` that adds connected + // repository. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Parent string `json:"parent,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "GitlabConnectedRepository") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "GitlabConnectedRepository") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateGitLabConnectedRepositoryRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreateGitLabConnectedRepositoryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateWorkerPoolOperationMetadata: Metadata for the // `CreateWorkerPool` operation. type CreateWorkerPoolOperationMetadata struct { @@ -1973,6 +2185,42 @@ func (s *DeleteGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeleteGitLabConfigOperationMetadata: Metadata for +// `DeleteGitLabConfig` operation. +type DeleteGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeleteGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DeleteGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeleteWorkerPoolOperationMetadata: Metadata for the // `DeleteWorkerPool` operation. type DeleteWorkerPoolOperationMetadata struct { @@ -2345,40 +2593,39 @@ func (s *GitHubEventsConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GitRepoSource: GitRepoSource describes a repo and ref of a code -// repository. -type GitRepoSource struct { - // BitbucketServerConfig: The full resource name of the bitbucket server - // config. Format: - // `projects/{project}/locations/{location}/bitbucketServerConfigs/{id}`. - BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"` +// GitLabConfig: GitLabConfig represents the configuration for a GitLab +// integration. +type GitLabConfig struct { + // ConnectedRepositories: Connected GitLab.com or GitLabEnterprise + // repositories for this config. + ConnectedRepositories []*GitLabRepositoryId `json:"connectedRepositories,omitempty"` - // GithubEnterpriseConfig: The full resource name of the github - // enterprise config. Format: - // `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}` - // . `projects/{project}/githubEnterpriseConfigs/{id}`. - GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"` + // CreateTime: Output only. Time when the config was created. + CreateTime string `json:"createTime,omitempty"` - // Ref: The branch or tag to use. Must start with "refs/" (required). - Ref string `json:"ref,omitempty"` + // EnterpriseConfig: Optional. GitLabEnterprise config. + EnterpriseConfig *GitLabEnterpriseConfig `json:"enterpriseConfig,omitempty"` - // RepoType: See RepoType below. - // - // Possible values: - // "UNKNOWN" - The default, unknown repo type. - // "CLOUD_SOURCE_REPOSITORIES" - A Google Cloud Source - // Repositories-hosted repo. - // "GITHUB" - A GitHub-hosted repo not necessarily on "github.com" - // (i.e. GitHub Enterprise). - // "BITBUCKET_SERVER" - A Bitbucket Server-hosted repo. - RepoType string `json:"repoType,omitempty"` + // Name: The resource name for the config. + Name string `json:"name,omitempty"` - // Uri: The URI of the repo. Either uri or repository can be specified - // and is required. - Uri string `json:"uri,omitempty"` + // Secrets: Required. Secret Manager secrets needed by the config. + Secrets *GitLabSecrets `json:"secrets,omitempty"` + + // Username: Username of the GitLab.com or GitLab Enterprise account + // Cloud Build will use. + Username string `json:"username,omitempty"` + + // WebhookKey: Output only. UUID included in webhook requests. The UUID + // is used to look up the corresponding config. + WebhookKey string `json:"webhookKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. - // "BitbucketServerConfig") to unconditionally include in API requests. + // "ConnectedRepositories") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API // requests. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -2386,7 +2633,7 @@ type GitRepoSource struct { // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BitbucketServerConfig") to + // NullFields is a list of field names (e.g. "ConnectedRepositories") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2396,42 +2643,27 @@ type GitRepoSource struct { NullFields []string `json:"-"` } -func (s *GitRepoSource) MarshalJSON() ([]byte, error) { - type NoMethod GitRepoSource +func (s *GitLabConfig) MarshalJSON() ([]byte, error) { + type NoMethod GitLabConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata -// of the long-running operation. -type GoogleDevtoolsCloudbuildV2OperationMetadata 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 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`. - RequestedCancellation bool `json:"requestedCancellation,omitempty"` - - // StatusMessage: Output only. Human-readable status of the operation, - // if any. - StatusMessage string `json:"statusMessage,omitempty"` +// GitLabConnectedRepository: GitLabConnectedRepository represents a +// GitLab connected repository request response. +type GitLabConnectedRepository struct { + // Parent: The name of the `GitLabConfig` that added connected + // repository. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Parent string `json:"parent,omitempty"` - // Target: Output only. Server-defined resource path for the target of - // the operation. - Target string `json:"target,omitempty"` + // Repo: The GitLab repositories to connect. + Repo *GitLabRepositoryId `json:"repo,omitempty"` - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` + // Status: Output only. The status of the repo connection request. + Status *Status `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // ForceSendFields is a list of field names (e.g. "Parent") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2439,8 +2671,319 @@ type GoogleDevtoolsCloudbuildV2OperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Parent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabConnectedRepository) MarshalJSON() ([]byte, error) { + type NoMethod GitLabConnectedRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitLabEnterpriseConfig: GitLabEnterpriseConfig represents the +// configuration for a GitLabEnterprise integration. +type GitLabEnterpriseConfig struct { + // HostUri: Immutable. The URI of the GitlabEnterprise host. + HostUri string `json:"hostUri,omitempty"` + + // ServiceDirectoryConfig: The Service Directory configuration to be + // used when reaching out to the GitLab Enterprise instance. + ServiceDirectoryConfig *ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` + + // SslCa: The SSL certificate to use in requests to GitLab Enterprise + // instances. + SslCa string `json:"sslCa,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HostUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabEnterpriseConfig) MarshalJSON() ([]byte, error) { + type NoMethod GitLabEnterpriseConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitLabEventsConfig: GitLabEventsConfig describes the configuration of +// a trigger that creates a build whenever a GitLab event is received. +type GitLabEventsConfig struct { + // GitlabConfig: Output only. The GitLabConfig specified in the + // gitlab_config_resource field. + GitlabConfig *GitLabConfig `json:"gitlabConfig,omitempty"` + + // GitlabConfigResource: The GitLab config resource that this trigger + // config maps to. + GitlabConfigResource string `json:"gitlabConfigResource,omitempty"` + + // ProjectNamespace: Namespace of the GitLab project. + ProjectNamespace string `json:"projectNamespace,omitempty"` + + // PullRequest: Filter to match changes in pull requests. + PullRequest *PullRequestFilter `json:"pullRequest,omitempty"` + + // Push: Filter to match changes in refs like branches, tags. + Push *PushFilter `json:"push,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GitlabConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GitlabConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabEventsConfig) MarshalJSON() ([]byte, error) { + type NoMethod GitLabEventsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitLabRepository: Proto Representing a GitLabRepository +type GitLabRepository struct { + // BrowseUri: Link to the browse repo page on the GitLab instance + BrowseUri string `json:"browseUri,omitempty"` + + // Description: Description of the repository + Description string `json:"description,omitempty"` + + // DisplayName: Display name of the repository + DisplayName string `json:"displayName,omitempty"` + + // Name: The resource name of the repository + Name string `json:"name,omitempty"` + + // RepositoryId: Identifier for a repository + RepositoryId *GitLabRepositoryId `json:"repositoryId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BrowseUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BrowseUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabRepository) MarshalJSON() ([]byte, error) { + type NoMethod GitLabRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitLabRepositoryId: GitLabRepositoryId identifies a specific +// repository hosted on GitLab.com or GitLabEnterprise +type GitLabRepositoryId struct { + // Id: Required. Identifier for the repository. example: + // "namespace/project-slug", namespace is usually the username or group + // ID + Id string `json:"id,omitempty"` + + // WebhookId: Output only. The ID of the webhook that was created for + // receiving events from this repo. We only create and manage a single + // webhook for each repo. + WebhookId int64 `json:"webhookId,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabRepositoryId) MarshalJSON() ([]byte, error) { + type NoMethod GitLabRepositoryId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitLabSecrets: GitLabSecrets represents the secrets in Secret Manager +// for a GitLab integration. +type GitLabSecrets struct { + // ApiAccessTokenVersion: Required. The resource name for the api access + // token’s secret version + ApiAccessTokenVersion string `json:"apiAccessTokenVersion,omitempty"` + + // ApiKeyVersion: Required. Immutable. API Key that will be attached to + // webhook requests from GitLab to Cloud Build. + ApiKeyVersion string `json:"apiKeyVersion,omitempty"` + + // ReadAccessTokenVersion: Required. The resource name for the read + // access token’s secret version + ReadAccessTokenVersion string `json:"readAccessTokenVersion,omitempty"` + + // WebhookSecretVersion: Required. Immutable. The resource name for the + // webhook secret’s secret version. Once this field has been set, it + // cannot be changed. If you need to change it, please create another + // GitLabConfig. + WebhookSecretVersion string `json:"webhookSecretVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ApiAccessTokenVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiAccessTokenVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GitLabSecrets) MarshalJSON() ([]byte, error) { + type NoMethod GitLabSecrets + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitRepoSource: GitRepoSource describes a repo and ref of a code +// repository. +type GitRepoSource struct { + // BitbucketServerConfig: The full resource name of the bitbucket server + // config. Format: + // `projects/{project}/locations/{location}/bitbucketServerConfigs/{id}`. + BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"` + + // GithubEnterpriseConfig: The full resource name of the github + // enterprise config. Format: + // `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}` + // . `projects/{project}/githubEnterpriseConfigs/{id}`. + GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"` + + // Ref: The branch or tag to use. Must start with "refs/" (required). + Ref string `json:"ref,omitempty"` + + // RepoType: See RepoType below. + // + // Possible values: + // "UNKNOWN" - The default, unknown repo type. + // "CLOUD_SOURCE_REPOSITORIES" - A Google Cloud Source + // Repositories-hosted repo. + // "GITHUB" - A GitHub-hosted repo not necessarily on "github.com" + // (i.e. GitHub Enterprise). + // "BITBUCKET_SERVER" - A Bitbucket Server-hosted repo. + RepoType string `json:"repoType,omitempty"` + + // Uri: The URI of the repo. Either uri or repository can be specified + // and is required. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BitbucketServerConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BitbucketServerConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GitRepoSource) MarshalJSON() ([]byte, error) { + type NoMethod GitRepoSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata +// of the long-running operation. +type GoogleDevtoolsCloudbuildV2OperationMetadata 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 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`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2764,17 +3307,22 @@ func (s *ListBuildsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListGithubEnterpriseConfigsResponse: RPC response object returned by -// ListGithubEnterpriseConfigs RPC method. -type ListGithubEnterpriseConfigsResponse struct { - // Configs: A list of GitHubEnterpriseConfigs - Configs []*GitHubEnterpriseConfig `json:"configs,omitempty"` +// ListGitLabConfigsResponse: RPC response object returned by +// ListGitLabConfigs RPC method. +type ListGitLabConfigsResponse struct { + // GitlabConfigs: A list of GitLabConfigs + GitlabConfigs []*GitLabConfig `json:"gitlabConfigs,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"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Configs") to + // ForceSendFields is a list of field names (e.g. "GitlabConfigs") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2782,9 +3330,81 @@ type ListGithubEnterpriseConfigsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Configs") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an + // NullFields is a list of field names (e.g. "GitlabConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListGitLabConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGitLabConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListGitLabRepositoriesResponse: RPC response object returned by the +// ListGitLabRepositories RPC method. +type ListGitLabRepositoriesResponse struct { + // GitlabRepositories: List of GitLab repositories + GitlabRepositories []*GitLabRepository `json:"gitlabRepositories,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"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "GitlabRepositories") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GitlabRepositories") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListGitLabRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGitLabRepositoriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListGithubEnterpriseConfigsResponse: RPC response object returned by +// ListGithubEnterpriseConfigs RPC method. +type ListGithubEnterpriseConfigsResponse struct { + // Configs: A list of GitHubEnterpriseConfigs + Configs []*GitHubEnterpriseConfig `json:"configs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Configs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Configs") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. @@ -3493,6 +4113,36 @@ func (s *RemoveBitbucketServerConnectedRepositoryRequest) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RemoveGitLabConnectedRepositoryRequest: RPC request object accepted +// by RemoveGitLabConnectedRepository RPC method. +type RemoveGitLabConnectedRepositoryRequest struct { + // ConnectedRepository: The connected repository to remove. + ConnectedRepository *GitLabRepositoryId `json:"connectedRepository,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConnectedRepository") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConnectedRepository") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RemoveGitLabConnectedRepositoryRequest) MarshalJSON() ([]byte, error) { + type NoMethod RemoveGitLabConnectedRepositoryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RepoSource: Location of the source in a Google Cloud Source // Repository. type RepoSource struct { @@ -3881,6 +4531,37 @@ func (s *Secrets) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceDirectoryConfig: ServiceDirectoryConfig represents Service +// Directory configuration for a SCM host connection. +type ServiceDirectoryConfig struct { + // Service: The Service Directory service name. Format: + // projects/{project}/locations/{location}/namespaces/{namespace}/service + // s/{service}. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Service") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceDirectoryConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceDirectoryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SlackDelivery: SlackDelivery is the delivery configuration for // delivering Slack messages via webhooks. See Slack webhook // documentation at: https://api.slack.com/messaging/webhooks. @@ -4232,6 +4913,42 @@ func (s *UpdateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpdateGitLabConfigOperationMetadata: Metadata for +// `UpdateGitLabConfig` operation. +type UpdateGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod UpdateGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UpdateWorkerPoolOperationMetadata: Metadata for the // `UpdateWorkerPool` operation. type UpdateWorkerPoolOperationMetadata struct { @@ -9229,6 +9946,1285 @@ func (c *ProjectsLocationsBuildsRetryCall) Do(opts ...googleapi.CallOption) (*Op } +// method id "cloudbuild.projects.locations.gitLabConfigs.create": + +type ProjectsLocationsGitLabConfigsCreateCall struct { + s *Service + parent string + gitlabconfig *GitLabConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new `GitLabConfig`. This API is experimental +// +// - parent: Name of the parent resource. +func (r *ProjectsLocationsGitLabConfigsService) Create(parent string, gitlabconfig *GitLabConfig) *ProjectsLocationsGitLabConfigsCreateCall { + c := &ProjectsLocationsGitLabConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.gitlabconfig = gitlabconfig + return c +} + +// GitlabConfigId sets the optional parameter "gitlabConfigId": The ID +// to use for the GitLabConfig, which will become the final component of +// the GitLabConfig’s resource name. gitlab_config_id must meet the +// following requirements: + They must contain only alphanumeric +// characters and dashes. + They can be 1-64 characters long. + They +// must begin and end with an alphanumeric character +func (c *ProjectsLocationsGitLabConfigsCreateCall) GitlabConfigId(gitlabConfigId string) *ProjectsLocationsGitLabConfigsCreateCall { + c.urlParams_.Set("gitlabConfigId", gitlabConfigId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGitLabConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGitLabConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGitLabConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGitLabConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gitlabconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gitLabConfigs") + 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 "cloudbuild.projects.locations.gitLabConfigs.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGitLabConfigsCreateCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new `GitLabConfig`. This API is experimental", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.gitLabConfigs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "gitlabConfigId": { + // "description": "Optional. The ID to use for the GitLabConfig, which will become the final component of the GitLabConfig’s resource name. gitlab_config_id must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/gitLabConfigs", + // "request": { + // "$ref": "GitLabConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.gitLabConfigs.delete": + +type ProjectsLocationsGitLabConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a `GitLabConfig`. This API is experimental +// +// - name: The config resource name. +func (r *ProjectsLocationsGitLabConfigsService) Delete(name string) *ProjectsLocationsGitLabConfigsDeleteCall { + c := &ProjectsLocationsGitLabConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGitLabConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGitLabConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGitLabConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGitLabConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.gitLabConfigs.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGitLabConfigsDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete a `GitLabConfig`. This API is experimental", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}", + // "httpMethod": "DELETE", + // "id": "cloudbuild.projects.locations.gitLabConfigs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The config resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.gitLabConfigs.get": + +type ProjectsLocationsGitLabConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `GitLabConfig`. This API is experimental +// +// - name: The config resource name. +func (r *ProjectsLocationsGitLabConfigsService) Get(name string) *ProjectsLocationsGitLabConfigsGetCall { + c := &ProjectsLocationsGitLabConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGitLabConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGitLabConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGitLabConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGitLabConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGitLabConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGitLabConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.gitLabConfigs.get" call. +// Exactly one of *GitLabConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *GitLabConfig.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGitLabConfigsGetCall) Do(opts ...googleapi.CallOption) (*GitLabConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GitLabConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a `GitLabConfig`. This API is experimental", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.gitLabConfigs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The config resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GitLabConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.gitLabConfigs.list": + +type ProjectsLocationsGitLabConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all `GitLabConfigs` for a given project. This API is +// experimental +// +// - parent: Name of the parent resource. +func (r *ProjectsLocationsGitLabConfigsService) List(parent string) *ProjectsLocationsGitLabConfigsListCall { + c := &ProjectsLocationsGitLabConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of configs to return. The service may return fewer than this value. +// If unspecified, at most 50 configs will be returned. The maximum +// value is 1000;, values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsGitLabConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsGitLabConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous ‘ListGitlabConfigsRequest’ call. Provide +// this to retrieve the subsequent page. When paginating, all other +// parameters provided to ‘ListGitlabConfigsRequest’ must match the +// call that provided the page token. +func (c *ProjectsLocationsGitLabConfigsListCall) PageToken(pageToken string) *ProjectsLocationsGitLabConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGitLabConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGitLabConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGitLabConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGitLabConfigsListCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGitLabConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGitLabConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gitLabConfigs") + 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 "cloudbuild.projects.locations.gitLabConfigs.list" call. +// Exactly one of *ListGitLabConfigsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListGitLabConfigsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGitLabConfigsListCall) Do(opts ...googleapi.CallOption) (*ListGitLabConfigsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListGitLabConfigsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all `GitLabConfigs` for a given project. This API is experimental", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.gitLabConfigs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 50 configs will be returned. The maximum value is 1000;, values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous ‘ListGitlabConfigsRequest’ call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ‘ListGitlabConfigsRequest’ must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the parent resource", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/gitLabConfigs", + // "response": { + // "$ref": "ListGitLabConfigsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsGitLabConfigsListCall) Pages(ctx context.Context, f func(*ListGitLabConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudbuild.projects.locations.gitLabConfigs.patch": + +type ProjectsLocationsGitLabConfigsPatchCall struct { + s *Service + name string + gitlabconfig *GitLabConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing `GitLabConfig`. This API is experimental +// +// - name: The resource name for the config. +func (r *ProjectsLocationsGitLabConfigsService) Patch(name string, gitlabconfig *GitLabConfig) *ProjectsLocationsGitLabConfigsPatchCall { + c := &ProjectsLocationsGitLabConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.gitlabconfig = gitlabconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Update mask for +// the resource. If this is set, the server will only update the fields +// specified in the field mask. Otherwise, a full update of the mutable +// resource fields will be performed. +func (c *ProjectsLocationsGitLabConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGitLabConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGitLabConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGitLabConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGitLabConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGitLabConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gitlabconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.gitLabConfigs.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGitLabConfigsPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing `GitLabConfig`. This API is experimental", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}", + // "httpMethod": "PATCH", + // "id": "cloudbuild.projects.locations.gitLabConfigs.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name for the config.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GitLabConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.gitLabConfigs.removeGitLabConnectedRepository": + +type ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall struct { + s *Service + config string + removegitlabconnectedrepositoryrequest *RemoveGitLabConnectedRepositoryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveGitLabConnectedRepository: Remove a GitLab repository from a +// given GitLabConfig's connected repositories. This API is +// experimental. +// +// - config: The name of the `GitLabConfig` to remove a connected +// repository. Format: +// `projects/{project}/locations/{location}/gitLabConfigs/{config}`. +func (r *ProjectsLocationsGitLabConfigsService) RemoveGitLabConnectedRepository(config string, removegitlabconnectedrepositoryrequest *RemoveGitLabConnectedRepositoryRequest) *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall { + c := &ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.config = config + c.removegitlabconnectedrepositoryrequest = removegitlabconnectedrepositoryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.removegitlabconnectedrepositoryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+config}:removeGitLabConnectedRepository") + 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{ + "config": c.config, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.gitLabConfigs.removeGitLabConnectedRepository" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Remove a GitLab repository from a given GitLabConfig's connected repositories. This API is experimental.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}:removeGitLabConnectedRepository", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.gitLabConfigs.removeGitLabConnectedRepository", + // "parameterOrder": [ + // "config" + // ], + // "parameters": { + // "config": { + // "description": "Required. The name of the `GitLabConfig` to remove a connected repository. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+config}:removeGitLabConnectedRepository", + // "request": { + // "$ref": "RemoveGitLabConnectedRepositoryRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.gitLabConfigs.connectedRepositories.batchCreate": + +type ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall struct { + s *Service + parent string + batchcreategitlabconnectedrepositoriesrequest *BatchCreateGitLabConnectedRepositoriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Batch connecting GitLab repositories to Cloud Build. +// This API is experimental. +// +// - parent: The name of the `GitLabConfig` that adds connected +// repositories. Format: +// `projects/{project}/locations/{location}/gitLabConfigs/{config}`. +func (r *ProjectsLocationsGitLabConfigsConnectedRepositoriesService) BatchCreate(parent string, batchcreategitlabconnectedrepositoriesrequest *BatchCreateGitLabConnectedRepositoriesRequest) *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall { + c := &ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchcreategitlabconnectedrepositoriesrequest = batchcreategitlabconnectedrepositoriesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreategitlabconnectedrepositoriesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connectedRepositories:batchCreate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.gitLabConfigs.connectedRepositories.batchCreate" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Batch connecting GitLab repositories to Cloud Build. This API is experimental.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}/connectedRepositories:batchCreate", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.gitLabConfigs.connectedRepositories.batchCreate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The name of the `GitLabConfig` that adds connected repositories. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/connectedRepositories:batchCreate", + // "request": { + // "$ref": "BatchCreateGitLabConnectedRepositoriesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.gitLabConfigs.repos.list": + +type ProjectsLocationsGitLabConfigsReposListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all repositories for a given `GitLabConfig`. This API is +// experimental +// +// - parent: Name of the parent resource. +func (r *ProjectsLocationsGitLabConfigsReposService) List(parent string) *ProjectsLocationsGitLabConfigsReposListCall { + c := &ProjectsLocationsGitLabConfigsReposListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of repositories to return. The service may return fewer than this +// value. +func (c *ProjectsLocationsGitLabConfigsReposListCall) PageSize(pageSize int64) *ProjectsLocationsGitLabConfigsReposListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous ListGitLabRepositoriesRequest` call. Provide +// this to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListGitLabRepositoriesRequest` must match the +// call that provided the page token. +func (c *ProjectsLocationsGitLabConfigsReposListCall) PageToken(pageToken string) *ProjectsLocationsGitLabConfigsReposListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGitLabConfigsReposListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsReposListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGitLabConfigsReposListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGitLabConfigsReposListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGitLabConfigsReposListCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsReposListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGitLabConfigsReposListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGitLabConfigsReposListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/repos") + 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 "cloudbuild.projects.locations.gitLabConfigs.repos.list" call. +// Exactly one of *ListGitLabRepositoriesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListGitLabRepositoriesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGitLabConfigsReposListCall) Do(opts ...googleapi.CallOption) (*ListGitLabRepositoriesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListGitLabRepositoriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all repositories for a given `GitLabConfig`. This API is experimental", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gitLabConfigs/{gitLabConfigsId}/repos", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.gitLabConfigs.repos.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of repositories to return. The service may return fewer than this value.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous ListGitLabRepositoriesRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGitLabRepositoriesRequest` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gitLabConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/repos", + // "response": { + // "$ref": "ListGitLabRepositoriesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsGitLabConfigsReposListCall) Pages(ctx context.Context, f func(*ListGitLabRepositoriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "cloudbuild.projects.locations.githubEnterpriseConfigs.create": type ProjectsLocationsGithubEnterpriseConfigsCreateCall struct { diff --git a/cloudbuild/v1alpha1/cloudbuild-api.json b/cloudbuild/v1alpha1/cloudbuild-api.json index 83343f5cdae..f1600e7c8f7 100644 --- a/cloudbuild/v1alpha1/cloudbuild-api.json +++ b/cloudbuild/v1alpha1/cloudbuild-api.json @@ -306,7 +306,7 @@ } } }, - "revision": "20220826", + "revision": "20220916", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -454,6 +454,41 @@ }, "type": "object" }, + "BatchCreateGitLabConnectedRepositoriesResponse": { + "description": "Response of BatchCreateGitLabConnectedRepositories RPC method.", + "id": "BatchCreateGitLabConnectedRepositoriesResponse", + "properties": { + "gitlabConnectedRepositories": { + "description": "The GitLab connected repository requests' responses.", + "items": { + "$ref": "GitLabConnectedRepository" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateGitLabConnectedRepositoriesResponseMetadata": { + "description": "Metadata for `BatchCreateGitLabConnectedRepositories` operation.", + "id": "BatchCreateGitLabConnectedRepositoriesResponseMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "config": { + "description": "The name of the `GitLabConfig` that added connected repositories. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "BitbucketServerConnectedRepository": { "description": "/ BitbucketServerConnectedRepository represents a connected Bitbucket Server / repository.", "id": "BitbucketServerConnectedRepository", @@ -1061,6 +1096,27 @@ }, "type": "object" }, + "CreateGitLabConfigOperationMetadata": { + "description": "Metadata for `CreateGitLabConfig` operation.", + "id": "CreateGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "CreateWorkerPoolOperationMetadata": { "description": "Metadata for the `CreateWorkerPool` operation.", "id": "CreateWorkerPoolOperationMetadata", @@ -1124,6 +1180,27 @@ }, "type": "object" }, + "DeleteGitLabConfigOperationMetadata": { + "description": "Metadata for `DeleteGitLabConfig` operation.", + "id": "DeleteGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "DeleteWorkerPoolOperationMetadata": { "description": "Metadata for the `DeleteWorkerPool` operation.", "id": "DeleteWorkerPoolOperationMetadata", @@ -1198,6 +1275,43 @@ }, "type": "object" }, + "GitLabConnectedRepository": { + "description": "GitLabConnectedRepository represents a GitLab connected repository request response.", + "id": "GitLabConnectedRepository", + "properties": { + "parent": { + "description": "The name of the `GitLabConfig` that added connected repository. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + }, + "repo": { + "$ref": "GitLabRepositoryId", + "description": "The GitLab repositories to connect." + }, + "status": { + "$ref": "Status", + "description": "Output only. The status of the repo connection request.", + "readOnly": true + } + }, + "type": "object" + }, + "GitLabRepositoryId": { + "description": "GitLabRepositoryId identifies a specific repository hosted on GitLab.com or GitLabEnterprise", + "id": "GitLabRepositoryId", + "properties": { + "id": { + "description": "Required. Identifier for the repository. example: \"namespace/project-slug\", namespace is usually the username or group ID", + "type": "string" + }, + "webhookId": { + "description": "Output only. The ID of the webhook that was created for receiving events from this repo. We only create and manage a single webhook for each repo.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleDevtoolsCloudbuildV2OperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleDevtoolsCloudbuildV2OperationMetadata", @@ -1955,6 +2069,27 @@ }, "type": "object" }, + "UpdateGitLabConfigOperationMetadata": { + "description": "Metadata for `UpdateGitLabConfig` operation.", + "id": "UpdateGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "UpdateWorkerPoolOperationMetadata": { "description": "Metadata for the `UpdateWorkerPool` operation.", "id": "UpdateWorkerPoolOperationMetadata", diff --git a/cloudbuild/v1alpha1/cloudbuild-gen.go b/cloudbuild/v1alpha1/cloudbuild-gen.go index dd95209fd7a..260f6b64ff3 100644 --- a/cloudbuild/v1alpha1/cloudbuild-gen.go +++ b/cloudbuild/v1alpha1/cloudbuild-gen.go @@ -456,6 +456,75 @@ func (s *BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BatchCreateGitLabConnectedRepositoriesResponse: Response of +// BatchCreateGitLabConnectedRepositories RPC method. +type BatchCreateGitLabConnectedRepositoriesResponse struct { + // GitlabConnectedRepositories: The GitLab connected repository + // requests' responses. + GitlabConnectedRepositories []*GitLabConnectedRepository `json:"gitlabConnectedRepositories,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "GitlabConnectedRepositories") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "GitlabConnectedRepositories") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchCreateGitLabConnectedRepositoriesResponseMetadata: Metadata for +// `BatchCreateGitLabConnectedRepositories` operation. +type BatchCreateGitLabConnectedRepositoriesResponseMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // Config: The name of the `GitLabConfig` that added connected + // repositories. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Config string `json:"config,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesResponseMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BitbucketServerConnectedRepository: / // BitbucketServerConnectedRepository represents a connected Bitbucket // Server / repository. @@ -1178,6 +1247,42 @@ func (s *CreateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreateGitLabConfigOperationMetadata: Metadata for +// `CreateGitLabConfig` operation. +type CreateGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CreateGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateWorkerPoolOperationMetadata: Metadata for the // `CreateWorkerPool` operation. type CreateWorkerPoolOperationMetadata struct { @@ -1291,6 +1396,42 @@ func (s *DeleteGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeleteGitLabConfigOperationMetadata: Metadata for +// `DeleteGitLabConfig` operation. +type DeleteGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeleteGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DeleteGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeleteWorkerPoolOperationMetadata: Metadata for the // `DeleteWorkerPool` operation. type DeleteWorkerPoolOperationMetadata struct { @@ -1411,6 +1552,79 @@ func (s *FileHashes) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GitLabConnectedRepository: GitLabConnectedRepository represents a +// GitLab connected repository request response. +type GitLabConnectedRepository struct { + // Parent: The name of the `GitLabConfig` that added connected + // repository. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Parent string `json:"parent,omitempty"` + + // Repo: The GitLab repositories to connect. + Repo *GitLabRepositoryId `json:"repo,omitempty"` + + // Status: Output only. The status of the repo connection request. + Status *Status `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Parent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Parent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabConnectedRepository) MarshalJSON() ([]byte, error) { + type NoMethod GitLabConnectedRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitLabRepositoryId: GitLabRepositoryId identifies a specific +// repository hosted on GitLab.com or GitLabEnterprise +type GitLabRepositoryId struct { + // Id: Required. Identifier for the repository. example: + // "namespace/project-slug", namespace is usually the username or group + // ID + Id string `json:"id,omitempty"` + + // WebhookId: Output only. The ID of the webhook that was created for + // receiving events from this repo. We only create and manage a single + // webhook for each repo. + WebhookId int64 `json:"webhookId,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabRepositoryId) MarshalJSON() ([]byte, error) { + type NoMethod GitLabRepositoryId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata // of the long-running operation. type GoogleDevtoolsCloudbuildV2OperationMetadata struct { @@ -2710,6 +2924,42 @@ func (s *UpdateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpdateGitLabConfigOperationMetadata: Metadata for +// `UpdateGitLabConfig` operation. +type UpdateGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod UpdateGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UpdateWorkerPoolOperationMetadata: Metadata for the // `UpdateWorkerPool` operation. type UpdateWorkerPoolOperationMetadata struct { diff --git a/cloudbuild/v1alpha2/cloudbuild-api.json b/cloudbuild/v1alpha2/cloudbuild-api.json index 2753426b4c8..71d054ac6e9 100644 --- a/cloudbuild/v1alpha2/cloudbuild-api.json +++ b/cloudbuild/v1alpha2/cloudbuild-api.json @@ -317,7 +317,7 @@ } } }, - "revision": "20220826", + "revision": "20220916", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -465,6 +465,41 @@ }, "type": "object" }, + "BatchCreateGitLabConnectedRepositoriesResponse": { + "description": "Response of BatchCreateGitLabConnectedRepositories RPC method.", + "id": "BatchCreateGitLabConnectedRepositoriesResponse", + "properties": { + "gitlabConnectedRepositories": { + "description": "The GitLab connected repository requests' responses.", + "items": { + "$ref": "GitLabConnectedRepository" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateGitLabConnectedRepositoriesResponseMetadata": { + "description": "Metadata for `BatchCreateGitLabConnectedRepositories` operation.", + "id": "BatchCreateGitLabConnectedRepositoriesResponseMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "config": { + "description": "The name of the `GitLabConfig` that added connected repositories. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "BitbucketServerConnectedRepository": { "description": "/ BitbucketServerConnectedRepository represents a connected Bitbucket Server / repository.", "id": "BitbucketServerConnectedRepository", @@ -1072,6 +1107,27 @@ }, "type": "object" }, + "CreateGitLabConfigOperationMetadata": { + "description": "Metadata for `CreateGitLabConfig` operation.", + "id": "CreateGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "CreateWorkerPoolOperationMetadata": { "description": "Metadata for the `CreateWorkerPool` operation.", "id": "CreateWorkerPoolOperationMetadata", @@ -1135,6 +1191,27 @@ }, "type": "object" }, + "DeleteGitLabConfigOperationMetadata": { + "description": "Metadata for `DeleteGitLabConfig` operation.", + "id": "DeleteGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "DeleteWorkerPoolOperationMetadata": { "description": "Metadata for the `DeleteWorkerPool` operation.", "id": "DeleteWorkerPoolOperationMetadata", @@ -1209,6 +1286,43 @@ }, "type": "object" }, + "GitLabConnectedRepository": { + "description": "GitLabConnectedRepository represents a GitLab connected repository request response.", + "id": "GitLabConnectedRepository", + "properties": { + "parent": { + "description": "The name of the `GitLabConfig` that added connected repository. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + }, + "repo": { + "$ref": "GitLabRepositoryId", + "description": "The GitLab repositories to connect." + }, + "status": { + "$ref": "Status", + "description": "Output only. The status of the repo connection request.", + "readOnly": true + } + }, + "type": "object" + }, + "GitLabRepositoryId": { + "description": "GitLabRepositoryId identifies a specific repository hosted on GitLab.com or GitLabEnterprise", + "id": "GitLabRepositoryId", + "properties": { + "id": { + "description": "Required. Identifier for the repository. example: \"namespace/project-slug\", namespace is usually the username or group ID", + "type": "string" + }, + "webhookId": { + "description": "Output only. The ID of the webhook that was created for receiving events from this repo. We only create and manage a single webhook for each repo.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleDevtoolsCloudbuildV2OperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleDevtoolsCloudbuildV2OperationMetadata", @@ -1958,6 +2072,27 @@ }, "type": "object" }, + "UpdateGitLabConfigOperationMetadata": { + "description": "Metadata for `UpdateGitLabConfig` operation.", + "id": "UpdateGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "UpdateWorkerPoolOperationMetadata": { "description": "Metadata for the `UpdateWorkerPool` operation.", "id": "UpdateWorkerPoolOperationMetadata", diff --git a/cloudbuild/v1alpha2/cloudbuild-gen.go b/cloudbuild/v1alpha2/cloudbuild-gen.go index 81906d9a78c..0b409a723eb 100644 --- a/cloudbuild/v1alpha2/cloudbuild-gen.go +++ b/cloudbuild/v1alpha2/cloudbuild-gen.go @@ -456,6 +456,75 @@ func (s *BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BatchCreateGitLabConnectedRepositoriesResponse: Response of +// BatchCreateGitLabConnectedRepositories RPC method. +type BatchCreateGitLabConnectedRepositoriesResponse struct { + // GitlabConnectedRepositories: The GitLab connected repository + // requests' responses. + GitlabConnectedRepositories []*GitLabConnectedRepository `json:"gitlabConnectedRepositories,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "GitlabConnectedRepositories") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "GitlabConnectedRepositories") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchCreateGitLabConnectedRepositoriesResponseMetadata: Metadata for +// `BatchCreateGitLabConnectedRepositories` operation. +type BatchCreateGitLabConnectedRepositoriesResponseMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // Config: The name of the `GitLabConfig` that added connected + // repositories. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Config string `json:"config,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesResponseMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BitbucketServerConnectedRepository: / // BitbucketServerConnectedRepository represents a connected Bitbucket // Server / repository. @@ -1178,6 +1247,42 @@ func (s *CreateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreateGitLabConfigOperationMetadata: Metadata for +// `CreateGitLabConfig` operation. +type CreateGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CreateGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateWorkerPoolOperationMetadata: Metadata for the // `CreateWorkerPool` operation. type CreateWorkerPoolOperationMetadata struct { @@ -1291,6 +1396,42 @@ func (s *DeleteGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeleteGitLabConfigOperationMetadata: Metadata for +// `DeleteGitLabConfig` operation. +type DeleteGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeleteGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DeleteGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeleteWorkerPoolOperationMetadata: Metadata for the // `DeleteWorkerPool` operation. type DeleteWorkerPoolOperationMetadata struct { @@ -1411,6 +1552,79 @@ func (s *FileHashes) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GitLabConnectedRepository: GitLabConnectedRepository represents a +// GitLab connected repository request response. +type GitLabConnectedRepository struct { + // Parent: The name of the `GitLabConfig` that added connected + // repository. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Parent string `json:"parent,omitempty"` + + // Repo: The GitLab repositories to connect. + Repo *GitLabRepositoryId `json:"repo,omitempty"` + + // Status: Output only. The status of the repo connection request. + Status *Status `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Parent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Parent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabConnectedRepository) MarshalJSON() ([]byte, error) { + type NoMethod GitLabConnectedRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitLabRepositoryId: GitLabRepositoryId identifies a specific +// repository hosted on GitLab.com or GitLabEnterprise +type GitLabRepositoryId struct { + // Id: Required. Identifier for the repository. example: + // "namespace/project-slug", namespace is usually the username or group + // ID + Id string `json:"id,omitempty"` + + // WebhookId: Output only. The ID of the webhook that was created for + // receiving events from this repo. We only create and manage a single + // webhook for each repo. + WebhookId int64 `json:"webhookId,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabRepositoryId) MarshalJSON() ([]byte, error) { + type NoMethod GitLabRepositoryId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata // of the long-running operation. type GoogleDevtoolsCloudbuildV2OperationMetadata struct { @@ -2703,6 +2917,42 @@ func (s *UpdateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpdateGitLabConfigOperationMetadata: Metadata for +// `UpdateGitLabConfig` operation. +type UpdateGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod UpdateGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UpdateWorkerPoolOperationMetadata: Metadata for the // `UpdateWorkerPool` operation. type UpdateWorkerPoolOperationMetadata struct { diff --git a/cloudbuild/v1beta1/cloudbuild-api.json b/cloudbuild/v1beta1/cloudbuild-api.json index 6cdd5361217..0c0d10eb9d3 100644 --- a/cloudbuild/v1beta1/cloudbuild-api.json +++ b/cloudbuild/v1beta1/cloudbuild-api.json @@ -322,7 +322,7 @@ } } }, - "revision": "20220826", + "revision": "20220916", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -470,6 +470,41 @@ }, "type": "object" }, + "BatchCreateGitLabConnectedRepositoriesResponse": { + "description": "Response of BatchCreateGitLabConnectedRepositories RPC method.", + "id": "BatchCreateGitLabConnectedRepositoriesResponse", + "properties": { + "gitlabConnectedRepositories": { + "description": "The GitLab connected repository requests' responses.", + "items": { + "$ref": "GitLabConnectedRepository" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateGitLabConnectedRepositoriesResponseMetadata": { + "description": "Metadata for `BatchCreateGitLabConnectedRepositories` operation.", + "id": "BatchCreateGitLabConnectedRepositoriesResponseMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "config": { + "description": "The name of the `GitLabConfig` that added connected repositories. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "BitbucketServerConnectedRepository": { "description": "/ BitbucketServerConnectedRepository represents a connected Bitbucket Server / repository.", "id": "BitbucketServerConnectedRepository", @@ -1077,6 +1112,27 @@ }, "type": "object" }, + "CreateGitLabConfigOperationMetadata": { + "description": "Metadata for `CreateGitLabConfig` operation.", + "id": "CreateGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "CreateWorkerPoolOperationMetadata": { "description": "Metadata for the `CreateWorkerPool` operation.", "id": "CreateWorkerPoolOperationMetadata", @@ -1140,6 +1196,27 @@ }, "type": "object" }, + "DeleteGitLabConfigOperationMetadata": { + "description": "Metadata for `DeleteGitLabConfig` operation.", + "id": "DeleteGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "DeleteWorkerPoolOperationMetadata": { "description": "Metadata for the `DeleteWorkerPool` operation.", "id": "DeleteWorkerPoolOperationMetadata", @@ -1214,6 +1291,43 @@ }, "type": "object" }, + "GitLabConnectedRepository": { + "description": "GitLabConnectedRepository represents a GitLab connected repository request response.", + "id": "GitLabConnectedRepository", + "properties": { + "parent": { + "description": "The name of the `GitLabConfig` that added connected repository. Format: `projects/{project}/locations/{location}/gitLabConfigs/{config}`", + "type": "string" + }, + "repo": { + "$ref": "GitLabRepositoryId", + "description": "The GitLab repositories to connect." + }, + "status": { + "$ref": "Status", + "description": "Output only. The status of the repo connection request.", + "readOnly": true + } + }, + "type": "object" + }, + "GitLabRepositoryId": { + "description": "GitLabRepositoryId identifies a specific repository hosted on GitLab.com or GitLabEnterprise", + "id": "GitLabRepositoryId", + "properties": { + "id": { + "description": "Required. Identifier for the repository. example: \"namespace/project-slug\", namespace is usually the username or group ID", + "type": "string" + }, + "webhookId": { + "description": "Output only. The ID of the webhook that was created for receiving events from this repo. We only create and manage a single webhook for each repo.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleDevtoolsCloudbuildV2OperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleDevtoolsCloudbuildV2OperationMetadata", @@ -1963,6 +2077,27 @@ }, "type": "object" }, + "UpdateGitLabConfigOperationMetadata": { + "description": "Metadata for `UpdateGitLabConfig` operation.", + "id": "UpdateGitLabConfigOperationMetadata", + "properties": { + "completeTime": { + "description": "Time the operation was completed.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "gitlabConfig": { + "description": "The resource name of the GitLabConfig to be created. Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`.", + "type": "string" + } + }, + "type": "object" + }, "UpdateWorkerPoolOperationMetadata": { "description": "Metadata for the `UpdateWorkerPool` operation.", "id": "UpdateWorkerPoolOperationMetadata", diff --git a/cloudbuild/v1beta1/cloudbuild-gen.go b/cloudbuild/v1beta1/cloudbuild-gen.go index cd52f0af990..c2e2d8516f8 100644 --- a/cloudbuild/v1beta1/cloudbuild-gen.go +++ b/cloudbuild/v1beta1/cloudbuild-gen.go @@ -456,6 +456,75 @@ func (s *BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BatchCreateGitLabConnectedRepositoriesResponse: Response of +// BatchCreateGitLabConnectedRepositories RPC method. +type BatchCreateGitLabConnectedRepositoriesResponse struct { + // GitlabConnectedRepositories: The GitLab connected repository + // requests' responses. + GitlabConnectedRepositories []*GitLabConnectedRepository `json:"gitlabConnectedRepositories,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "GitlabConnectedRepositories") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "GitlabConnectedRepositories") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchCreateGitLabConnectedRepositoriesResponseMetadata: Metadata for +// `BatchCreateGitLabConnectedRepositories` operation. +type BatchCreateGitLabConnectedRepositoriesResponseMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // Config: The name of the `GitLabConfig` that added connected + // repositories. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Config string `json:"config,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateGitLabConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateGitLabConnectedRepositoriesResponseMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BitbucketServerConnectedRepository: / // BitbucketServerConnectedRepository represents a connected Bitbucket // Server / repository. @@ -1178,6 +1247,42 @@ func (s *CreateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreateGitLabConfigOperationMetadata: Metadata for +// `CreateGitLabConfig` operation. +type CreateGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CreateGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateWorkerPoolOperationMetadata: Metadata for the // `CreateWorkerPool` operation. type CreateWorkerPoolOperationMetadata struct { @@ -1291,6 +1396,42 @@ func (s *DeleteGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeleteGitLabConfigOperationMetadata: Metadata for +// `DeleteGitLabConfig` operation. +type DeleteGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeleteGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DeleteGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeleteWorkerPoolOperationMetadata: Metadata for the // `DeleteWorkerPool` operation. type DeleteWorkerPoolOperationMetadata struct { @@ -1411,6 +1552,79 @@ func (s *FileHashes) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GitLabConnectedRepository: GitLabConnectedRepository represents a +// GitLab connected repository request response. +type GitLabConnectedRepository struct { + // Parent: The name of the `GitLabConfig` that added connected + // repository. Format: + // `projects/{project}/locations/{location}/gitLabConfigs/{config}` + Parent string `json:"parent,omitempty"` + + // Repo: The GitLab repositories to connect. + Repo *GitLabRepositoryId `json:"repo,omitempty"` + + // Status: Output only. The status of the repo connection request. + Status *Status `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Parent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Parent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabConnectedRepository) MarshalJSON() ([]byte, error) { + type NoMethod GitLabConnectedRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitLabRepositoryId: GitLabRepositoryId identifies a specific +// repository hosted on GitLab.com or GitLabEnterprise +type GitLabRepositoryId struct { + // Id: Required. Identifier for the repository. example: + // "namespace/project-slug", namespace is usually the username or group + // ID + Id string `json:"id,omitempty"` + + // WebhookId: Output only. The ID of the webhook that was created for + // receiving events from this repo. We only create and manage a single + // webhook for each repo. + WebhookId int64 `json:"webhookId,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitLabRepositoryId) MarshalJSON() ([]byte, error) { + type NoMethod GitLabRepositoryId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata // of the long-running operation. type GoogleDevtoolsCloudbuildV2OperationMetadata struct { @@ -2706,6 +2920,42 @@ func (s *UpdateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpdateGitLabConfigOperationMetadata: Metadata for +// `UpdateGitLabConfig` operation. +type UpdateGitLabConfigOperationMetadata struct { + // CompleteTime: Time the operation was completed. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // GitlabConfig: The resource name of the GitLabConfig to be created. + // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. + GitlabConfig string `json:"gitlabConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompleteTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod UpdateGitLabConfigOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UpdateWorkerPoolOperationMetadata: Metadata for the // `UpdateWorkerPool` operation. type UpdateWorkerPoolOperationMetadata struct { diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index d5db90e03c7..f540ddd2453 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -795,6 +795,111 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "retryJob": { + "description": "Retries the specified Job in a Rollout.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deliveryPipelines/{deliveryPipelinesId}/releases/{releasesId}/rollouts/{rolloutsId}:retryJob", + "httpMethod": "POST", + "id": "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.retryJob", + "parameterOrder": [ + "rollout" + ], + "parameters": { + "rollout": { + "description": "Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deliveryPipelines/[^/]+/releases/[^/]+/rollouts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+rollout}:retryJob", + "request": { + "$ref": "RetryJobRequest" + }, + "response": { + "$ref": "RetryJobResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "jobRuns": { + "methods": { + "get": { + "description": "Gets details of a single JobRun.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deliveryPipelines/{deliveryPipelinesId}/releases/{releasesId}/rollouts/{rolloutsId}/jobRuns/{jobRunsId}", + "httpMethod": "GET", + "id": "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.jobRuns.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the `JobRun`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deliveryPipelines/[^/]+/releases/[^/]+/rollouts/[^/]+/jobRuns/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "JobRun" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists JobRuns in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deliveryPipelines/{deliveryPipelinesId}/releases/{releasesId}/rollouts/{rolloutsId}/jobRuns", + "httpMethod": "GET", + "id": "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.jobRuns.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter results to be returned. See https://google.aip.dev/160 for more details.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of `JobRun` objects to return. The service may return fewer than this value. If unspecified, at most 50 `JobRun` objects will be returned. The maximum value is 1000; values above 1000 will be set to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListJobRuns` call. Provide this to retrieve the subsequent page. When paginating, all other provided parameters match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The `Rollout` which owns this collection of `JobRun` objects.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deliveryPipelines/[^/]+/releases/[^/]+/rollouts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/jobRuns", + "response": { + "$ref": "ListJobRunsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -1229,7 +1334,7 @@ } } }, - "revision": "20220906", + "revision": "20220915", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -1368,7 +1473,7 @@ "id": "CloudRunLocation", "properties": { "location": { - "description": "Required. The location where the Cloud Run Service should be located. Format is `projects/{project}/locations/{location}`.", + "description": "Required. The location for the Cloud Run Service. Format must be `projects/{project}/locations/{location}`.", "type": "string" } }, @@ -1468,7 +1573,7 @@ "additionalProperties": { "type": "string" }, - "description": "User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.", + "description": "User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy.", "type": "object" }, "condition": { @@ -1552,6 +1657,80 @@ }, "type": "object" }, + "DeployJob": { + "description": "A deploy Job.", + "id": "DeployJob", + "properties": {}, + "type": "object" + }, + "DeployJobRun": { + "description": "DeployJobRun contains information specific to a deploy `JobRun`.", + "id": "DeployJobRun", + "properties": { + "build": { + "description": "Output only. The resource name of the Cloud Build `Build` object that is used to deploy. Format is projects/{project}/locations/{location}/builds/{build}.", + "readOnly": true, + "type": "string" + }, + "failureCause": { + "description": "Output only. The reason the deploy failed. This will always be unspecified while the deploy is in progress or if it succeeded.", + "enum": [ + "FAILURE_CAUSE_UNSPECIFIED", + "CLOUD_BUILD_UNAVAILABLE", + "EXECUTION_FAILED", + "DEADLINE_EXCEEDED" + ], + "enumDescriptions": [ + "No reason for failure is specified.", + "Cloud Build is not available, either because it is not enabled or because Google Cloud Deploy has insufficient permissions. See [Required permission](/deploy/docs/cloud-deploy-service-account#required_permissions).", + "The deploy operation did not complete successfully; check Cloud Build logs.", + "The deploy build did not complete within the alloted time." + ], + "readOnly": true, + "type": "string" + }, + "failureMessage": { + "description": "Output only. Additional information about the deploy failure, if available.", + "readOnly": true, + "type": "string" + }, + "metadata": { + "$ref": "DeployJobRunMetadata", + "description": "Output only. Metadata containing information about the deploy job run.", + "readOnly": true + } + }, + "type": "object" + }, + "DeployJobRunMetadata": { + "description": "DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to the user.", + "id": "DeployJobRunMetadata", + "properties": { + "cloudRun": { + "$ref": "CloudRunMetadata", + "description": "Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.", + "readOnly": true + } + }, + "type": "object" + }, + "DeploymentJobs": { + "description": "Deployment job composition.", + "id": "DeploymentJobs", + "properties": { + "deployJob": { + "$ref": "Job", + "description": "Output only. The deploy Job. This is the first job run in the phase.", + "readOnly": true + }, + "verifyJob": { + "$ref": "Job", + "description": "Output only. The verify Job. Runs after a deploy if the deploy succeeds.", + "readOnly": true + } + }, + "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", @@ -1589,12 +1768,14 @@ "enum": [ "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED", "RENDER", - "DEPLOY" + "DEPLOY", + "VERIFY" ], "enumDescriptions": [ "Default value. This value is unused.", "Use for rendering.", - "Use for deploying and deployment hooks." + "Use for deploying and deployment hooks.", + "Use for deployment verification." ], "type": "string" }, @@ -1645,6 +1826,177 @@ }, "type": "object" }, + "Job": { + "description": "Job represents an operation for a `Rollout`.", + "id": "Job", + "properties": { + "deployJob": { + "$ref": "DeployJob", + "description": "Output only. A deploy Job.", + "readOnly": true + }, + "id": { + "description": "Output only. The ID of the Job.", + "readOnly": true, + "type": "string" + }, + "jobRun": { + "description": "Output only. The name of the `JobRun` responsible for the most recent invocation of this Job.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the Job.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "DISABLED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED", + "ABORTED" + ], + "enumDescriptions": [ + "The Job has an unspecified state.", + "The Job is waiting for an earlier Phase(s) or Job(s) to complete.", + "The Job is disabled.", + "The Job is in progress.", + "The Job succeeded.", + "The Job failed.", + "The Job was aborted." + ], + "readOnly": true, + "type": "string" + }, + "verifyJob": { + "$ref": "VerifyJob", + "description": "Output only. A verify Job.", + "readOnly": true + } + }, + "type": "object" + }, + "JobRun": { + "description": "A `JobRun` resource in the Google Cloud Deploy API. A `JobRun` contains information of a single `Rollout` job evaluation.", + "id": "JobRun", + "properties": { + "createTime": { + "description": "Output only. Time at which the `JobRun` was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deployJobRun": { + "$ref": "DeployJobRun", + "description": "Output only. Information specific to a deploy `JobRun`.", + "readOnly": true + }, + "endTime": { + "description": "Output only. Time at which the `JobRun` ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "etag": { + "description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "jobId": { + "description": "Output only. ID of the `Rollout` job this `JobRun` corresponds to.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/ deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/ {rollouts}/jobRuns/{uuid}.", + "type": "string" + }, + "phaseId": { + "description": "Output only. ID of the `Rollout` phase this `JobRun` belongs in.", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. Time at which the `JobRun` was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the `JobRun`.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The `JobRun` has an unspecified state.", + "The `JobRun` is in progress.", + "The `JobRun` has succeeded.", + "The `JobRun` has failed." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. Unique identifier of the `JobRun`.", + "readOnly": true, + "type": "string" + }, + "verifyJobRun": { + "$ref": "VerifyJobRun", + "description": "Output only. Information specific to a verify `JobRun`.", + "readOnly": true + } + }, + "type": "object" + }, + "JobRunNotificationEvent": { + "description": "Payload proto for \"clouddeploy.googleapis.com/jobrun_notification\" Platform Log event that describes the failure to send JobRun resource update Pub/Sub notification.", + "id": "JobRunNotificationEvent", + "properties": { + "jobRun": { + "description": "The name of the `JobRun`.", + "type": "string" + }, + "message": { + "description": "Debug message for when a notification fails to send.", + "type": "string" + }, + "pipelineUid": { + "description": "Unique identifier of the `DeliveryPipeline`.", + "type": "string" + }, + "releaseUid": { + "description": "Unique identifier of the `Release`.", + "type": "string" + }, + "rolloutUid": { + "description": "Unique identifier of the `Rollout`.", + "type": "string" + }, + "targetId": { + "description": "ID of the `Target`.", + "type": "string" + }, + "type": { + "description": "Type of this notification, e.g. for a Pub/Sub failure.", + "enum": [ + "TYPE_UNSPECIFIED", + "TYPE_PUBSUB_NOTIFICATION_FAILURE", + "TYPE_RENDER_STATUES_CHANGE" + ], + "enumDescriptions": [ + "Type is unspecified.", + "A Pub/Sub notification failed to be sent.", + "Release render status changed notification." + ], + "type": "string" + } + }, + "type": "object" + }, "ListDeliveryPipelinesResponse": { "description": "The response object from `ListDeliveryPipelines`.", "id": "ListDeliveryPipelinesResponse", @@ -1670,6 +2022,31 @@ }, "type": "object" }, + "ListJobRunsResponse": { + "description": "ListJobRunsResponse is the response object returned by `ListJobRuns`.", + "id": "ListJobRunsResponse", + "properties": { + "jobRuns": { + "description": "The `JobRun` objects.", + "items": { + "$ref": "JobRun" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -1816,7 +2193,7 @@ "type": "object" }, "Metadata": { - "description": "Metadata surfaces information associated with a `Rollout` to the user.", + "description": "Metadata includes information associated with a `Rollout`.", "id": "Metadata", "properties": { "cloudRun": { @@ -1906,6 +2283,44 @@ }, "type": "object" }, + "Phase": { + "description": "Phase represents a collection of jobs that are logically grouped together for a `Rollout`.", + "id": "Phase", + "properties": { + "deploymentJobs": { + "$ref": "DeploymentJobs", + "description": "Output only. Deployment job composition.", + "readOnly": true + }, + "id": { + "description": "Output only. The ID of the Phase.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Current state of the Phase.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED", + "ABORTED" + ], + "enumDescriptions": [ + "The Phase has an unspecified state.", + "The Phase is waiting for an earlier Phase(s) to complete.", + "The Phase is in progress.", + "The Phase has succeeded.", + "The Phase has failed.", + "The Phase was aborted." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "PipelineCondition": { "description": "PipelineCondition contains all conditions relevant to a Delivery Pipeline.", "id": "PipelineCondition", @@ -2157,6 +2572,27 @@ }, "type": "object" }, + "RetryJobRequest": { + "description": "RetryJobRequest is the request object used by `RetryJob`.", + "id": "RetryJobRequest", + "properties": { + "jobId": { + "description": "Required. The job ID for the Job to retry.", + "type": "string" + }, + "phaseId": { + "description": "Required. The phase ID the Job to retry belongs to.", + "type": "string" + } + }, + "type": "object" + }, + "RetryJobResponse": { + "description": "The response object from 'RetryJob'.", + "id": "RetryJobResponse", + "properties": {}, + "type": "object" + }, "Rollout": { "description": "A `Rollout` resource in the Google Cloud Deploy API. A `Rollout` contains information around a specific deployment to a `Target`.", "id": "Rollout", @@ -2213,7 +2649,8 @@ "EXECUTION_FAILED", "DEADLINE_EXCEEDED", "RELEASE_FAILED", - "RELEASE_ABANDONED" + "RELEASE_ABANDONED", + "VERIFICATION_CONFIG_NOT_FOUND" ], "enumDescriptions": [ "No reason for failure is specified.", @@ -2221,7 +2658,8 @@ "The deploy operation did not complete successfully; check Cloud Build logs.", "Deployment did not complete within the alloted time.", "Release is in a failed state.", - "Release is abandoned." + "Release is abandoned.", + "No skaffold verify configuration was found." ], "readOnly": true, "type": "string" @@ -2272,6 +2710,14 @@ "description": "Optional. Name of the `Rollout`. Format is projects/{project}/ locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/a-z{0,62}.", "type": "string" }, + "phases": { + "description": "Output only. The phases that represent the workflows of this `Rollout`.", + "items": { + "$ref": "Phase" + }, + "readOnly": true, + "type": "array" + }, "state": { "description": "Output only. Current state of the `Rollout`.", "enum": [ @@ -2406,6 +2852,10 @@ }, "type": "array" }, + "strategy": { + "$ref": "Strategy", + "description": "Optional. The strategy to use for a `Rollout` to this stage." + }, "targetId": { "description": "The target_id to which this stage points. This field refers exclusively to the last segment of a target name. For example, this field would just be `my-target` (rather than `projects/project/locations/location/targets/my-target`). The location of the `Target` is inferred to be the same as the location of the `DeliveryPipeline` that contains this `Stage`.", "type": "string" @@ -2413,6 +2863,17 @@ }, "type": "object" }, + "Standard": { + "description": "Standard represents the standard deployment strategy.", + "id": "Standard", + "properties": { + "verify": { + "description": "Whether to verify a deployment.", + "type": "boolean" + } + }, + "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", @@ -2440,6 +2901,17 @@ }, "type": "object" }, + "Strategy": { + "description": "Strategy contains deployment strategy information.", + "id": "Strategy", + "properties": { + "standard": { + "$ref": "Standard", + "description": "Standard deployment strategy executes a single deploy and allows verifying the deployment." + } + }, + "type": "object" + }, "Target": { "description": "A `Target` resource in the Google Cloud Deploy API. A `Target` defines a location to which a Skaffold configuration can be deployed.", "id": "Target", @@ -2582,7 +3054,7 @@ ], "enumDescriptions": [ "No reason for failure is specified.", - "Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See [required permission](/deploy/docs/cloud-deploy-service-account#required_permissions).", + "Cloud Build is not available, either because it is not enabled or because Google Cloud Deploy has insufficient permissions. See [required permission](/deploy/docs/cloud-deploy-service-account#required_permissions).", "The render operation did not complete successfully; check Cloud Build logs." ], "readOnly": true, @@ -2668,6 +3140,58 @@ } }, "type": "object" + }, + "VerifyJob": { + "description": "A verify Job.", + "id": "VerifyJob", + "properties": {}, + "type": "object" + }, + "VerifyJobRun": { + "description": "VerifyJobRun contains information specific to a verify `JobRun`.", + "id": "VerifyJobRun", + "properties": { + "artifactUri": { + "description": "Output only. URI of a directory containing the verify artifacts. This contains the Skaffold event log.", + "readOnly": true, + "type": "string" + }, + "build": { + "description": "Output only. The resource name of the Cloud Build `Build` object that is used to verify. Format is projects/{project}/locations/{location}/builds/{build}.", + "readOnly": true, + "type": "string" + }, + "eventLogPath": { + "description": "Output only. File path of the Skaffold event log relative to the artifact URI.", + "readOnly": true, + "type": "string" + }, + "failureCause": { + "description": "Output only. The reason the verify failed. This will always be unspecified while the verify is in progress or if it succeeded.", + "enum": [ + "FAILURE_CAUSE_UNSPECIFIED", + "CLOUD_BUILD_UNAVAILABLE", + "EXECUTION_FAILED", + "DEADLINE_EXCEEDED", + "VERIFICATION_CONFIG_NOT_FOUND" + ], + "enumDescriptions": [ + "No reason for failure is specified.", + "Cloud Build is not available, either because it is not enabled or because Google Cloud Deploy has insufficient permissions. See [required permission](/deploy/docs/cloud-deploy-service-account#required_permissions).", + "The verify operation did not complete successfully; check Cloud Build logs.", + "The verify build did not complete within the alloted time.", + "No Skaffold verify configuration was found." + ], + "readOnly": true, + "type": "string" + }, + "failureMessage": { + "description": "Output only. Additional information about the verify failure, if available.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index 7571e501314..9cc3bef1138 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -193,11 +193,23 @@ type ProjectsLocationsDeliveryPipelinesReleasesService struct { func NewProjectsLocationsDeliveryPipelinesReleasesRolloutsService(s *Service) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsService { rs := &ProjectsLocationsDeliveryPipelinesReleasesRolloutsService{s: s} + rs.JobRuns = NewProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsService(s) return rs } type ProjectsLocationsDeliveryPipelinesReleasesRolloutsService struct { s *Service + + JobRuns *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsService +} + +func NewProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsService(s *Service) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsService { + rs := &ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsService{s: s} + return rs +} + +type ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsService struct { + s *Service } func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { @@ -512,8 +524,8 @@ type CancelOperationRequest struct { // CloudRunLocation: Information specifying where to deploy a Cloud Run // Service. type CloudRunLocation struct { - // Location: Required. The location where the Cloud Run Service should - // be located. Format is `projects/{project}/locations/{location}`. + // Location: Required. The location for the Cloud Run Service. Format + // must be `projects/{project}/locations/{location}`. Location string `json:"location,omitempty"` // ForceSendFields is a list of field names (e.g. "Location") to @@ -710,9 +722,7 @@ func (s *DefaultPool) MarshalJSON() ([]byte, error) { // Skaffold configuration can progress. type DeliveryPipeline struct { // Annotations: User annotations. These attributes can only be set and - // used by the user, and not by Google Cloud Deploy. See - // https://google.aip.dev/128#annotations for more details such as - // format and size limitations. + // used by the user, and not by Google Cloud Deploy. Annotations map[string]string `json:"annotations,omitempty"` // Condition: Output only. Information around the state of the Delivery @@ -832,6 +842,129 @@ func (s *DeliveryPipelineNotificationEvent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeployJob: A deploy Job. +type DeployJob struct { +} + +// DeployJobRun: DeployJobRun contains information specific to a deploy +// `JobRun`. +type DeployJobRun struct { + // Build: Output only. The resource name of the Cloud Build `Build` + // object that is used to deploy. Format is + // projects/{project}/locations/{location}/builds/{build}. + Build string `json:"build,omitempty"` + + // FailureCause: Output only. The reason the deploy failed. This will + // always be unspecified while the deploy is in progress or if it + // succeeded. + // + // Possible values: + // "FAILURE_CAUSE_UNSPECIFIED" - No reason for failure is specified. + // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either + // because it is not enabled or because Google Cloud Deploy has + // insufficient permissions. See [Required + // permission](/deploy/docs/cloud-deploy-service-account#required_permiss + // ions). + // "EXECUTION_FAILED" - The deploy operation did not complete + // successfully; check Cloud Build logs. + // "DEADLINE_EXCEEDED" - The deploy build did not complete within the + // alloted time. + FailureCause string `json:"failureCause,omitempty"` + + // FailureMessage: Output only. Additional information about the deploy + // failure, if available. + FailureMessage string `json:"failureMessage,omitempty"` + + // Metadata: Output only. Metadata containing information about the + // deploy job run. + Metadata *DeployJobRunMetadata `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Build") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Build") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeployJobRun) MarshalJSON() ([]byte, error) { + type NoMethod DeployJobRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeployJobRunMetadata: DeployJobRunMetadata surfaces information +// associated with a `DeployJobRun` to the user. +type DeployJobRunMetadata struct { + // CloudRun: Output only. The name of the Cloud Run Service that is + // associated with a `DeployJobRun`. + CloudRun *CloudRunMetadata `json:"cloudRun,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CloudRun") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CloudRun") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeployJobRunMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DeployJobRunMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeploymentJobs: Deployment job composition. +type DeploymentJobs struct { + // DeployJob: Output only. The deploy Job. This is the first job run in + // the phase. + DeployJob *Job `json:"deployJob,omitempty"` + + // VerifyJob: Output only. The verify Job. Runs after a deploy if the + // deploy succeeds. + VerifyJob *Job `json:"verifyJob,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeployJob") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeployJob") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeploymentJobs) MarshalJSON() ([]byte, error) { + type NoMethod DeploymentJobs + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -875,6 +1008,7 @@ type ExecutionConfig struct { // value is unused. // "RENDER" - Use for rendering. // "DEPLOY" - Use for deploying and deployment hooks. + // "VERIFY" - Use for deployment verification. Usages []string `json:"usages,omitempty"` // WorkerPool: Optional. The resource name of the `WorkerPool`, with the @@ -1006,6 +1140,190 @@ func (s *GkeCluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Job: Job represents an operation for a `Rollout`. +type Job struct { + // DeployJob: Output only. A deploy Job. + DeployJob *DeployJob `json:"deployJob,omitempty"` + + // Id: Output only. The ID of the Job. + Id string `json:"id,omitempty"` + + // JobRun: Output only. The name of the `JobRun` responsible for the + // most recent invocation of this Job. + JobRun string `json:"jobRun,omitempty"` + + // State: Output only. The current state of the Job. + // + // Possible values: + // "STATE_UNSPECIFIED" - The Job has an unspecified state. + // "PENDING" - The Job is waiting for an earlier Phase(s) or Job(s) to + // complete. + // "DISABLED" - The Job is disabled. + // "IN_PROGRESS" - The Job is in progress. + // "SUCCEEDED" - The Job succeeded. + // "FAILED" - The Job failed. + // "ABORTED" - The Job was aborted. + State string `json:"state,omitempty"` + + // VerifyJob: Output only. A verify Job. + VerifyJob *VerifyJob `json:"verifyJob,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeployJob") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeployJob") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Job) MarshalJSON() ([]byte, error) { + type NoMethod Job + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// JobRun: A `JobRun` resource in the Google Cloud Deploy API. A +// `JobRun` contains information of a single `Rollout` job evaluation. +type JobRun struct { + // CreateTime: Output only. Time at which the `JobRun` was created. + CreateTime string `json:"createTime,omitempty"` + + // DeployJobRun: Output only. Information specific to a deploy `JobRun`. + DeployJobRun *DeployJobRun `json:"deployJobRun,omitempty"` + + // EndTime: Output only. Time at which the `JobRun` ended. + EndTime string `json:"endTime,omitempty"` + + // Etag: Output only. This checksum is computed by the server based on + // the value of other fields, and may be sent on update and delete + // requests to ensure the client has an up-to-date value before + // proceeding. + Etag string `json:"etag,omitempty"` + + // JobId: Output only. ID of the `Rollout` job this `JobRun` corresponds + // to. + JobId string `json:"jobId,omitempty"` + + // Name: Optional. Name of the `JobRun`. Format is + // projects/{project}/locations/{location}/ + // deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/ + // {rollouts}/jobRuns/{uuid}. + Name string `json:"name,omitempty"` + + // PhaseId: Output only. ID of the `Rollout` phase this `JobRun` belongs + // in. + PhaseId string `json:"phaseId,omitempty"` + + // StartTime: Output only. Time at which the `JobRun` was started. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the `JobRun`. + // + // Possible values: + // "STATE_UNSPECIFIED" - The `JobRun` has an unspecified state. + // "IN_PROGRESS" - The `JobRun` is in progress. + // "SUCCEEDED" - The `JobRun` has succeeded. + // "FAILED" - The `JobRun` has failed. + State string `json:"state,omitempty"` + + // Uid: Output only. Unique identifier of the `JobRun`. + Uid string `json:"uid,omitempty"` + + // VerifyJobRun: Output only. Information specific to a verify `JobRun`. + VerifyJobRun *VerifyJobRun `json:"verifyJobRun,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JobRun) MarshalJSON() ([]byte, error) { + type NoMethod JobRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// JobRunNotificationEvent: Payload proto for +// "clouddeploy.googleapis.com/jobrun_notification" Platform Log event +// that describes the failure to send JobRun resource update Pub/Sub +// notification. +type JobRunNotificationEvent struct { + // JobRun: The name of the `JobRun`. + JobRun string `json:"jobRun,omitempty"` + + // Message: Debug message for when a notification fails to send. + Message string `json:"message,omitempty"` + + // PipelineUid: Unique identifier of the `DeliveryPipeline`. + PipelineUid string `json:"pipelineUid,omitempty"` + + // ReleaseUid: Unique identifier of the `Release`. + ReleaseUid string `json:"releaseUid,omitempty"` + + // RolloutUid: Unique identifier of the `Rollout`. + RolloutUid string `json:"rolloutUid,omitempty"` + + // TargetId: ID of the `Target`. + TargetId string `json:"targetId,omitempty"` + + // Type: Type of this notification, e.g. for a Pub/Sub failure. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Type is unspecified. + // "TYPE_PUBSUB_NOTIFICATION_FAILURE" - A Pub/Sub notification failed + // to be sent. + // "TYPE_RENDER_STATUES_CHANGE" - Release render status changed + // notification. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JobRun") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JobRun") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JobRunNotificationEvent) MarshalJSON() ([]byte, error) { + type NoMethod JobRunNotificationEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDeliveryPipelinesResponse: The response object from // `ListDeliveryPipelines`. type ListDeliveryPipelinesResponse struct { @@ -1048,6 +1366,47 @@ func (s *ListDeliveryPipelinesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListJobRunsResponse: ListJobRunsResponse is the response object +// returned by `ListJobRuns`. +type ListJobRunsResponse struct { + // JobRuns: The `JobRun` objects. + JobRuns []*JobRun `json:"jobRuns,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached + 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. "JobRuns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JobRuns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListJobRunsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListJobRunsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -1293,8 +1652,7 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Metadata: Metadata surfaces information associated with a `Rollout` -// to the user. +// Metadata: Metadata includes information associated with a `Rollout`. type Metadata struct { // CloudRun: Output only. The name of the Cloud Run Service that is // associated with a `Rollout`. @@ -1437,27 +1795,72 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PipelineCondition: PipelineCondition contains all conditions relevant -// to a Delivery Pipeline. -type PipelineCondition struct { - // PipelineReadyCondition: Details around the Pipeline's overall status. - PipelineReadyCondition *PipelineReadyCondition `json:"pipelineReadyCondition,omitempty"` +// Phase: Phase represents a collection of jobs that are logically +// grouped together for a `Rollout`. +type Phase struct { + // DeploymentJobs: Output only. Deployment job composition. + DeploymentJobs *DeploymentJobs `json:"deploymentJobs,omitempty"` - // TargetsPresentCondition: Detalis around targets enumerated in the - // pipeline. - TargetsPresentCondition *TargetsPresentCondition `json:"targetsPresentCondition,omitempty"` + // Id: Output only. The ID of the Phase. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "PipelineReadyCondition") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` + // State: Output only. Current state of the Phase. + // + // Possible values: + // "STATE_UNSPECIFIED" - The Phase has an unspecified state. + // "PENDING" - The Phase is waiting for an earlier Phase(s) to + // complete. + // "IN_PROGRESS" - The Phase is in progress. + // "SUCCEEDED" - The Phase has succeeded. + // "FAILED" - The Phase has failed. + // "ABORTED" - The Phase was aborted. + State string `json:"state,omitempty"` - // NullFields is a list of field names (e.g. "PipelineReadyCondition") - // to include in API requests with the JSON null value. By default, + // ForceSendFields is a list of field names (e.g. "DeploymentJobs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeploymentJobs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Phase) MarshalJSON() ([]byte, error) { + type NoMethod Phase + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PipelineCondition: PipelineCondition contains all conditions relevant +// to a Delivery Pipeline. +type PipelineCondition struct { + // PipelineReadyCondition: Details around the Pipeline's overall status. + PipelineReadyCondition *PipelineReadyCondition `json:"pipelineReadyCondition,omitempty"` + + // TargetsPresentCondition: Detalis around targets enumerated in the + // pipeline. + TargetsPresentCondition *TargetsPresentCondition `json:"targetsPresentCondition,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PipelineReadyCondition") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PipelineReadyCondition") + // to include in API requests with the JSON null value. By default, // fields with empty values are omitted from API requests. However, any // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a @@ -1859,6 +2262,45 @@ func (s *ReleaseRenderEvent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RetryJobRequest: RetryJobRequest is the request object used by +// `RetryJob`. +type RetryJobRequest struct { + // JobId: Required. The job ID for the Job to retry. + JobId string `json:"jobId,omitempty"` + + // PhaseId: Required. The phase ID the Job to retry belongs to. + PhaseId string `json:"phaseId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JobId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JobId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RetryJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod RetryJobRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RetryJobResponse: The response object from 'RetryJob'. +type RetryJobResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // Rollout: A `Rollout` resource in the Google Cloud Deploy API. A // `Rollout` contains information around a specific deployment to a // `Target`. @@ -1906,6 +2348,8 @@ type Rollout struct { // alloted time. // "RELEASE_FAILED" - Release is in a failed state. // "RELEASE_ABANDONED" - Release is abandoned. + // "VERIFICATION_CONFIG_NOT_FOUND" - No skaffold verify configuration + // was found. DeployFailureCause string `json:"deployFailureCause,omitempty"` // DeployStartTime: Output only. Time at which the `Rollout` started @@ -1952,6 +2396,10 @@ type Rollout struct { // releases/{release}/rollouts/a-z{0,62}. Name string `json:"name,omitempty"` + // Phases: Output only. The phases that represent the workflows of this + // `Rollout`. + Phases []*Phase `json:"phases,omitempty"` + // State: Output only. Current state of the `Rollout`. // // Possible values: @@ -2160,6 +2608,10 @@ type Stage struct { // this stage's `Target`. Profiles []string `json:"profiles,omitempty"` + // Strategy: Optional. The strategy to use for a `Rollout` to this + // stage. + Strategy *Strategy `json:"strategy,omitempty"` + // TargetId: The target_id to which this stage points. This field refers // exclusively to the last segment of a target name. For example, this // field would just be `my-target` (rather than @@ -2191,6 +2643,34 @@ func (s *Stage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Standard: Standard represents the standard deployment strategy. +type Standard struct { + // Verify: Whether to verify a deployment. + Verify bool `json:"verify,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Verify") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Verify") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Standard) MarshalJSON() ([]byte, error) { + type NoMethod Standard + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -2235,6 +2715,35 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Strategy: Strategy contains deployment strategy information. +type Strategy struct { + // Standard: Standard deployment strategy executes a single deploy and + // allows verifying the deployment. + Standard *Standard `json:"standard,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Standard") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Standard") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Strategy) MarshalJSON() ([]byte, error) { + type NoMethod Strategy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Target: A `Target` resource in the Google Cloud Deploy API. A // `Target` defines a location to which a Skaffold configuration can be // deployed. @@ -2420,8 +2929,8 @@ type TargetRender struct { // Possible values: // "FAILURE_CAUSE_UNSPECIFIED" - No reason for failure is specified. // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either - // because it is not enabled or because Cloud Deploy has insufficient - // permissions. See [required + // because it is not enabled or because Google Cloud Deploy has + // insufficient permissions. See [required // permission](/deploy/docs/cloud-deploy-service-account#required_permiss // ions). // "EXECUTION_FAILED" - The render operation did not complete @@ -2576,6 +3085,72 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VerifyJob: A verify Job. +type VerifyJob struct { +} + +// VerifyJobRun: VerifyJobRun contains information specific to a verify +// `JobRun`. +type VerifyJobRun struct { + // ArtifactUri: Output only. URI of a directory containing the verify + // artifacts. This contains the Skaffold event log. + ArtifactUri string `json:"artifactUri,omitempty"` + + // Build: Output only. The resource name of the Cloud Build `Build` + // object that is used to verify. Format is + // projects/{project}/locations/{location}/builds/{build}. + Build string `json:"build,omitempty"` + + // EventLogPath: Output only. File path of the Skaffold event log + // relative to the artifact URI. + EventLogPath string `json:"eventLogPath,omitempty"` + + // FailureCause: Output only. The reason the verify failed. This will + // always be unspecified while the verify is in progress or if it + // succeeded. + // + // Possible values: + // "FAILURE_CAUSE_UNSPECIFIED" - No reason for failure is specified. + // "CLOUD_BUILD_UNAVAILABLE" - Cloud Build is not available, either + // because it is not enabled or because Google Cloud Deploy has + // insufficient permissions. See [required + // permission](/deploy/docs/cloud-deploy-service-account#required_permiss + // ions). + // "EXECUTION_FAILED" - The verify operation did not complete + // successfully; check Cloud Build logs. + // "DEADLINE_EXCEEDED" - The verify build did not complete within the + // alloted time. + // "VERIFICATION_CONFIG_NOT_FOUND" - No Skaffold verify configuration + // was found. + FailureCause string `json:"failureCause,omitempty"` + + // FailureMessage: Output only. Additional information about the verify + // failure, if available. + FailureMessage string `json:"failureMessage,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ArtifactUri") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VerifyJobRun) MarshalJSON() ([]byte, error) { + type NoMethod VerifyJobRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "clouddeploy.projects.locations.get": type ProjectsLocationsGetCall struct { @@ -5941,6 +6516,520 @@ func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsListCall) Pages(ctx c } } +// method id "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.retryJob": + +type ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall struct { + s *Service + rollout string + retryjobrequest *RetryJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RetryJob: Retries the specified Job in a Rollout. +// +// - rollout: Name of the Rollout. Format is +// projects/{project}/locations/{location}/deliveryPipelines/{deliveryP +// ipeline}/ releases/{release}/rollouts/{rollout}. +func (r *ProjectsLocationsDeliveryPipelinesReleasesRolloutsService) RetryJob(rollout string, retryjobrequest *RetryJobRequest) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall { + c := &ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.rollout = rollout + c.retryjobrequest = retryjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall) Context(ctx context.Context) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.retryjobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+rollout}:retryJob") + 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{ + "rollout": c.rollout, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.retryJob" call. +// Exactly one of *RetryJobResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *RetryJobResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsRetryJobCall) Do(opts ...googleapi.CallOption) (*RetryJobResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RetryJobResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retries the specified Job in a Rollout.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deliveryPipelines/{deliveryPipelinesId}/releases/{releasesId}/rollouts/{rolloutsId}:retryJob", + // "httpMethod": "POST", + // "id": "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.retryJob", + // "parameterOrder": [ + // "rollout" + // ], + // "parameters": { + // "rollout": { + // "description": "Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deliveryPipelines/[^/]+/releases/[^/]+/rollouts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+rollout}:retryJob", + // "request": { + // "$ref": "RetryJobRequest" + // }, + // "response": { + // "$ref": "RetryJobResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.jobRuns.get": + +type ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single JobRun. +// +// - name: Name of the `JobRun`. Format must be +// projects/{project_id}/locations/{location_name}/deliveryPipelines/{p +// ipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRun +// s/{job_run_name}. +func (r *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsService) Get(name string) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall { + c := &ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall) Context(ctx context.Context) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.jobRuns.get" call. +// Exactly one of *JobRun or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *JobRun.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsGetCall) Do(opts ...googleapi.CallOption) (*JobRun, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &JobRun{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single JobRun.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deliveryPipelines/{deliveryPipelinesId}/releases/{releasesId}/rollouts/{rolloutsId}/jobRuns/{jobRunsId}", + // "httpMethod": "GET", + // "id": "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.jobRuns.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the `JobRun`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deliveryPipelines/[^/]+/releases/[^/]+/rollouts/[^/]+/jobRuns/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "JobRun" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.jobRuns.list": + +type ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists JobRuns in a given project and location. +// +// - parent: The `Rollout` which owns this collection of `JobRun` +// objects. +func (r *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsService) List(parent string) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall { + c := &ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter results to be +// returned. See https://google.aip.dev/160 for more details. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) Filter(filter string) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) OrderBy(orderBy string) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of `JobRun` objects to return. The service may return fewer than this +// value. If unspecified, at most 50 `JobRun` objects will be returned. +// The maximum value is 1000; values above 1000 will be set to 1000. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) PageSize(pageSize int64) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListJobRuns` call. Provide this to retrieve +// the subsequent page. When paginating, all other provided parameters +// match the call that provided the page token. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) PageToken(pageToken string) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) Context(ctx context.Context) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobRuns") + 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 "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.jobRuns.list" call. +// Exactly one of *ListJobRunsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListJobRunsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) Do(opts ...googleapi.CallOption) (*ListJobRunsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListJobRunsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists JobRuns in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deliveryPipelines/{deliveryPipelinesId}/releases/{releasesId}/rollouts/{rolloutsId}/jobRuns", + // "httpMethod": "GET", + // "id": "clouddeploy.projects.locations.deliveryPipelines.releases.rollouts.jobRuns.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter results to be returned. See https://google.aip.dev/160 for more details.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of `JobRun` objects to return. The service may return fewer than this value. If unspecified, at most 50 `JobRun` objects will be returned. The maximum value is 1000; values above 1000 will be set to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListJobRuns` call. Provide this to retrieve the subsequent page. When paginating, all other provided parameters match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The `Rollout` which owns this collection of `JobRun` objects.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deliveryPipelines/[^/]+/releases/[^/]+/rollouts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/jobRuns", + // "response": { + // "$ref": "ListJobRunsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsJobRunsListCall) Pages(ctx context.Context, f func(*ListJobRunsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "clouddeploy.projects.locations.operations.cancel": type ProjectsLocationsOperationsCancelCall struct { diff --git a/cloudkms/v1/cloudkms-api.json b/cloudkms/v1/cloudkms-api.json index 30550b13446..7be9dfbccff 100644 --- a/cloudkms/v1/cloudkms-api.json +++ b/cloudkms/v1/cloudkms-api.json @@ -211,6 +211,100 @@ } }, "resources": { + "ekmConfig": { + "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": "v1/projects/{projectsId}/locations/{locationsId}/ekmConfig:getIamPolicy", + "httpMethod": "GET", + "id": "cloudkms.projects.locations.ekmConfig.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/[^/]+/ekmConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" + ] + }, + "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}/ekmConfig:setIamPolicy", + "httpMethod": "POST", + "id": "cloudkms.projects.locations.ekmConfig.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/[^/]+/ekmConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ekmConfig:testIamPermissions", + "httpMethod": "POST", + "id": "cloudkms.projects.locations.ekmConfig.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/[^/]+/ekmConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudkms" + ] + } + } + }, "ekmConnections": { "methods": { "create": { @@ -1582,7 +1676,7 @@ } } }, - "revision": "20220826", + "revision": "20220916", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { diff --git a/cloudkms/v1/cloudkms-gen.go b/cloudkms/v1/cloudkms-gen.go index 6eb77d7325b..89c21d5d335 100644 --- a/cloudkms/v1/cloudkms-gen.go +++ b/cloudkms/v1/cloudkms-gen.go @@ -162,6 +162,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.EkmConfig = NewProjectsLocationsEkmConfigService(s) rs.EkmConnections = NewProjectsLocationsEkmConnectionsService(s) rs.KeyRings = NewProjectsLocationsKeyRingsService(s) return rs @@ -170,11 +171,22 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + EkmConfig *ProjectsLocationsEkmConfigService + EkmConnections *ProjectsLocationsEkmConnectionsService KeyRings *ProjectsLocationsKeyRingsService } +func NewProjectsLocationsEkmConfigService(s *Service) *ProjectsLocationsEkmConfigService { + rs := &ProjectsLocationsEkmConfigService{s: s} + return rs +} + +type ProjectsLocationsEkmConfigService struct { + s *Service +} + func NewProjectsLocationsEkmConnectionsService(s *Service) *ProjectsLocationsEkmConnectionsService { rs := &ProjectsLocationsEkmConnectionsService{s: s} return rs @@ -3638,6 +3650,481 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +// method id "cloudkms.projects.locations.ekmConfig.getIamPolicy": + +type ProjectsLocationsEkmConfigGetIamPolicyCall 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 *ProjectsLocationsEkmConfigService) GetIamPolicy(resource string) *ProjectsLocationsEkmConfigGetIamPolicyCall { + c := &ProjectsLocationsEkmConfigGetIamPolicyCall{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 *ProjectsLocationsEkmConfigGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEkmConfigGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEkmConfigGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEkmConfigGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEkmConfigGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEkmConfigGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEkmConfigGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEkmConfigGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEkmConfigGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEkmConfigGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudkms.projects.locations.ekmConfig.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsEkmConfigGetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ekmConfig:getIamPolicy", + // "httpMethod": "GET", + // "id": "cloudkms.projects.locations.ekmConfig.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/[^/]+/ekmConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" + // ] + // } + +} + +// method id "cloudkms.projects.locations.ekmConfig.setIamPolicy": + +type ProjectsLocationsEkmConfigSetIamPolicyCall 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 *ProjectsLocationsEkmConfigService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEkmConfigSetIamPolicyCall { + c := &ProjectsLocationsEkmConfigSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEkmConfigSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEkmConfigSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEkmConfigSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEkmConfigSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEkmConfigSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEkmConfigSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + 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 "cloudkms.projects.locations.ekmConfig.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsEkmConfigSetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "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}/ekmConfig:setIamPolicy", + // "httpMethod": "POST", + // "id": "cloudkms.projects.locations.ekmConfig.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/[^/]+/ekmConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" + // ] + // } + +} + +// method id "cloudkms.projects.locations.ekmConfig.testIamPermissions": + +type ProjectsLocationsEkmConfigTestIamPermissionsCall 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 *ProjectsLocationsEkmConfigService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEkmConfigTestIamPermissionsCall { + c := &ProjectsLocationsEkmConfigTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEkmConfigTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEkmConfigTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEkmConfigTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEkmConfigTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEkmConfigTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEkmConfigTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + 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 "cloudkms.projects.locations.ekmConfig.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEkmConfigTestIamPermissionsCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ekmConfig:testIamPermissions", + // "httpMethod": "POST", + // "id": "cloudkms.projects.locations.ekmConfig.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/[^/]+/ekmConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudkms" + // ] + // } + +} + // method id "cloudkms.projects.locations.ekmConnections.create": type ProjectsLocationsEkmConnectionsCreateCall struct { diff --git a/cloudsearch/v1/cloudsearch-api.json b/cloudsearch/v1/cloudsearch-api.json index d902f6a6d78..a4fc608160c 100644 --- a/cloudsearch/v1/cloudsearch-api.json +++ b/cloudsearch/v1/cloudsearch-api.json @@ -997,7 +997,7 @@ "type": "boolean" }, "requestOptions.languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. The suggest API does not use this parameter. Instead, suggest autocompletes only based on characters in the query.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. From Suggest API perspective, for 3p suggest this is used as a hint while making predictions to add language boosting.", "location": "query", "type": "string" }, @@ -2059,7 +2059,7 @@ } } }, - "revision": "20220829", + "revision": "20220920", "rootUrl": "https://cloudsearch.googleapis.com/", "schemas": { "AbuseReportingConfig": { @@ -2500,7 +2500,8 @@ "ASSISTIVE_SUGGESTION_APP", "CONTACTS_APP", "ACTIVITY_FEED_APP", - "DRIVE_APP" + "DRIVE_APP", + "CHAT_IN_MEET_APP" ], "enumDescriptions": [ "", @@ -2513,6 +2514,7 @@ "Powered by Bullseye", "", "", + "", "" ], "type": "string" @@ -2581,9 +2583,14 @@ "type": "object" }, "AppsDynamiteSharedActivityFeedAnnotationData": { - "description": "Next Id: 6", + "description": "Next Id: 7", "id": "AppsDynamiteSharedActivityFeedAnnotationData", "properties": { + "activityFeedMessageCreateTime": { + "description": "Timestamp of when the Activity Feed message that contains this annotation was created. This is roughly when the activity happened, such as when a reaction happened, but will have at least some small delay, since the Activity Feed message is created asynchronously after. This timestamp should only be used for display when the activity create time is not available in the Chat UI, like the time of a reaction.", + "format": "google-datetime", + "type": "string" + }, "activityFeedMessageId": { "$ref": "MessageId", "description": "Unique id of the Activity Feed message used by clients to implement click-to-source. This is the same messageId as the top-level id field for the Activity Feed item." @@ -3366,7 +3373,7 @@ "A flat room that contains a single thread.", "A threaded room. Topics in this room are threaded, and users can reply to any topic.", "A DM with immutable group membership. It can be a 1:1 DM or a group DM with multiple human users.", - "A post room. Topics in this room are organized in a post/reply style. See the design doc for more details: go/PostRoomsInDynamite.", + "A post room. Topics in this room are organized in a post/reply style. See the design doc for more details: go/PostRoomsInDynamite. Deprecated. Post rooms are no longer supported.", "Represents an Activity Feed space. These groups are modeled like flat rooms and contain items for users to catch up on important things. Each user should only have one group of this type. See go/activity-feed. LINT.ThenChange(//depot/google3/logs/proto/apps_dynamite/dynamite_visual_element_entry.proto:LoggingGroupType,//depot/google3/java/com/google/apps/dynamite/v1/web/ui/group/groups.js:LoggingGroupType)" ], "type": "string" @@ -3523,6 +3530,9 @@ "SPAM", "CONFIDENTIAL_INFORMATION", "SENSITIVE_INFORMATION", + "FRAUD", + "MALWARE", + "ILLEGAL_ACTIVITIES", "OTHER" ], "enumDescriptions": [ @@ -3533,6 +3543,9 @@ "\"Spam\"", "\"Confidential information\"", "\"Sensitive information\"", + "Phishing, impersonation/misrepresentation, or deceiving other users into sharing information under false pretenses.", + "Malware, viruses, Trojan horses, corrupted files, destructive code, etc.", + "Promoting, organizing, or engaging in illegal activities.", "\"Something else\"" ], "type": "string" @@ -4416,6 +4429,60 @@ }, "type": "object" }, + "AppsDynamiteSharedSegmentedMembershipCount": { + "description": "Contains info on membership count for member types: HUMAN_USER, APP_USER \u0026 ROSTER_MEMBER different states: INVITED, JOINED", + "id": "AppsDynamiteSharedSegmentedMembershipCount", + "properties": { + "memberType": { + "enum": [ + "MEMBER_TYPE_UNSPECIFIED", + "HUMAN_USER", + "ROSTER_MEMBER" + ], + "enumDescriptions": [ + "default value", + "member is a human user", + "member is a roster" + ], + "type": "string" + }, + "membershipCount": { + "description": "count of members with given type and state", + "format": "int32", + "type": "integer" + }, + "membershipState": { + "enum": [ + "MEMBER_UNKNOWN", + "MEMBER_INVITED", + "MEMBER_JOINED", + "MEMBER_NOT_A_MEMBER", + "MEMBER_FAILED" + ], + "enumDescriptions": [ + "Default state, do not use", + "An invitation to the space has been sent", + "User has joined the space", + "User is not a member", + "This state should never be stored in Spanner. It is a state for responses to the clients to indicate that membership mutations have failed and the member is in its previous state." + ], + "type": "string" + } + }, + "type": "object" + }, + "AppsDynamiteSharedSegmentedMembershipCounts": { + "id": "AppsDynamiteSharedSegmentedMembershipCounts", + "properties": { + "value": { + "items": { + "$ref": "AppsDynamiteSharedSegmentedMembershipCount" + }, + "type": "array" + } + }, + "type": "object" + }, "AppsDynamiteSharedSelectionInput": { "description": "A widget that creates a UI item (for example, a drop-down list) with options for users to select.", "id": "AppsDynamiteSharedSelectionInput", @@ -4743,9 +4810,13 @@ "UNKNOWN_STATUS", "SUCCESS", "ERROR", - "NOT_APPLICABLE" + "NOT_APPLICABLE", + "THUMBNAIL_SUCCESS", + "GO_LIVE_SUCCESS" ], "enumDescriptions": [ + "", + "", "", "", "", @@ -5184,6 +5255,21 @@ "description": "Bot-specific profile information.", "id": "BotInfo", "properties": { + "appAllowlistStatus": { + "enum": [ + "UNSPECIFIED_STATUS", + "ALLOWED", + "ALL_APPS_DISABLED_BY_ADMIN", + "APP_NOT_ALLOWLISTED_BY_ADMIN" + ], + "enumDescriptions": [ + "", + "", + "For both ALL_APPS_DISABLED_BY_ADMIN and APP_NOT_ALLOWLISTED_BY_ADMIN, the app should still be visible in the catalog, but usage of the app will be disabled. Indicates that all apps have been disabled by the dasher admin.", + "Indicates that the customer is using allowlisting, but that the bot is not allowlisted." + ], + "type": "string" + }, "appId": { "$ref": "AppId", "description": "Identifier of the application associated with the bot." @@ -5222,6 +5308,10 @@ ], "type": "string" }, + "supportHomeScreen": { + "description": "If the app supports a home screen.", + "type": "boolean" + }, "supportUrls": { "$ref": "SupportUrls", "description": "Urls with additional information related to the bot. This field should always be set even if all the fields within it are empty, so that it is convenient for clients to work with this field in javascript." @@ -5244,21 +5334,6 @@ "type": "string" }, "type": "array" - }, - "whitelistStatus": { - "enum": [ - "UNSPECIFIED_STATUS", - "ALLOWED", - "ALL_BOTS_DISABLED_BY_ADMIN", - "BOT_NOT_WHITELISTED_BY_ADMIN" - ], - "enumDescriptions": [ - "", - "", - "For both ALL_BOTS_DISABLED_BY_ADMIN and BOT_NOT_WHITELISTED_BY_ADMIN, the bot should still be visible in the catalog, but usage of the bot will be disabled. Indicates that all bots has been disabled by the dasher admin.", - "Indicates that the customer is using whitelisting, but that the bot is not whitelisted." - ], - "type": "string" } }, "type": "object" @@ -9066,7 +9141,7 @@ "type": "object" }, "GoogleDocsMetadata": { - "description": "The corpus specific metadata for office-type documents, from Google Docs and other sources. This message is passed to the scorer and beyond. Next tag: 7", + "description": "The corpus specific metadata for office-type documents, from Google Docs and other sources. This message is passed to the scorer and beyond. Next tag: 9", "id": "GoogleDocsMetadata", "properties": { "aclInfo": { @@ -9124,6 +9199,16 @@ "format": "int64", "type": "string" }, + "numSubscribers": { + "description": "Contains number of subscribers for the document.", + "format": "int32", + "type": "integer" + }, + "numViewers": { + "description": "Size of untruncated viewers list.", + "format": "int32", + "type": "integer" + }, "resultInfo": { "$ref": "GoogleDocsResultInfo", "description": "Additional per-result information, akin to Gmail's SingleThreadResponse. Note: GWS no longer seems to use this field, but there's still one reference to it for Scribe, so we can't remove it." @@ -12466,7 +12551,7 @@ "type": "boolean" }, "isWildcardSearchable": { - "description": "Indicates that users can perform wildcard search for this property. Only supported for Text properties. IsReturnable must be true to set this option. In a given datasource maximum of 5 properties can be marked as is_wildcard_searchable.", + "description": "Indicates that users can perform wildcard search for this property. Only supported for Text properties. IsReturnable must be true to set this option. In a given datasource maximum of 5 properties can be marked as is_wildcard_searchable. For more details, see [Define object properties](https://developers.google.com/cloud-search/docs/guides/schema-guide#properties)", "type": "boolean" }, "name": { @@ -12860,12 +12945,14 @@ "enum": [ "MESSAGE_STATE_UNSPECIFIED", "MESSAGE_STATE_ACTIVE", - "MESSAGE_STATE_DELETED" + "MESSAGE_STATE_DELETED", + "MESSAGE_STATE_OTR_EDITED" ], "enumDescriptions": [ "", - "", - "" + "The original message is present in storage and not deleted; the message contents can be hydrated.", + "The original message has been deleted; the message contents cannot be hydrated.", + "The OTR original message was edited and therefore no longer retrievable from storage; the message contents cannot be hydrated. See go/message-quoting-otr-edits for more context." ], "readOnly": true, "type": "string" @@ -13124,7 +13211,7 @@ "description": "Debug options of the request" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. The suggest API does not use this parameter. Instead, suggest autocompletes only based on characters in the query.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. From Suggest API perspective, for 3p suggest this is used as a hint while making predictions to add language boosting.", "type": "string" }, "searchApplicationId": { @@ -13420,6 +13507,10 @@ "Roster deleted" ], "type": "string" + }, + "segmentedMembershipCounts": { + "$ref": "AppsDynamiteSharedSegmentedMembershipCounts", + "description": "Roster membership count. May contain counts based on member type and membership state." } }, "type": "object" @@ -14054,7 +14145,7 @@ "type": "boolean" }, "cohostArtifactSharingEnabled": { - "description": "Whether meeting artifacts will be shared with co-hosts.", + "description": "Whether meeting artifacts will be shared with cohosts.", "type": "boolean" }, "cseEnabled": { @@ -15271,7 +15362,7 @@ "type": "integer" }, "mimeType": { - "description": "Mime type of the content (Currently mapped from Page Render Service ItemType) Note that this is not necessarily the mime type of the http resource. For example a text/html from youtube or vimeo may actually be classified as a video type. Then we shall mark it as video/* since we don't know exactly what type of video it is. NEXT TAG : 16", + "description": "Mime type of the content (Currently mapped from Page Render Service ItemType) Note that this is not necessarily the mime type of the http resource. For example a text/html from youtube or vimeo may actually be classified as a video type. Then we shall mark it as video/* since we don't know exactly what type of video it is.", "type": "string" }, "redirectUrl": { @@ -15293,6 +15384,20 @@ "url": { "$ref": "SafeUrlProto", "description": "The original URL." + }, + "urlSource": { + "description": "NEXT TAG : 17", + "enum": [ + "URL_SOURCE_UNKNOWN", + "USER_SUPPLIED_URL", + "SERVER_SUPPLIED_POLICY_VIOLATION" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" } }, "type": "object" @@ -15446,20 +15551,26 @@ "type": "object" }, "UserInfo": { - "description": "Contains info regarding the updater of an Activity Feed item. Next Id: 7", + "description": "Contains info regarding the updater of an Activity Feed item. Next Id: 8", "id": "UserInfo", "properties": { + "driveNotificationAvatarUrl": { + "description": "Avatar url of the user who triggered the Drive Notification email. This field will be populated if we can extract such information from the Drive Notification email. This should only be used to fetch user avatars when updater_to_show_email is not populated. This field is not set for non-Drive Notification items. This is not the actual sender of the email, as the sender is always comments-noreply@docs.google.com.", + "type": "string" + }, "updaterCountDisplayType": { "description": "Describes how updater_count_to_show should be used.", "enum": [ "UPDATER_COUNT_DISPLAY_TYPE_UNSPECIFIED", + "NO_DISPLAY_COUNT", "EXACT_COUNT", "NONZERO_COUNT" ], "enumDescriptions": [ "", - "A precise updater count is known and the value set in updater_count_to_show should be used. If set, updater_count_to_show is set to the total number of updaters minus the one set in updater_to_show.", - "A precise updater count could not be calculated, but there is at least one. Any value set in updater_count_to_show should NOT be used." + "No additional updaters where involved. Shows up in clients as \"$USERNAME replied\".", + "A precise updater count is known and the value set in updater_count_to_show should be used. If set, updater_count_to_show is set to the total number of updaters minus the one set in updater_to_show. Shows up in clients as \"$USERNAME and $NUM others replied\".", + "A precise updater count could not be calculated, but there is at least one. Any value set in updater_count_to_show should NOT be used. Shows up in clients as \"$USERNAME and others replied\"." ], "type": "string" }, @@ -15469,7 +15580,7 @@ "type": "integer" }, "updaterToShowEmail": { - "description": "The email of the updater for clients to show used for Gmail items.", + "description": "The email of the updater for clients to show used for Gmail items. For Drive Notifications, this is the email of the user who triggered the Drive Notification email. This field will be populated if we can extract such information from the Drive Notification email. This is not the actual sender of the email, as the sender is always comments-noreply@docs.google.com.", "type": "string" }, "updaterToShowGaiaId": { @@ -15478,7 +15589,7 @@ "type": "string" }, "updaterToShowName": { - "description": "The display name of the updater for clients to show used for Gmail items. This (along with the updater fields above) will be populated in the thread pipeline (http://shortn/_rPS0GCp94Y) when converting Activity Feed message attributes into client-renderable Activity Feed items.", + "description": "The display name of the updater for clients to show used for Gmail items. For non-Drive Notification items, this field will always be populated. If the display name cannot be found for the user, the fallback string will be the email address. For Drive Notification items, this is the email of the user who triggered the Drive notification email. This field will be populated if we can extract such information from the Drive Notification email. This is not the actual sender of the email, as the sender is always comments-noreply@docs.google.com.", "type": "string" }, "updaterToShowUserId": { diff --git a/cloudsearch/v1/cloudsearch-gen.go b/cloudsearch/v1/cloudsearch-gen.go index 0c48dffcbfe..b3640d6f617 100644 --- a/cloudsearch/v1/cloudsearch-gen.go +++ b/cloudsearch/v1/cloudsearch-gen.go @@ -1046,6 +1046,7 @@ type AppId struct { // "CONTACTS_APP" // "ACTIVITY_FEED_APP" // "DRIVE_APP" + // "CHAT_IN_MEET_APP" GsuiteAppType string `json:"gsuiteAppType,omitempty"` // Id: Numeric identifier of the App. Set to Project number for 1/3P @@ -1156,8 +1157,17 @@ func (s *AppsDynamiteSharedActionActionParameter) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AppsDynamiteSharedActivityFeedAnnotationData: Next Id: 6 +// AppsDynamiteSharedActivityFeedAnnotationData: Next Id: 7 type AppsDynamiteSharedActivityFeedAnnotationData struct { + // ActivityFeedMessageCreateTime: Timestamp of when the Activity Feed + // message that contains this annotation was created. This is roughly + // when the activity happened, such as when a reaction happened, but + // will have at least some small delay, since the Activity Feed message + // is created asynchronously after. This timestamp should only be used + // for display when the activity create time is not available in the + // Chat UI, like the time of a reaction. + ActivityFeedMessageCreateTime string `json:"activityFeedMessageCreateTime,omitempty"` + // ActivityFeedMessageId: Unique id of the Activity Feed message used by // clients to implement click-to-source. This is the same messageId as // the top-level id field for the Activity Feed item. @@ -1173,21 +1183,21 @@ type AppsDynamiteSharedActivityFeedAnnotationData struct { UserInfo *AppsDynamiteSharedActivityFeedAnnotationDataUserInfo `json:"userInfo,omitempty"` // ForceSendFields is a list of field names (e.g. - // "ActivityFeedMessageId") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // "ActivityFeedMessageCreateTime") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActivityFeedMessageId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "ActivityFeedMessageCreateTime") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -2437,7 +2447,8 @@ type AppsDynamiteSharedChatItemGroupInfo struct { // users. // "POST_ROOM" - A post room. Topics in this room are organized in a // post/reply style. See the design doc for more details: - // go/PostRoomsInDynamite. + // go/PostRoomsInDynamite. Deprecated. Post rooms are no longer + // supported. // "ACTIVITY_FEED" - Represents an Activity Feed space. These groups // are modeled like flat rooms and contain items for users to catch up // on important things. Each user should only have one group of this @@ -2645,6 +2656,12 @@ type AppsDynamiteSharedContentReportType struct { // "SPAM" - "Spam" // "CONFIDENTIAL_INFORMATION" - "Confidential information" // "SENSITIVE_INFORMATION" - "Sensitive information" + // "FRAUD" - Phishing, impersonation/misrepresentation, or deceiving + // other users into sharing information under false pretenses. + // "MALWARE" - Malware, viruses, Trojan horses, corrupted files, + // destructive code, etc. + // "ILLEGAL_ACTIVITIES" - Promoting, organizing, or engaging in + // illegal activities. // "OTHER" - "Something else" SystemViolation string `json:"systemViolation,omitempty"` @@ -4057,6 +4074,78 @@ func (s *AppsDynamiteSharedRetentionSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AppsDynamiteSharedSegmentedMembershipCount: Contains info on +// membership count for member types: HUMAN_USER, APP_USER & +// ROSTER_MEMBER different states: INVITED, JOINED +type AppsDynamiteSharedSegmentedMembershipCount struct { + // Possible values: + // "MEMBER_TYPE_UNSPECIFIED" - default value + // "HUMAN_USER" - member is a human user + // "ROSTER_MEMBER" - member is a roster + MemberType string `json:"memberType,omitempty"` + + // MembershipCount: count of members with given type and state + MembershipCount int64 `json:"membershipCount,omitempty"` + + // Possible values: + // "MEMBER_UNKNOWN" - Default state, do not use + // "MEMBER_INVITED" - An invitation to the space has been sent + // "MEMBER_JOINED" - User has joined the space + // "MEMBER_NOT_A_MEMBER" - User is not a member + // "MEMBER_FAILED" - This state should never be stored in Spanner. It + // is a state for responses to the clients to indicate that membership + // mutations have failed and the member is in its previous state. + MembershipState string `json:"membershipState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MemberType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MemberType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AppsDynamiteSharedSegmentedMembershipCount) MarshalJSON() ([]byte, error) { + type NoMethod AppsDynamiteSharedSegmentedMembershipCount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AppsDynamiteSharedSegmentedMembershipCounts struct { + Value []*AppsDynamiteSharedSegmentedMembershipCount `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AppsDynamiteSharedSegmentedMembershipCounts) MarshalJSON() ([]byte, error) { + type NoMethod AppsDynamiteSharedSegmentedMembershipCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AppsDynamiteSharedSelectionInput: A widget that creates a UI item // (for example, a drop-down list) with options for users to select. type AppsDynamiteSharedSelectionInput struct { @@ -4543,6 +4632,8 @@ type AppsDynamiteSharedVideoReference struct { // "SUCCESS" // "ERROR" // "NOT_APPLICABLE" + // "THUMBNAIL_SUCCESS" + // "GO_LIVE_SUCCESS" Status string `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "Format") to @@ -5274,6 +5365,17 @@ func (s *BorderStyle) MarshalJSON() ([]byte, error) { // BotInfo: Bot-specific profile information. type BotInfo struct { + // Possible values: + // "UNSPECIFIED_STATUS" + // "ALLOWED" + // "ALL_APPS_DISABLED_BY_ADMIN" - For both ALL_APPS_DISABLED_BY_ADMIN + // and APP_NOT_ALLOWLISTED_BY_ADMIN, the app should still be visible in + // the catalog, but usage of the app will be disabled. Indicates that + // all apps have been disabled by the dasher admin. + // "APP_NOT_ALLOWLISTED_BY_ADMIN" - Indicates that the customer is + // using allowlisting, but that the bot is not allowlisted. + AppAllowlistStatus string `json:"appAllowlistStatus,omitempty"` + // AppId: Identifier of the application associated with the bot. AppId *AppId `json:"appId,omitempty"` @@ -5306,6 +5408,9 @@ type BotInfo struct { // developer. No one can @mention or interact with the bot. Status string `json:"status,omitempty"` + // SupportHomeScreen: If the app supports a home screen. + SupportHomeScreen bool `json:"supportHomeScreen,omitempty"` + // SupportUrls: Urls with additional information related to the bot. // This field should always be set even if all the fields within it are // empty, so that it is convenient for clients to work with this field @@ -5324,31 +5429,21 @@ type BotInfo struct { // "CAN_ADD_TO_HUMAN_DM" SupportedUses []string `json:"supportedUses,omitempty"` - // Possible values: - // "UNSPECIFIED_STATUS" - // "ALLOWED" - // "ALL_BOTS_DISABLED_BY_ADMIN" - For both ALL_BOTS_DISABLED_BY_ADMIN - // and BOT_NOT_WHITELISTED_BY_ADMIN, the bot should still be visible in - // the catalog, but usage of the bot will be disabled. Indicates that - // all bots has been disabled by the dasher admin. - // "BOT_NOT_WHITELISTED_BY_ADMIN" - Indicates that the customer is - // using whitelisting, but that the bot is not whitelisted. - WhitelistStatus string `json:"whitelistStatus,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AppId") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AppAllowlistStatus") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppId") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AppAllowlistStatus") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -11022,7 +11117,7 @@ func (s *GoogleChatV1WidgetMarkupTextParagraph) MarshalJSON() ([]byte, error) { // GoogleDocsMetadata: The corpus specific metadata for office-type // documents, from Google Docs and other sources. This message is passed -// to the scorer and beyond. Next tag: 7 +// to the scorer and beyond. Next tag: 9 type GoogleDocsMetadata struct { // AclInfo: Contains number of users and groups which can access the // document. @@ -11059,6 +11154,12 @@ type GoogleDocsMetadata struct { // modified, in seconds since epoch. Only counts content modifications. LastContentModifiedTimestamp int64 `json:"lastContentModifiedTimestamp,omitempty,string"` + // NumSubscribers: Contains number of subscribers for the document. + NumSubscribers int64 `json:"numSubscribers,omitempty"` + + // NumViewers: Size of untruncated viewers list. + NumViewers int64 `json:"numViewers,omitempty"` + // ResultInfo: Additional per-result information, akin to Gmail's // SingleThreadResponse. Note: GWS no longer seems to use this field, // but there's still one reference to it for Scribe, so we can't remove @@ -15949,7 +16050,9 @@ type PropertyDefinition struct { // IsWildcardSearchable: Indicates that users can perform wildcard // search for this property. Only supported for Text properties. // IsReturnable must be true to set this option. In a given datasource - // maximum of 5 properties can be marked as is_wildcard_searchable. + // maximum of 5 properties can be marked as is_wildcard_searchable. For + // more details, see Define object properties + // (https://developers.google.com/cloud-search/docs/guides/schema-guide#properties) IsWildcardSearchable bool `json:"isWildcardSearchable,omitempty"` // Name: The name of the property. Item indexing requests sent to the @@ -16586,8 +16689,14 @@ type QuotedMessageMetadata struct { // // Possible values: // "MESSAGE_STATE_UNSPECIFIED" - // "MESSAGE_STATE_ACTIVE" - // "MESSAGE_STATE_DELETED" + // "MESSAGE_STATE_ACTIVE" - The original message is present in storage + // and not deleted; the message contents can be hydrated. + // "MESSAGE_STATE_DELETED" - The original message has been deleted; + // the message contents cannot be hydrated. + // "MESSAGE_STATE_OTR_EDITED" - The OTR original message was edited + // and therefore no longer retrievable from storage; the message + // contents cannot be hydrated. See go/message-quoting-otr-edits for + // more context. MessageState string `json:"messageState,omitempty"` // RetentionSettings: Output only. The retention (OTR) settings of the @@ -17015,8 +17124,8 @@ type RequestOptions struct { // the page. In the event that the user's language preference is known, // set this field to the known user language. When specified, the // documents in search results are biased towards the specified - // language. The suggest API does not use this parameter. Instead, - // suggest autocompletes only based on characters in the query. + // language. From Suggest API perspective, for 3p suggest this is used + // as a hint while making predictions to add language boosting. LanguageCode string `json:"languageCode,omitempty"` // SearchApplicationId: The ID generated when you create a search @@ -17520,6 +17629,10 @@ type Roster struct { // "ROSTER_DELETED" - Roster deleted RosterState string `json:"rosterState,omitempty"` + // SegmentedMembershipCounts: Roster membership count. May contain + // counts based on member type and membership state. + SegmentedMembershipCounts *AppsDynamiteSharedSegmentedMembershipCounts `json:"segmentedMembershipCounts,omitempty"` + // ForceSendFields is a list of field names (e.g. "AvatarUrl") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -18513,7 +18626,7 @@ type Settings struct { ChatLock bool `json:"chatLock,omitempty"` // CohostArtifactSharingEnabled: Whether meeting artifacts will be - // shared with co-hosts. + // shared with cohosts. CohostArtifactSharingEnabled bool `json:"cohostArtifactSharingEnabled,omitempty"` // CseEnabled: Whether Client-side Encryption is enabled for the meeting @@ -20715,8 +20828,7 @@ type UrlMetadata struct { // Service ItemType) Note that this is not necessarily the mime type of // the http resource. For example a text/html from youtube or vimeo may // actually be classified as a video type. Then we shall mark it as - // video/* since we don't know exactly what type of video it is. NEXT - // TAG : 16 + // video/* since we don't know exactly what type of video it is. MimeType string `json:"mimeType,omitempty"` // RedirectUrl: The stable redirect URL pointing to frontend server. @@ -20735,6 +20847,14 @@ type UrlMetadata struct { // Url: The original URL. Url *SafeUrlProto `json:"url,omitempty"` + // UrlSource: NEXT TAG : 17 + // + // Possible values: + // "URL_SOURCE_UNKNOWN" + // "USER_SUPPLIED_URL" + // "SERVER_SUPPLIED_POLICY_VIOLATION" + UrlSource string `json:"urlSource,omitempty"` + // ForceSendFields is a list of field names (e.g. "Domain") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -20953,20 +21073,33 @@ func (s *UserId) MarshalJSON() ([]byte, error) { } // UserInfo: Contains info regarding the updater of an Activity Feed -// item. Next Id: 7 +// item. Next Id: 8 type UserInfo struct { + // DriveNotificationAvatarUrl: Avatar url of the user who triggered the + // Drive Notification email. This field will be populated if we can + // extract such information from the Drive Notification email. This + // should only be used to fetch user avatars when updater_to_show_email + // is not populated. This field is not set for non-Drive Notification + // items. This is not the actual sender of the email, as the sender is + // always comments-noreply@docs.google.com. + DriveNotificationAvatarUrl string `json:"driveNotificationAvatarUrl,omitempty"` + // UpdaterCountDisplayType: Describes how updater_count_to_show should // be used. // // Possible values: // "UPDATER_COUNT_DISPLAY_TYPE_UNSPECIFIED" + // "NO_DISPLAY_COUNT" - No additional updaters where involved. Shows + // up in clients as "$USERNAME replied". // "EXACT_COUNT" - A precise updater count is known and the value set // in updater_count_to_show should be used. If set, // updater_count_to_show is set to the total number of updaters minus - // the one set in updater_to_show. + // the one set in updater_to_show. Shows up in clients as "$USERNAME and + // $NUM others replied". // "NONZERO_COUNT" - A precise updater count could not be calculated, // but there is at least one. Any value set in updater_count_to_show - // should NOT be used. + // should NOT be used. Shows up in clients as "$USERNAME and others + // replied". UpdaterCountDisplayType string `json:"updaterCountDisplayType,omitempty"` // UpdaterCountToShow: The number of updaters for clients to show @@ -20974,7 +21107,11 @@ type UserInfo struct { UpdaterCountToShow int64 `json:"updaterCountToShow,omitempty"` // UpdaterToShowEmail: The email of the updater for clients to show used - // for Gmail items. + // for Gmail items. For Drive Notifications, this is the email of the + // user who triggered the Drive Notification email. This field will be + // populated if we can extract such information from the Drive + // Notification email. This is not the actual sender of the email, as + // the sender is always comments-noreply@docs.google.com. UpdaterToShowEmail string `json:"updaterToShowEmail,omitempty"` // UpdaterToShowGaiaId: The gaia id of the updater for clients to show @@ -20983,10 +21120,14 @@ type UserInfo struct { UpdaterToShowGaiaId int64 `json:"updaterToShowGaiaId,omitempty,string"` // UpdaterToShowName: The display name of the updater for clients to - // show used for Gmail items. This (along with the updater fields above) - // will be populated in the thread pipeline (http://shortn/_rPS0GCp94Y) - // when converting Activity Feed message attributes into - // client-renderable Activity Feed items. + // show used for Gmail items. For non-Drive Notification items, this + // field will always be populated. If the display name cannot be found + // for the user, the fallback string will be the email address. For + // Drive Notification items, this is the email of the user who triggered + // the Drive notification email. This field will be populated if we can + // extract such information from the Drive Notification email. This is + // not the actual sender of the email, as the sender is always + // comments-noreply@docs.google.com. UpdaterToShowName string `json:"updaterToShowName,omitempty"` // UpdaterToShowUserId: The updater for clients to show used for @@ -20994,7 +21135,7 @@ type UserInfo struct { UpdaterToShowUserId *UserId `json:"updaterToShowUserId,omitempty"` // ForceSendFields is a list of field names (e.g. - // "UpdaterCountDisplayType") to unconditionally include in API + // "DriveNotificationAvatarUrl") to unconditionally include in API // requests. By default, fields with empty or default values are omitted // from API requests. However, any non-pointer, non-interface field // appearing in ForceSendFields will be sent to the server regardless of @@ -21002,13 +21143,13 @@ type UserInfo struct { // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UpdaterCountDisplayType") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "DriveNotificationAvatarUrl") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -25671,8 +25812,8 @@ func (c *QuerySourcesListCall) RequestOptionsDebugOptionsEnableDebugging(request // the page. In the event that the user's language preference is known, // set this field to the known user language. When specified, the // documents in search results are biased towards the specified -// language. The suggest API does not use this parameter. Instead, -// suggest autocompletes only based on characters in the query. +// language. From Suggest API perspective, for 3p suggest this is used +// as a hint while making predictions to add language boosting. func (c *QuerySourcesListCall) RequestOptionsLanguageCode(requestOptionsLanguageCode string) *QuerySourcesListCall { c.urlParams_.Set("requestOptions.languageCode", requestOptionsLanguageCode) return c @@ -25814,7 +25955,7 @@ func (c *QuerySourcesListCall) Do(opts ...googleapi.CallOption) (*ListQuerySourc // "type": "boolean" // }, // "requestOptions.languageCode": { - // "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. The suggest API does not use this parameter. Instead, suggest autocompletes only based on characters in the query.", + // "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. From Suggest API perspective, for 3p suggest this is used as a hint while making predictions to add language boosting.", // "location": "query", // "type": "string" // }, diff --git a/cloudsupport/v2beta/cloudsupport-api.json b/cloudsupport/v2beta/cloudsupport-api.json index 397a546d7ae..8233dc8813a 100644 --- a/cloudsupport/v2beta/cloudsupport-api.json +++ b/cloudsupport/v2beta/cloudsupport-api.json @@ -378,7 +378,7 @@ "type": "string" }, "query": { - "description": "An expression written in filter language. A query uses the following fields with the operators equals (`=`) and `AND`: - `organization`: An organization name in the form `organizations/`. - `project`: A project name in the form `projects/`. - `state`: The accepted values are `OPEN` or `CLOSED`. - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - [DEPRECATED] `severity`: The accepted values are `S0`, `S1`, `S2`, `S3`, or `S4`. - `creator.email`: The email address of the case creator. You must specify eitehr `organization` or `project`. To search across `displayName`, `description`, and comments, use a global restriction with no keyword or operator. For example, `\"my search\"`. To search only cases updated after a certain date, use `update_time` retricted with that particular date, time, and timezone in ISO datetime format. For example, `update_time\u003e\"2020-01-01T00:00:00-05:00\"`. `update_time` only supports the greater than operator (`\u003e`). Examples: - `organization=\"organizations/123456789\"` - `project=\"projects/my-project-id\"` - `project=\"projects/123456789\"` - `organization=\"organizations/123456789\" AND state=CLOSED` - `project=\"projects/my-project-id\" AND creator.email=\"tester@example.com\"` - `project=\"projects/my-project-id\" AND (priority=P0 OR priority=P1)`", + "description": "An expression written in filter language. A query uses the following fields with the operators equals (`=`) and `AND`: - `organization`: An organization name in the form `organizations/`. - `project`: A project name in the form `projects/`. - `state`: The accepted values are `OPEN` or `CLOSED`. - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - [DEPRECATED] `severity`: The accepted values are `S0`, `S1`, `S2`, `S3`, or `S4`. - `creator.email`: The email address of the case creator. - `billingAccount`: A billing account in the form `billingAccounts/` You must specify eitehr `organization` or `project`. To search across `displayName`, `description`, and comments, use a global restriction with no keyword or operator. For example, `\"my search\"`. To search only cases updated after a certain date, use `update_time` retricted with that particular date, time, and timezone in ISO datetime format. For example, `update_time\u003e\"2020-01-01T00:00:00-05:00\"`. `update_time` only supports the greater than operator (`\u003e`). Examples: - `organization=\"organizations/123456789\"` - `project=\"projects/my-project-id\"` - `project=\"projects/123456789\"` - `billing_account=\"billingAccounts/123456-A0B0C0-CUZ789\"` - `organization=\"organizations/123456789\" AND state=CLOSED` - `project=\"projects/my-project-id\" AND creator.email=\"tester@example.com\"` - `project=\"projects/my-project-id\" AND (priority=P0 OR priority=P1)`", "location": "query", "type": "string" } @@ -575,7 +575,7 @@ } } }, - "revision": "20220812", + "revision": "20220921", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { diff --git a/cloudsupport/v2beta/cloudsupport-gen.go b/cloudsupport/v2beta/cloudsupport-gen.go index eee0aa04d47..8b68da6b974 100644 --- a/cloudsupport/v2beta/cloudsupport-gen.go +++ b/cloudsupport/v2beta/cloudsupport-gen.go @@ -2757,8 +2757,9 @@ func (c *CasesSearchCall) PageToken(pageToken string) *CasesSearchCall { // You can specify multiple values for priority using the `OR` operator. // For example, `priority=P1 OR priority=P2`. - [DEPRECATED] `severity`: // The accepted values are `S0`, `S1`, `S2`, `S3`, or `S4`. - -// `creator.email`: The email address of the case creator. You must -// specify eitehr `organization` or `project`. To search across +// `creator.email`: The email address of the case creator. - +// `billingAccount`: A billing account in the form `billingAccounts/` +// You must specify eitehr `organization` or `project`. To search across // `displayName`, `description`, and comments, use a global restriction // with no keyword or operator. For example, "my search". To search // only cases updated after a certain date, use `update_time` retricted @@ -2767,6 +2768,7 @@ func (c *CasesSearchCall) PageToken(pageToken string) *CasesSearchCall { // only supports the greater than operator (`>`). Examples: - // `organization="organizations/123456789" - // `project="projects/my-project-id" - `project="projects/123456789" - +// `billing_account="billingAccounts/123456-A0B0C0-CUZ789" - // `organization="organizations/123456789" AND state=CLOSED` - // `project="projects/my-project-id" AND // creator.email="tester@example.com" - @@ -2890,7 +2892,7 @@ func (c *CasesSearchCall) Do(opts ...googleapi.CallOption) (*SearchCasesResponse // "type": "string" // }, // "query": { - // "description": "An expression written in filter language. A query uses the following fields with the operators equals (`=`) and `AND`: - `organization`: An organization name in the form `organizations/`. - `project`: A project name in the form `projects/`. - `state`: The accepted values are `OPEN` or `CLOSED`. - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - [DEPRECATED] `severity`: The accepted values are `S0`, `S1`, `S2`, `S3`, or `S4`. - `creator.email`: The email address of the case creator. You must specify eitehr `organization` or `project`. To search across `displayName`, `description`, and comments, use a global restriction with no keyword or operator. For example, `\"my search\"`. To search only cases updated after a certain date, use `update_time` retricted with that particular date, time, and timezone in ISO datetime format. For example, `update_time\u003e\"2020-01-01T00:00:00-05:00\"`. `update_time` only supports the greater than operator (`\u003e`). Examples: - `organization=\"organizations/123456789\"` - `project=\"projects/my-project-id\"` - `project=\"projects/123456789\"` - `organization=\"organizations/123456789\" AND state=CLOSED` - `project=\"projects/my-project-id\" AND creator.email=\"tester@example.com\"` - `project=\"projects/my-project-id\" AND (priority=P0 OR priority=P1)`", + // "description": "An expression written in filter language. A query uses the following fields with the operators equals (`=`) and `AND`: - `organization`: An organization name in the form `organizations/`. - `project`: A project name in the form `projects/`. - `state`: The accepted values are `OPEN` or `CLOSED`. - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - [DEPRECATED] `severity`: The accepted values are `S0`, `S1`, `S2`, `S3`, or `S4`. - `creator.email`: The email address of the case creator. - `billingAccount`: A billing account in the form `billingAccounts/` You must specify eitehr `organization` or `project`. To search across `displayName`, `description`, and comments, use a global restriction with no keyword or operator. For example, `\"my search\"`. To search only cases updated after a certain date, use `update_time` retricted with that particular date, time, and timezone in ISO datetime format. For example, `update_time\u003e\"2020-01-01T00:00:00-05:00\"`. `update_time` only supports the greater than operator (`\u003e`). Examples: - `organization=\"organizations/123456789\"` - `project=\"projects/my-project-id\"` - `project=\"projects/123456789\"` - `billing_account=\"billingAccounts/123456-A0B0C0-CUZ789\"` - `organization=\"organizations/123456789\" AND state=CLOSED` - `project=\"projects/my-project-id\" AND creator.email=\"tester@example.com\"` - `project=\"projects/my-project-id\" AND (priority=P0 OR priority=P1)`", // "location": "query", // "type": "string" // } diff --git a/composer/v1/composer-api.json b/composer/v1/composer-api.json index ad5cb2c1cc6..067e192d420 100644 --- a/composer/v1/composer-api.json +++ b/composer/v1/composer-api.json @@ -406,7 +406,7 @@ } } }, - "revision": "20220727", + "revision": "20220920", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { @@ -783,6 +783,12 @@ }, "type": "object" }, + "LoadSnapshotResponse": { + "description": "Response to LoadSnapshotRequest.", + "id": "LoadSnapshotResponse", + "properties": {}, + "type": "object" + }, "MaintenanceWindow": { "description": "The configuration settings for Cloud Composer maintenance window. The following example: ``` { \"startTime\":\"2019-08-01T01:00:00Z\" \"endTime\":\"2019-08-01T07:00:00Z\" \"recurrence\":\"FREQ=WEEKLY;BYDAY=TU,WE\" } ``` would define a maintenance window between 01 and 07 hours UTC during each Tuesday and Wednesday.", "id": "MaintenanceWindow", @@ -1043,6 +1049,17 @@ }, "type": "object" }, + "SaveSnapshotResponse": { + "description": "Response to SaveSnapshotRequest.", + "id": "SaveSnapshotResponse", + "properties": { + "snapshotPath": { + "description": "The fully-resolved Cloud Storage path of the created snapshot, e.g.: \"gs://my-bucket/snapshots/project_location_environment_timestamp\". This field is populated only if the snapshot creation was successful.", + "type": "string" + } + }, + "type": "object" + }, "SchedulerResource": { "description": "Configuration for resources used by Airflow schedulers.", "id": "SchedulerResource", diff --git a/composer/v1/composer-gen.go b/composer/v1/composer-gen.go index c3d6c157084..ad0f0b97508 100644 --- a/composer/v1/composer-gen.go +++ b/composer/v1/composer-gen.go @@ -855,6 +855,10 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LoadSnapshotResponse: Response to LoadSnapshotRequest. +type LoadSnapshotResponse struct { +} + // MaintenanceWindow: The configuration settings for Cloud Composer // maintenance window. The following example: ``` { // "startTime":"2019-08-01T01:00:00Z" "endTime":"2019-08-01T07:00:00Z" @@ -1311,6 +1315,37 @@ func (s *PrivateEnvironmentConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SaveSnapshotResponse: Response to SaveSnapshotRequest. +type SaveSnapshotResponse struct { + // SnapshotPath: The fully-resolved Cloud Storage path of the created + // snapshot, e.g.: + // "gs://my-bucket/snapshots/project_location_environment_timestamp". + // This field is populated only if the snapshot creation was successful. + SnapshotPath string `json:"snapshotPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SnapshotPath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SnapshotPath") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SaveSnapshotResponse) MarshalJSON() ([]byte, error) { + type NoMethod SaveSnapshotResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SchedulerResource: Configuration for resources used by Airflow // schedulers. type SchedulerResource struct { diff --git a/composer/v1beta1/composer-api.json b/composer/v1beta1/composer-api.json index b997e272d53..5cf13579121 100644 --- a/composer/v1beta1/composer-api.json +++ b/composer/v1beta1/composer-api.json @@ -518,7 +518,7 @@ } } }, - "revision": "20220727", + "revision": "20220920", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { @@ -972,6 +972,27 @@ }, "type": "object" }, + "NetworkingConfig": { + "description": "Configuration options for networking connections in the Composer 2 environment.", + "id": "NetworkingConfig", + "properties": { + "connectionType": { + "description": "Optional. Indicates the user requested specifc connection type between Tenant and Customer projects. You cannot set networking connection type in public IP environment.", + "enum": [ + "CONNECTION_TYPE_UNSPECIFIED", + "VPC_PEERING", + "PRIVATE_SERVICE_CONNECT" + ], + "enumDescriptions": [ + "No specific connection type was requested, so the environment uses the default value corresponding to the rest of its configuration.", + "Requests the use of VPC peerings for connecting the Customer and Tenant projects.", + "Requests the use of Private Service Connect for connecting the Customer and Tenant projects." + ], + "type": "string" + } + }, + "type": "object" + }, "NodeConfig": { "description": "The configuration information for the Kubernetes Engine nodes running the Apache Airflow software.", "id": "NodeConfig", @@ -1180,6 +1201,10 @@ "description": "Optional. When enabled, IPs from public (non-RFC1918) ranges can be used for `IPAllocationPolicy.cluster_ipv4_cidr_block` and `IPAllocationPolicy.service_ipv4_cidr_block`.", "type": "boolean" }, + "networkingConfig": { + "$ref": "NetworkingConfig", + "description": "Optional. Configuration for the network connections configuration in the environment." + }, "privateClusterConfig": { "$ref": "PrivateClusterConfig", "description": "Optional. Configuration for the private GKE cluster for a Private IP Cloud Composer environment." diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index 0c8d55a8f2d..b5c52ccfd29 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -1035,6 +1035,47 @@ func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkingConfig: Configuration options for networking connections in +// the Composer 2 environment. +type NetworkingConfig struct { + // ConnectionType: Optional. Indicates the user requested specifc + // connection type between Tenant and Customer projects. You cannot set + // networking connection type in public IP environment. + // + // Possible values: + // "CONNECTION_TYPE_UNSPECIFIED" - No specific connection type was + // requested, so the environment uses the default value corresponding to + // the rest of its configuration. + // "VPC_PEERING" - Requests the use of VPC peerings for connecting the + // Customer and Tenant projects. + // "PRIVATE_SERVICE_CONNECT" - Requests the use of Private Service + // Connect for connecting the Customer and Tenant projects. + ConnectionType string `json:"connectionType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConnectionType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConnectionType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NodeConfig: The configuration information for the Kubernetes Engine // nodes running the Apache Airflow software. type NodeConfig struct { @@ -1380,6 +1421,10 @@ type PrivateEnvironmentConfig struct { // `IPAllocationPolicy.service_ipv4_cidr_block`. EnablePrivatelyUsedPublicIps bool `json:"enablePrivatelyUsedPublicIps,omitempty"` + // NetworkingConfig: Optional. Configuration for the network connections + // configuration in the environment. + NetworkingConfig *NetworkingConfig `json:"networkingConfig,omitempty"` + // PrivateClusterConfig: Optional. Configuration for the private GKE // cluster for a Private IP Cloud Composer environment. PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 364ae2b8663..edf2d344834 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -37578,6 +37578,66 @@ }, "targetTcpProxies": { "methods": { + "aggregatedList": { + "description": "Retrieves the list of all TargetTcpProxy resources, regional and global, available to the specified project.", + "flatPath": "projects/{project}/aggregated/targetTcpProxies", + "httpMethod": "GET", + "id": "compute.targetTcpProxies.aggregatedList", + "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. 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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`.", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "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.", + "location": "query", + "type": "boolean" + }, + "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": "Name of the project scoping 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.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/targetTcpProxies", + "response": { + "$ref": "TargetTcpProxyAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { "description": "Deletes the specified TargetTcpProxy resource.", "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", @@ -39932,7 +39992,7 @@ } } }, - "revision": "20220831", + "revision": "20220913", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -40403,6 +40463,10 @@ "description": "The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be createc for first IP in associated external IPv6 range.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this access config.", + "type": "string" + }, "setPublicDns": { "description": "Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.", "type": "boolean" @@ -43997,6 +44061,21 @@ }, "type": "object" }, + "BundledLocalSsds": { + "id": "BundledLocalSsds", + "properties": { + "defaultInterface": { + "description": "The default disk interface if the interface is not specified.", + "type": "string" + }, + "partitionCount": { + "description": "The number of partitions.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CacheInvalidationRule": { "id": "CacheInvalidationRule", "properties": { @@ -48756,25 +48835,25 @@ "type": "string" }, "port": { - "description": "The port number for the health check request. Must be specified if port_name and port_specification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. The port_name should conform to RFC1035.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" } @@ -49017,29 +49096,29 @@ "id": "HTTP2HealthCheck", "properties": { "host": { - "description": "The value of the host header in the HTTP/2 health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used.", + "description": "The value of the host header in the HTTP/2 health check request. If left empty (default value), the host header is set to the destination IP address to which health check packets are sent. The destination IP address depends on the type of load balancer. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", "type": "string" }, "port": { - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 443. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -49060,7 +49139,7 @@ "type": "string" }, "response": { - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", + "description": "Creates a content-based HTTP/2 health check. In addition to the required HTTP 200 (OK) status code, you can configure the health check to pass only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", "type": "string" }, "weightReportMode": { @@ -49084,29 +49163,29 @@ "id": "HTTPHealthCheck", "properties": { "host": { - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used.", + "description": "The value of the host header in the HTTP health check request. If left empty (default value), the host header is set to the destination IP address to which health check packets are sent. The destination IP address depends on the type of load balancer. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", "type": "string" }, "port": { - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 80. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Also supported in legacy HTTP health checks for target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -49127,7 +49206,7 @@ "type": "string" }, "response": { - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", + "description": "Creates a content-based HTTP health check. In addition to the required HTTP 200 (OK) status code, you can configure the health check to pass only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", "type": "string" }, "weightReportMode": { @@ -49151,29 +49230,29 @@ "id": "HTTPSHealthCheck", "properties": { "host": { - "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used.", + "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the host header is set to the destination IP address to which health check packets are sent. The destination IP address depends on the type of load balancer. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", "type": "string" }, "port": { - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 443. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -49194,7 +49273,7 @@ "type": "string" }, "response": { - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", + "description": "Creates a content-based HTTPS health check. In addition to the required HTTP 200 (OK) status code, you can configure the health check to pass only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", "type": "string" }, "weightReportMode": { @@ -52942,6 +53021,54 @@ "InstanceGroupManagerResizeRequestStatus": { "id": "InstanceGroupManagerResizeRequestStatus", "properties": { + "error": { + "description": "Errors encountered during the queueing or provisioning phases of the ResizeRequest.", + "properties": { + "errors": { + "description": "[Output Only] The array of errors encountered while processing this operation.", + "items": { + "properties": { + "code": { + "description": "[Output Only] The error type identifier for this error.", + "type": "string" + }, + "errorDetails": { + "description": "[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.", + "items": { + "properties": { + "errorInfo": { + "$ref": "ErrorInfo" + }, + "help": { + "$ref": "Help" + }, + "localizedMessage": { + "$ref": "LocalizedMessage" + }, + "quotaInfo": { + "$ref": "QuotaExceededInfo" + } + }, + "type": "object" + }, + "type": "array" + }, + "location": { + "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.", + "type": "string" + }, + "message": { + "description": "[Output Only] An optional, human-readable error message.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, "queuingPolicy": { "$ref": "QueuingPolicy", "description": "Constraints for the time when the instances start provisioning. Always exposed as absolute time." @@ -58780,6 +58907,10 @@ ], "type": "string" }, + "bundledLocalSsds": { + "$ref": "BundledLocalSsds", + "description": "[Output Only] The configuration of bundled local SSD for the machine type." + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -71589,10 +71720,12 @@ "description": "Indicates why particular status was returned.", "enum": [ "MD5_AUTH_INTERNAL_PROBLEM", + "MISSING_NETWORK_CONNECTIVITY_CENTER_SPOKE", "STATUS_REASON_UNSPECIFIED" ], "enumDescriptions": [ "Indicates internal problems with configuration of MD5 authentication. This particular reason can only be returned when md5AuthEnabled is true and status is DOWN.", + "BGP peer disabled because it is not labeled as an NCC spoke. Currently, BGP peers using SD-WAN connectivity or CCI(Cross Cloud Interconnect) attachment will be disabled for this reason.", "" ], "type": "string" @@ -71903,25 +72036,25 @@ "id": "SSLHealthCheck", "properties": { "port": { - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 443. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -71938,11 +72071,11 @@ "type": "string" }, "request": { - "description": "The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.", + "description": "Instructs the health check prober to send this exact ASCII string, up to 1024 bytes in length, after establishing the TCP connection and SSL handshake.", "type": "string" }, "response": { - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.", + "description": "Creates a content-based SSL health check. In addition to establishing a TCP connection and the TLS handshake, you can configure the health check to pass only when the backend sends this exact response ASCII string, up to 1024 bytes in length. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp", "type": "string" } }, @@ -72709,6 +72842,13 @@ "" ], "type": "string" + }, + "userDefinedFields": { + "description": "Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A user-defined field consists of up to 4 bytes extracted from a fixed offset in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an optional mask to select certain bits. Rules may then specify matching values for these fields. Example: userDefinedFields: - name: \"ipv4_fragment_offset\" base: IPV4 offset: 6 size: 2 mask: \"0x1fff\"", + "items": { + "$ref": "SecurityPolicyUserDefinedField" + }, + "type": "array" } }, "type": "object" @@ -73053,6 +73193,10 @@ "$ref": "SecurityPolicyRuleMatcher", "description": "A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced." }, + "networkMatch": { + "$ref": "SecurityPolicyRuleNetworkMatcher", + "description": "A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - \"192.0.2.0/24\" - \"198.51.100.0/24\" userDefinedFields: - name: \"ipv4_fragment_offset\" values: - \"1-0x1fff\" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named \"ipv4_fragment_offset\" with a value between 1 and 0x1fff inclusive." + }, "preconfiguredWafConfig": { "$ref": "SecurityPolicyRulePreconfiguredWafConfig", "description": "Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect." @@ -73241,6 +73385,86 @@ }, "type": "object" }, + "SecurityPolicyRuleNetworkMatcher": { + "id": "SecurityPolicyRuleNetworkMatcher", + "properties": { + "destIpRanges": { + "description": "Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "destPorts": { + "description": "Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", + "items": { + "type": "string" + }, + "type": "array" + }, + "ipProtocols": { + "description": "IPv4 protocol / IPv6 next header (after extension headers). Each element can be an 8-bit unsigned decimal number (e.g. \"6\"), range (e.g. \"253-254\"), or one of the following protocol names: \"tcp\", \"udp\", \"icmp\", \"esp\", \"ah\", \"ipip\", or \"sctp\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcAsns": { + "description": "BGP Autonomous System Number associated with the source IP address.", + "items": { + "format": "uint32", + "type": "integer" + }, + "type": "array" + }, + "srcIpRanges": { + "description": "Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcPorts": { + "description": "Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcRegionCodes": { + "description": "Two-letter ISO 3166-1 alpha-2 country code associated with the source IP address.", + "items": { + "type": "string" + }, + "type": "array" + }, + "userDefinedFields": { + "description": "User-defined fields. Each element names a defined field and lists the matching values for that field.", + "items": { + "$ref": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch": { + "id": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch", + "properties": { + "name": { + "description": "Name of the user-defined field, as given in the definition.", + "type": "string" + }, + "values": { + "description": "Matching values of the field. Each element can be a 32-bit unsigned decimal or hexadecimal (starting with \"0x\") number (e.g. \"64\") or range (e.g. \"0x400-0x7ff\").", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "SecurityPolicyRulePreconfiguredWafConfig": { "id": "SecurityPolicyRulePreconfiguredWafConfig", "properties": { @@ -73440,6 +73664,46 @@ }, "type": "object" }, + "SecurityPolicyUserDefinedField": { + "id": "SecurityPolicyUserDefinedField", + "properties": { + "base": { + "description": "The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required", + "enum": [ + "IPV4", + "IPV6", + "TCP", + "UDP" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "mask": { + "description": "If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with \"0x\"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.", + "type": "string" + }, + "name": { + "description": "The name of this field. Must be unique within the policy.", + "type": "string" + }, + "offset": { + "description": "Offset of the first byte of the field (in network byte order) relative to 'base'.", + "format": "int32", + "type": "integer" + }, + "size": { + "description": "Size of the field in bytes. Valid values: 1-4.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "SecuritySettings": { "description": "The authentication and authorization settings for a BackendService.", "id": "SecuritySettings", @@ -76635,25 +76899,25 @@ "id": "TCPHealthCheck", "properties": { "port": { - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 80. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -76670,11 +76934,11 @@ "type": "string" }, "request": { - "description": "The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.", + "description": "Instructs the health check prober to send this exact ASCII string, up to 1024 bytes in length, after establishing the TCP connection.", "type": "string" }, "response": { - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.", + "description": "Creates a content-based TCP health check. In addition to establishing a TCP connection, you can configure the health check to pass only when the backend sends this exact response ASCII string, up to 1024 bytes in length. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp", "type": "string" } }, @@ -77830,6 +78094,10 @@ "description": "The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this target instance.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -78248,6 +78516,10 @@ "description": "[Output Only] URL of the region where the target pool resides.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this target pool.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -78946,6 +79218,108 @@ }, "type": "object" }, + "TargetTcpProxiesScopedList": { + "id": "TargetTcpProxiesScopedList", + "properties": { + "targetTcpProxies": { + "description": "A list of TargetTcpProxies contained in this scope.", + "items": { + "$ref": "TargetTcpProxy" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of backend services 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", + "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" + ], + "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", + "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" + }, "TargetTcpProxiesSetBackendServiceRequest": { "id": "TargetTcpProxiesSetBackendServiceRequest", "properties": { @@ -79032,6 +79406,133 @@ }, "type": "object" }, + "TargetTcpProxyAggregatedList": { + "id": "TargetTcpProxyAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "TargetTcpProxiesScopedList", + "description": "Name of the scope containing this set of TargetTcpProxies." + }, + "description": "A list of TargetTcpProxiesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#targetTcpProxyAggregatedList", + "description": "[Output Only] Type of resource. Always compute#targetTcpProxyAggregatedList for lists of Target TCP Proxies.", + "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", + "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" + ], + "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", + "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" + }, "TargetTcpProxyList": { "description": "Contains a list of TargetTcpProxy resources.", "id": "TargetTcpProxyList", @@ -79760,12 +80261,12 @@ "id": "UDPHealthCheck", "properties": { "port": { - "description": "The UDP port number for the health check request. Valid values are 1 through 65535.", + "description": "The UDP port number to which the health check prober sends packets. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "request": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index c565978639b..bca3f6240f1 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -2064,6 +2064,10 @@ type AccessConfig struct { // external IPv6 range. PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this access config. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SetPublicDns: Specifies whether a public DNS 'A' record should be // created for the external IP address of this access configuration. SetPublicDns bool `json:"setPublicDns,omitempty"` @@ -7881,6 +7885,38 @@ func (s *BulkInsertInstanceResourcePerInstanceProperties) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BundledLocalSsds struct { + // DefaultInterface: The default disk interface if the interface is not + // specified. + DefaultInterface string `json:"defaultInterface,omitempty"` + + // PartitionCount: The number of partitions. + PartitionCount int64 `json:"partitionCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DefaultInterface") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DefaultInterface") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BundledLocalSsds) MarshalJSON() ([]byte, error) { + type NoMethod BundledLocalSsds + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type CacheInvalidationRule struct { // Host: If set, this invalidation rule will only apply to requests with // a Host header matching host. @@ -15380,35 +15416,45 @@ type GRPCHealthCheck struct { // The grpc_service_name can only be ASCII. GrpcServiceName string `json:"grpcServiceName,omitempty"` - // Port: The port number for the health check request. Must be specified - // if port_name and port_specification are not set or if - // port_specification is USE_FIXED_PORT. Valid values are 1 through - // 65535. + // Port: The TCP port number to which the health check prober sends + // packets. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. The - // port_name should conform to RFC1035. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, gRPC health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ForceSendFields is a list of field names (e.g. "GrpcServiceName") to @@ -15870,36 +15916,52 @@ func (s *GuestOsFeature) MarshalJSON() ([]byte, error) { type HTTP2HealthCheck struct { // Host: The value of the host header in the HTTP/2 health check - // request. If left empty (default value), the IP on behalf of which - // this health check is performed will be used. + // request. If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest Host string `json:"host,omitempty"` - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, HTTP2 health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -15915,9 +15977,12 @@ type HTTP2HealthCheck struct { // default value is /. RequestPath string `json:"requestPath,omitempty"` - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. + // Response: Creates a content-based HTTP/2 health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http Response string `json:"response,omitempty"` // WeightReportMode: Weight report mode. used for weighted Load @@ -15961,36 +16026,52 @@ func (s *HTTP2HealthCheck) MarshalJSON() ([]byte, error) { type HTTPHealthCheck struct { // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. + // If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest Host string `json:"host,omitempty"` - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 80. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, HTTP health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Also supported in + // legacy HTTP health checks for target pools. The health check supports + // all backends supported by the backend service provided the backend + // can be health checked. For example, GCE_VM_IP network endpoint + // groups, GCE_VM_IP_PORT network endpoint groups, and instance group + // backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides + // an indirect method of specifying the health check port by referring + // to the backend service. Only supported by backend services for proxy + // load balancers. Not supported by target pools. Not supported by + // backend services for pass-through load balancers. Supports all + // backends that can be health checked; for example, GCE_VM_IP_PORT + // network endpoint groups and instance group backends. For + // GCE_VM_IP_PORT network endpoint group backends, the health check uses + // the port number specified for each endpoint in the network endpoint + // group. For instance group backends, the health check uses the port + // number determined by looking up the backend service's named port in + // the instance group's list of named ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -16006,9 +16087,12 @@ type HTTPHealthCheck struct { // default value is /. RequestPath string `json:"requestPath,omitempty"` - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. + // Response: Creates a content-based HTTP health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http Response string `json:"response,omitempty"` // WeightReportMode: Weight report mode. used for weighted Load @@ -16052,36 +16136,52 @@ func (s *HTTPHealthCheck) MarshalJSON() ([]byte, error) { type HTTPSHealthCheck struct { // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. + // If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest Host string `json:"host,omitempty"` - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, HTTPS health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -16097,9 +16197,12 @@ type HTTPSHealthCheck struct { // default value is /. RequestPath string `json:"requestPath,omitempty"` - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. + // Response: Creates a content-based HTTPS health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http Response string `json:"response,omitempty"` // WeightReportMode: Weight report mode. used for weighted Load @@ -21922,11 +22025,15 @@ func (s *InstanceGroupManagerResizeRequest) MarshalJSON() ([]byte, error) { } type InstanceGroupManagerResizeRequestStatus struct { + // Error: Errors encountered during the queueing or provisioning phases + // of the ResizeRequest. + Error *InstanceGroupManagerResizeRequestStatusError `json:"error,omitempty"` + // QueuingPolicy: Constraints for the time when the instances start // provisioning. Always exposed as absolute time. QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "QueuingPolicy") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -21934,10 +22041,10 @@ type InstanceGroupManagerResizeRequestStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QueuingPolicy") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -21949,6 +22056,109 @@ func (s *InstanceGroupManagerResizeRequestStatus) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupManagerResizeRequestStatusError: Errors encountered +// during the queueing or provisioning phases of the ResizeRequest. +type InstanceGroupManagerResizeRequestStatusError struct { + // Errors: [Output Only] The array of errors encountered while + // processing this operation. + Errors []*InstanceGroupManagerResizeRequestStatusErrorErrors `json:"errors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Errors") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerResizeRequestStatusError) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerResizeRequestStatusError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagerResizeRequestStatusErrorErrors struct { + // Code: [Output Only] The error type identifier for this error. + Code string `json:"code,omitempty"` + + // ErrorDetails: [Output Only] An optional list of messages that contain + // the error details. There is a set of defined message types to use for + // providing details.The syntax depends on the error code. For example, + // QuotaExceededInfo will have details when the error code is + // QUOTA_EXCEEDED. + ErrorDetails []*InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails `json:"errorDetails,omitempty"` + + // Location: [Output Only] Indicates the field in the request that + // caused the error. This property is optional. + Location string `json:"location,omitempty"` + + // Message: [Output Only] An optional, human-readable error message. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerResizeRequestStatusErrorErrors) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerResizeRequestStatusErrorErrors + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails struct { + ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` + + Help *Help `json:"help,omitempty"` + + LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` + + QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceGroupManagerResizeRequestsListResponse: [Output Only] A list // of resize requests. type InstanceGroupManagerResizeRequestsListResponse struct { @@ -31319,6 +31529,10 @@ type MachineType struct { // "X86_64" - Machines with architecture X86_64 Architecture string `json:"architecture,omitempty"` + // BundledLocalSsds: [Output Only] The configuration of bundled local + // SSD for the machine type. + BundledLocalSsds *BundledLocalSsds `json:"bundledLocalSsds,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -51099,6 +51313,10 @@ type RouterStatusBgpPeerStatus struct { // "MD5_AUTH_INTERNAL_PROBLEM" - Indicates internal problems with // configuration of MD5 authentication. This particular reason can only // be returned when md5AuthEnabled is true and status is DOWN. + // "MISSING_NETWORK_CONNECTIVITY_CENTER_SPOKE" - BGP peer disabled + // because it is not labeled as an NCC spoke. Currently, BGP peers using + // SD-WAN connectivity or CCI(Cross Cloud Interconnect) attachment will + // be disabled for this reason. // "STATUS_REASON_UNSPECIFIED" StatusReason string `json:"statusReason,omitempty"` @@ -51528,32 +51746,45 @@ func (s *Rule) MarshalJSON() ([]byte, error) { } type SSLHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, SSL health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -51565,15 +51796,17 @@ type SSLHealthCheck struct { // "PROXY_V1" ProxyHeader string `json:"proxyHeader,omitempty"` - // Request: The application data to send once the SSL connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. + // Request: Instructs the health check prober to send this exact ASCII + // string, up to 1024 bytes in length, after establishing the TCP + // connection and SSL handshake. Request string `json:"request,omitempty"` - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. + // Response: Creates a content-based SSL health check. In addition to + // establishing a TCP connection and the TLS handshake, you can + // configure the health check to pass only when the backend sends this + // exact response ASCII string, up to 1024 bytes in length. For details, + // see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp Response string `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Port") to @@ -52652,6 +52885,15 @@ type SecurityPolicy struct { // "FIREWALL" Type string `json:"type,omitempty"` + // UserDefinedFields: Definitions of user-defined fields for + // CLOUD_ARMOR_NETWORK policies. A user-defined field consists of up to + // 4 bytes extracted from a fixed offset in the packet, relative to the + // IPv4, IPv6, TCP, or UDP header, with an optional mask to select + // certain bits. Rules may then specify matching values for these + // fields. Example: userDefinedFields: - name: "ipv4_fragment_offset" + // base: IPV4 offset: 6 size: 2 mask: "0x1fff" + UserDefinedFields []*SecurityPolicyUserDefinedField `json:"userDefinedFields,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -53278,6 +53520,30 @@ type SecurityPolicyRule struct { // If it evaluates to true, the corresponding 'action' is enforced. Match *SecurityPolicyRuleMatcher `json:"match,omitempty"` + // NetworkMatch: A match condition that incoming packets are evaluated + // against for CLOUD_ARMOR_NETWORK security policies. If it matches, the + // corresponding 'action' is enforced. The match criteria for a rule + // consists of built-in match fields (like 'srcIpRanges') and + // potentially multiple user-defined match fields ('userDefinedFields'). + // Field values may be extracted directly from the packet or derived + // from it (e.g. 'srcRegionCodes'). Some fields may not be present in + // every packet (e.g. 'srcPorts'). A user-defined field is only present + // if the base header is found in the packet and the entire field is in + // bounds. Each match field may specify which values can match it, + // listing one or more ranges, prefixes, or exact values that are + // considered a match for the field. A field value must be present in + // order to match a specified match field. If no match values are + // specified for a match field, then any field value is considered to + // match it, and it's not required to be present. For a packet to match + // a rule, all specified match fields must match the corresponding field + // values derived from the packet. Example: networkMatch: srcIpRanges: - + // "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: + // "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition + // matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 + // and a user-defined field named "ipv4_fragment_offset" with a value + // between 1 and 0x1fff inclusive. + NetworkMatch *SecurityPolicyRuleNetworkMatcher `json:"networkMatch,omitempty"` + // PreconfiguredWafConfig: Preconfigured WAF configuration to be applied // for the rule. If the rule does not evaluate preconfigured WAF rules, // i.e., if evaluatePreconfiguredWaf() is not used, this field will have @@ -53586,6 +53852,97 @@ func (s *SecurityPolicyRuleMatcherConfigLayer4Config) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SecurityPolicyRuleNetworkMatcher struct { + // DestIpRanges: Destination IPv4/IPv6 addresses or CIDR prefixes, in + // standard text format. + DestIpRanges []string `json:"destIpRanges,omitempty"` + + // DestPorts: Destination port numbers for TCP/UDP/SCTP. Each element + // can be a 16-bit unsigned decimal number (e.g. "80") or range (e.g. + // "0-1023"). + DestPorts []string `json:"destPorts,omitempty"` + + // IpProtocols: IPv4 protocol / IPv6 next header (after extension + // headers). Each element can be an 8-bit unsigned decimal number (e.g. + // "6"), range (e.g. "253-254"), or one of the following protocol names: + // "tcp", "udp", "icmp", "esp", "ah", "ipip", or "sctp". + IpProtocols []string `json:"ipProtocols,omitempty"` + + // SrcAsns: BGP Autonomous System Number associated with the source IP + // address. + SrcAsns []int64 `json:"srcAsns,omitempty"` + + // SrcIpRanges: Source IPv4/IPv6 addresses or CIDR prefixes, in standard + // text format. + SrcIpRanges []string `json:"srcIpRanges,omitempty"` + + // SrcPorts: Source port numbers for TCP/UDP/SCTP. Each element can be a + // 16-bit unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). + SrcPorts []string `json:"srcPorts,omitempty"` + + // SrcRegionCodes: Two-letter ISO 3166-1 alpha-2 country code associated + // with the source IP address. + SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` + + // UserDefinedFields: User-defined fields. Each element names a defined + // field and lists the matching values for that field. + UserDefinedFields []*SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch `json:"userDefinedFields,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestIpRanges") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestIpRanges") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRuleNetworkMatcher) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleNetworkMatcher + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch struct { + // Name: Name of the user-defined field, as given in the definition. + Name string `json:"name,omitempty"` + + // Values: Matching values of the field. Each element can be a 32-bit + // unsigned decimal or hexadecimal (starting with "0x") number (e.g. + // "64") or range (e.g. "0x400-0x7ff"). + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SecurityPolicyRulePreconfiguredWafConfig struct { // Exclusions: A list of exclusions to apply during preconfigured WAF // evaluation. @@ -53903,6 +54260,62 @@ func (s *SecurityPolicyRuleRedirectOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SecurityPolicyUserDefinedField struct { + // Base: The base relative to which 'offset' is measured. Possible + // values are: - IPV4: Points to the beginning of the IPv4 header. - + // IPV6: Points to the beginning of the IPv6 header. - TCP: Points to + // the beginning of the TCP header, skipping over any IPv4 options or + // IPv6 extension headers. Not present for non-first fragments. - UDP: + // Points to the beginning of the UDP header, skipping over any IPv4 + // options or IPv6 extension headers. Not present for non-first + // fragments. required + // + // Possible values: + // "IPV4" + // "IPV6" + // "TCP" + // "UDP" + Base string `json:"base,omitempty"` + + // Mask: If specified, apply this mask (bitwise AND) to the field to + // ignore bits before matching. Encoded as a hexadecimal number + // (starting with "0x"). The last byte of the field (in network byte + // order) corresponds to the least significant byte of the mask. + Mask string `json:"mask,omitempty"` + + // Name: The name of this field. Must be unique within the policy. + Name string `json:"name,omitempty"` + + // Offset: Offset of the first byte of the field (in network byte order) + // relative to 'base'. + Offset int64 `json:"offset,omitempty"` + + // Size: Size of the field in bytes. Valid values: 1-4. + Size int64 `json:"size,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Base") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Base") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyUserDefinedField) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyUserDefinedField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SecuritySettings: The authentication and authorization settings for a // BackendService. type SecuritySettings struct { @@ -58825,32 +59238,45 @@ func (s *Subsetting) MarshalJSON() ([]byte, error) { } type TCPHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 80. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, TCP health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -58862,15 +59288,16 @@ type TCPHealthCheck struct { // "PROXY_V1" ProxyHeader string `json:"proxyHeader,omitempty"` - // Request: The application data to send once the TCP connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. + // Request: Instructs the health check prober to send this exact ASCII + // string, up to 1024 bytes in length, after establishing the TCP + // connection. Request string `json:"request,omitempty"` - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. + // Response: Creates a content-based TCP health check. In addition to + // establishing a TCP connection, you can configure the health check to + // pass only when the backend sends this exact response ASCII string, up + // to 1024 bytes in length. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp Response string `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Port") to @@ -60763,6 +61190,10 @@ type TargetInstance struct { // network that the default network interface belongs to. Network string `json:"network,omitempty"` + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this target instance. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -61426,6 +61857,10 @@ type TargetPool struct { // resides. Region string `json:"region,omitempty"` + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this target pool. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -62640,6 +63075,174 @@ func (s *TargetSslProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TargetTcpProxiesScopedList struct { + // TargetTcpProxies: A list of TargetTcpProxies contained in this scope. + TargetTcpProxies []*TargetTcpProxy `json:"targetTcpProxies,omitempty"` + + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *TargetTcpProxiesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetTcpProxies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetTcpProxies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxiesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetTcpProxiesScopedListWarning: Informational warning which +// replaces the list of backend services when the list is empty. +type TargetTcpProxiesScopedListWarning 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 + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*TargetTcpProxiesScopedListWarningData `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetTcpProxiesScopedListWarningData 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetTcpProxiesSetBackendServiceRequest struct { // Service: The URL of the new BackendService resource for the // targetTcpProxy. @@ -62789,6 +63392,198 @@ func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TargetTcpProxyAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of TargetTcpProxiesScopedList resources. + Items map[string]TargetTcpProxiesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#targetTcpProxyAggregatedList for lists of Target TCP Proxies. + 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. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *TargetTcpProxyAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxyAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetTcpProxyAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetTcpProxyAggregatedListWarning 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 + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*TargetTcpProxyAggregatedListWarningData `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetTcpProxyAggregatedListWarningData 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TargetTcpProxyList: Contains a list of TargetTcpProxy resources. type TargetTcpProxyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -63921,12 +64716,11 @@ func (s *TlsValidationContext) MarshalJSON() ([]byte, error) { } type UDPHealthCheck struct { - // Port: The UDP port number for the health check request. Valid values - // are 1 through 65535. + // Port: The UDP port number to which the health check prober sends + // packets. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` // Request: Raw data of request to send in payload of UDP packet. It is @@ -225174,6 +225968,304 @@ func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } +// method id "compute.targetTcpProxies.aggregatedList": + +type TargetTcpProxiesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all TargetTcpProxy resources, +// regional and global, available to the specified project. +// +// - project: Name of the project scoping this request. +func (r *TargetTcpProxiesService) AggregatedList(project string) *TargetTcpProxiesAggregatedListCall { + c := &TargetTcpProxiesAggregatedListCall{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. 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 `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. 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`. +func (c *TargetTcpProxiesAggregatedListCall) Filter(filter string) *TargetTcpProxiesAggregatedListCall { + 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 *TargetTcpProxiesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetTcpProxiesAggregatedListCall { + 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 *TargetTcpProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetTcpProxiesAggregatedListCall { + 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 *TargetTcpProxiesAggregatedListCall) OrderBy(orderBy string) *TargetTcpProxiesAggregatedListCall { + 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 *TargetTcpProxiesAggregatedListCall) PageToken(pageToken string) *TargetTcpProxiesAggregatedListCall { + 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. +func (c *TargetTcpProxiesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetTcpProxiesAggregatedListCall { + 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 information. +func (c *TargetTcpProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *TargetTcpProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TargetTcpProxiesAggregatedListCall) Context(ctx context.Context) *TargetTcpProxiesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TargetTcpProxiesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TargetTcpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetTcpProxies") + 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.targetTcpProxies.aggregatedList" call. +// Exactly one of *TargetTcpProxyAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *TargetTcpProxyAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *TargetTcpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TargetTcpProxyAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of all TargetTcpProxy resources, regional and global, available to the specified project.", + // "flatPath": "projects/{project}/aggregated/targetTcpProxies", + // "httpMethod": "GET", + // "id": "compute.targetTcpProxies.aggregatedList", + // "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. 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "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.", + // "location": "query", + // "type": "boolean" + // }, + // "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": "Name of the project scoping 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.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/targetTcpProxies", + // "response": { + // "$ref": "TargetTcpProxyAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *TargetTcpProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetTcpProxyAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetTcpProxies.delete": type TargetTcpProxiesDeleteCall struct { diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 11ce6ca451d..c0e227e09bc 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -33342,6 +33342,66 @@ }, "targetTcpProxies": { "methods": { + "aggregatedList": { + "description": "Retrieves the list of all TargetTcpProxy resources, regional and global, available to the specified project.", + "flatPath": "projects/{project}/aggregated/targetTcpProxies", + "httpMethod": "GET", + "id": "compute.targetTcpProxies.aggregatedList", + "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. 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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`.", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "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.", + "location": "query", + "type": "boolean" + }, + "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": "Name of the project scoping 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.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/targetTcpProxies", + "response": { + "$ref": "TargetTcpProxyAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { "description": "Deletes the specified TargetTcpProxy resource.", "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", @@ -35452,7 +35512,7 @@ } } }, - "revision": "20220831", + "revision": "20220913", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -39246,6 +39306,21 @@ }, "type": "object" }, + "BundledLocalSsds": { + "id": "BundledLocalSsds", + "properties": { + "defaultInterface": { + "description": "The default disk interface if the interface is not specified.", + "type": "string" + }, + "partitionCount": { + "description": "The number of partitions.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CacheInvalidationRule": { "id": "CacheInvalidationRule", "properties": { @@ -43125,25 +43200,25 @@ "type": "string" }, "port": { - "description": "The port number for the health check request. Must be specified if port_name and port_specification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. The port_name should conform to RFC1035.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" } @@ -43337,29 +43412,29 @@ "id": "HTTP2HealthCheck", "properties": { "host": { - "description": "The value of the host header in the HTTP/2 health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used.", + "description": "The value of the host header in the HTTP/2 health check request. If left empty (default value), the host header is set to the destination IP address to which health check packets are sent. The destination IP address depends on the type of load balancer. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", "type": "string" }, "port": { - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 443. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -43380,7 +43455,7 @@ "type": "string" }, "response": { - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", + "description": "Creates a content-based HTTP/2 health check. In addition to the required HTTP 200 (OK) status code, you can configure the health check to pass only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", "type": "string" } }, @@ -43390,29 +43465,29 @@ "id": "HTTPHealthCheck", "properties": { "host": { - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used.", + "description": "The value of the host header in the HTTP health check request. If left empty (default value), the host header is set to the destination IP address to which health check packets are sent. The destination IP address depends on the type of load balancer. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", "type": "string" }, "port": { - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 80. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Also supported in legacy HTTP health checks for target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -43433,7 +43508,7 @@ "type": "string" }, "response": { - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", + "description": "Creates a content-based HTTP health check. In addition to the required HTTP 200 (OK) status code, you can configure the health check to pass only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", "type": "string" } }, @@ -43443,29 +43518,29 @@ "id": "HTTPSHealthCheck", "properties": { "host": { - "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used.", + "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the host header is set to the destination IP address to which health check packets are sent. The destination IP address depends on the type of load balancer. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", "type": "string" }, "port": { - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 443. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -43486,7 +43561,7 @@ "type": "string" }, "response": { - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", + "description": "Creates a content-based HTTPS health check. In addition to the required HTTP 200 (OK) status code, you can configure the health check to pass only when the backend sends this specific ASCII response string within the first 1024 bytes of the HTTP response body. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", "type": "string" } }, @@ -45676,6 +45751,10 @@ }, "type": "array" }, + "resourceStatus": { + "$ref": "ResourceStatus", + "description": "[Output Only] Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field." + }, "satisfiesPzs": { "description": "[Output Only] Reserved for future use.", "type": "boolean" @@ -50921,6 +51000,10 @@ }, "type": "array" }, + "bundledLocalSsds": { + "$ref": "BundledLocalSsds", + "description": "[Output Only] The configuration of bundled local SSD for the machine type." + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -60439,6 +60522,17 @@ }, "type": "object" }, + "ResourceStatus": { + "description": "Contains output only fields. Use this sub-message for actual values set on Instance attributes as compared to the value requested by the user (intent) in their instance CRUD calls.", + "id": "ResourceStatus", + "properties": { + "physicalHost": { + "description": "[Output Only] An opaque ID of the host on which the VM is running.", + "type": "string" + } + }, + "type": "object" + }, "RolloutPolicy": { "description": "A rollout policy configuration.", "id": "RolloutPolicy", @@ -62129,25 +62223,25 @@ "id": "SSLHealthCheck", "properties": { "port": { - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 443. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -62164,11 +62258,11 @@ "type": "string" }, "request": { - "description": "The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.", + "description": "Instructs the health check prober to send this exact ASCII string, up to 1024 bytes in length, after establishing the TCP connection and SSL handshake.", "type": "string" }, "response": { - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.", + "description": "Creates a content-based SSL health check. In addition to establishing a TCP connection and the TLS handshake, you can configure the health check to pass only when the backend sends this exact response ASCII string, up to 1024 bytes in length. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp", "type": "string" } }, @@ -66524,25 +66618,25 @@ "id": "TCPHealthCheck", "properties": { "port": { - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", + "description": "The TCP port number to which the health check prober sends packets. The default value is 80. Valid values are 1 through 65535.", "format": "int32", "type": "integer" }, "portName": { - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "description": "Not supported.", "type": "string" }, "portSpecification": { - "description": "Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in port and portName fields.", + "description": "Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for pass-through load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for pass-through load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.", "enum": [ "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT" ], "enumDescriptions": [ - "The port number in port is used for health checking.", - "The portName is used for health checking.", - "For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking." + "The port number in the health check's port is used for health checking. Applies to network endpoint group and instance group backends.", + "Not supported.", + "For network endpoint group backends, the health check uses the port number specified on each endpoint in the network endpoint group. For instance group backends, the health check uses the port number specified for the backend service's named port defined in the instance group's named ports." ], "type": "string" }, @@ -66559,11 +66653,11 @@ "type": "string" }, "request": { - "description": "The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.", + "description": "Instructs the health check prober to send this exact ASCII string, up to 1024 bytes in length, after establishing the TCP connection.", "type": "string" }, "response": { - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.", + "description": "Creates a content-based TCP health check. In addition to establishing a TCP connection, you can configure the health check to pass only when the backend sends this exact response ASCII string, up to 1024 bytes in length. For details, see: https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp", "type": "string" } }, @@ -68819,6 +68913,108 @@ }, "type": "object" }, + "TargetTcpProxiesScopedList": { + "id": "TargetTcpProxiesScopedList", + "properties": { + "targetTcpProxies": { + "description": "A list of TargetTcpProxies contained in this scope.", + "items": { + "$ref": "TargetTcpProxy" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of backend services 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", + "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" + ], + "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", + "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" + }, "TargetTcpProxiesSetBackendServiceRequest": { "id": "TargetTcpProxiesSetBackendServiceRequest", "properties": { @@ -68905,6 +69101,133 @@ }, "type": "object" }, + "TargetTcpProxyAggregatedList": { + "id": "TargetTcpProxyAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "TargetTcpProxiesScopedList", + "description": "Name of the scope containing this set of TargetTcpProxies." + }, + "description": "A list of TargetTcpProxiesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#targetTcpProxyAggregatedList", + "description": "[Output Only] Type of resource. Always compute#targetTcpProxyAggregatedList for lists of Target TCP Proxies.", + "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", + "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" + ], + "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", + "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" + }, "TargetTcpProxyList": { "description": "Contains a list of TargetTcpProxy resources.", "id": "TargetTcpProxyList", diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index 09d1240599f..f2357f866d4 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -7429,6 +7429,38 @@ func (s *BulkInsertInstanceResourcePerInstanceProperties) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BundledLocalSsds struct { + // DefaultInterface: The default disk interface if the interface is not + // specified. + DefaultInterface string `json:"defaultInterface,omitempty"` + + // PartitionCount: The number of partitions. + PartitionCount int64 `json:"partitionCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DefaultInterface") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DefaultInterface") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BundledLocalSsds) MarshalJSON() ([]byte, error) { + type NoMethod BundledLocalSsds + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type CacheInvalidationRule struct { // Host: If set, this invalidation rule will only apply to requests with // a Host header matching host. @@ -13486,35 +13518,45 @@ type GRPCHealthCheck struct { // The grpc_service_name can only be ASCII. GrpcServiceName string `json:"grpcServiceName,omitempty"` - // Port: The port number for the health check request. Must be specified - // if port_name and port_specification are not set or if - // port_specification is USE_FIXED_PORT. Valid values are 1 through - // 65535. + // Port: The TCP port number to which the health check prober sends + // packets. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. The - // port_name should conform to RFC1035. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, gRPC health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ForceSendFields is a list of field names (e.g. "GrpcServiceName") to @@ -13869,36 +13911,52 @@ func (s *GuestOsFeature) MarshalJSON() ([]byte, error) { type HTTP2HealthCheck struct { // Host: The value of the host header in the HTTP/2 health check - // request. If left empty (default value), the IP on behalf of which - // this health check is performed will be used. + // request. If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest Host string `json:"host,omitempty"` - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, HTTP2 health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -13914,9 +13972,12 @@ type HTTP2HealthCheck struct { // default value is /. RequestPath string `json:"requestPath,omitempty"` - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. + // Response: Creates a content-based HTTP/2 health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http Response string `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Host") to @@ -13944,36 +14005,52 @@ func (s *HTTP2HealthCheck) MarshalJSON() ([]byte, error) { type HTTPHealthCheck struct { // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. + // If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest Host string `json:"host,omitempty"` - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 80. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, HTTP health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Also supported in + // legacy HTTP health checks for target pools. The health check supports + // all backends supported by the backend service provided the backend + // can be health checked. For example, GCE_VM_IP network endpoint + // groups, GCE_VM_IP_PORT network endpoint groups, and instance group + // backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides + // an indirect method of specifying the health check port by referring + // to the backend service. Only supported by backend services for proxy + // load balancers. Not supported by target pools. Not supported by + // backend services for pass-through load balancers. Supports all + // backends that can be health checked; for example, GCE_VM_IP_PORT + // network endpoint groups and instance group backends. For + // GCE_VM_IP_PORT network endpoint group backends, the health check uses + // the port number specified for each endpoint in the network endpoint + // group. For instance group backends, the health check uses the port + // number determined by looking up the backend service's named port in + // the instance group's list of named ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -13989,9 +14066,12 @@ type HTTPHealthCheck struct { // default value is /. RequestPath string `json:"requestPath,omitempty"` - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. + // Response: Creates a content-based HTTP health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http Response string `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Host") to @@ -14019,36 +14099,52 @@ func (s *HTTPHealthCheck) MarshalJSON() ([]byte, error) { type HTTPSHealthCheck struct { // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. + // If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest Host string `json:"host,omitempty"` - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, HTTPS health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -14064,9 +14160,12 @@ type HTTPSHealthCheck struct { // default value is /. RequestPath string `json:"requestPath,omitempty"` - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. + // Response: Creates a content-based HTTPS health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http Response string `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Host") to @@ -17569,6 +17668,11 @@ type Instance struct { // ResourcePolicies: Resource policies applied to this instance. ResourcePolicies []string `json:"resourcePolicies,omitempty"` + // ResourceStatus: [Output Only] Specifies values set for instance + // attributes as compared to the values requested by user in the + // corresponding input only field. + ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty"` + // SatisfiesPzs: [Output Only] Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` @@ -25891,6 +25995,10 @@ type MachineType struct { // assigned to this machine type. Accelerators []*MachineTypeAccelerators `json:"accelerators,omitempty"` + // BundledLocalSsds: [Output Only] The configuration of bundled local + // SSD for the machine type. + BundledLocalSsds *BundledLocalSsds `json:"bundledLocalSsds,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -40888,6 +40996,37 @@ func (s *ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ResourceStatus: Contains output only fields. Use this sub-message for +// actual 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"` + + // ForceSendFields is a list of field names (e.g. "PhysicalHost") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PhysicalHost") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourceStatus) MarshalJSON() ([]byte, error) { + type NoMethod ResourceStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RolloutPolicy: A rollout policy configuration. type RolloutPolicy struct { // DefaultRolloutTime: An optional RFC3339 timestamp on or after which @@ -43187,32 +43326,45 @@ func (s *Rule) MarshalJSON() ([]byte, error) { } type SSLHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, SSL health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -43224,15 +43376,17 @@ type SSLHealthCheck struct { // "PROXY_V1" ProxyHeader string `json:"proxyHeader,omitempty"` - // Request: The application data to send once the SSL connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. + // Request: Instructs the health check prober to send this exact ASCII + // string, up to 1024 bytes in length, after establishing the TCP + // connection and SSL handshake. Request string `json:"request,omitempty"` - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. + // Response: Creates a content-based SSL health check. In addition to + // establishing a TCP connection and the TLS handshake, you can + // configure the health check to pass only when the backend sends this + // exact response ASCII string, up to 1024 bytes in length. For details, + // see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp Response string `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Port") to @@ -50009,32 +50163,45 @@ func (s *Subsetting) MarshalJSON() ([]byte, error) { } type TCPHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 80. Valid values are 1 through 65535. Port int64 `json:"port,omitempty"` - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. + // PortName: Not supported. PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how port is selected for health - // checking, can be one of following values: USE_FIXED_PORT: The port - // number in port is used for health checking. USE_NAMED_PORT: The - // portName is used for health checking. USE_SERVING_PORT: For - // NetworkEndpointGroup, the port specified for each network endpoint is - // used for health checking. For other backends, the port or named port - // specified in the Backend Service is used for health checking. If not - // specified, TCP health check follows behavior specified in port and - // portName fields. + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "USE_FIXED_PORT" - The port number in port is used for health - // checking. - // "USE_NAMED_PORT" - The portName is used for health checking. - // "USE_SERVING_PORT" - For NetworkEndpointGroup, the port specified - // for each network endpoint is used for health checking. For other - // backends, the port or named port specified in the Backend Service is - // used for health checking. + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. PortSpecification string `json:"portSpecification,omitempty"` // ProxyHeader: Specifies the type of proxy header to append before @@ -50046,15 +50213,16 @@ type TCPHealthCheck struct { // "PROXY_V1" ProxyHeader string `json:"proxyHeader,omitempty"` - // Request: The application data to send once the TCP connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. + // Request: Instructs the health check prober to send this exact ASCII + // string, up to 1024 bytes in length, after establishing the TCP + // connection. Request string `json:"request,omitempty"` - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. + // Response: Creates a content-based TCP health check. In addition to + // establishing a TCP connection, you can configure the health check to + // pass only when the backend sends this exact response ASCII string, up + // to 1024 bytes in length. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp Response string `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Port") to @@ -53808,6 +53976,174 @@ func (s *TargetSslProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TargetTcpProxiesScopedList struct { + // TargetTcpProxies: A list of TargetTcpProxies contained in this scope. + TargetTcpProxies []*TargetTcpProxy `json:"targetTcpProxies,omitempty"` + + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *TargetTcpProxiesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetTcpProxies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetTcpProxies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxiesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetTcpProxiesScopedListWarning: Informational warning which +// replaces the list of backend services when the list is empty. +type TargetTcpProxiesScopedListWarning 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 + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*TargetTcpProxiesScopedListWarningData `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetTcpProxiesScopedListWarningData 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetTcpProxiesSetBackendServiceRequest struct { // Service: The URL of the new BackendService resource for the // targetTcpProxy. @@ -53957,6 +54293,198 @@ func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TargetTcpProxyAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of TargetTcpProxiesScopedList resources. + Items map[string]TargetTcpProxiesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#targetTcpProxyAggregatedList for lists of Target TCP Proxies. + 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. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *TargetTcpProxyAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxyAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetTcpProxyAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetTcpProxyAggregatedListWarning 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 + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*TargetTcpProxyAggregatedListWarningData `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetTcpProxyAggregatedListWarningData 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetTcpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TargetTcpProxyList: Contains a list of TargetTcpProxy resources. type TargetTcpProxyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -198695,6 +199223,304 @@ func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } +// method id "compute.targetTcpProxies.aggregatedList": + +type TargetTcpProxiesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all TargetTcpProxy resources, +// regional and global, available to the specified project. +// +// - project: Name of the project scoping this request. +func (r *TargetTcpProxiesService) AggregatedList(project string) *TargetTcpProxiesAggregatedListCall { + c := &TargetTcpProxiesAggregatedListCall{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. 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 `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. 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`. +func (c *TargetTcpProxiesAggregatedListCall) Filter(filter string) *TargetTcpProxiesAggregatedListCall { + 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 *TargetTcpProxiesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetTcpProxiesAggregatedListCall { + 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 *TargetTcpProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetTcpProxiesAggregatedListCall { + 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 *TargetTcpProxiesAggregatedListCall) OrderBy(orderBy string) *TargetTcpProxiesAggregatedListCall { + 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 *TargetTcpProxiesAggregatedListCall) PageToken(pageToken string) *TargetTcpProxiesAggregatedListCall { + 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. +func (c *TargetTcpProxiesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetTcpProxiesAggregatedListCall { + 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 information. +func (c *TargetTcpProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *TargetTcpProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TargetTcpProxiesAggregatedListCall) Context(ctx context.Context) *TargetTcpProxiesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TargetTcpProxiesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TargetTcpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetTcpProxies") + 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.targetTcpProxies.aggregatedList" call. +// Exactly one of *TargetTcpProxyAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *TargetTcpProxyAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *TargetTcpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TargetTcpProxyAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of all TargetTcpProxy resources, regional and global, available to the specified project.", + // "flatPath": "projects/{project}/aggregated/targetTcpProxies", + // "httpMethod": "GET", + // "id": "compute.targetTcpProxies.aggregatedList", + // "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. 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. 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`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "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.", + // "location": "query", + // "type": "boolean" + // }, + // "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": "Name of the project scoping 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.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/targetTcpProxies", + // "response": { + // "$ref": "TargetTcpProxyAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *TargetTcpProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetTcpProxyAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetTcpProxies.delete": type TargetTcpProxiesDeleteCall struct { diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 4e2d62cab26..58a895a72be 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -218,6 +218,11 @@ "location": "query", "type": "string" }, + "name": { + "description": "Optional. The job name. Optional.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", "format": "int32", @@ -453,6 +458,11 @@ "location": "query", "type": "string" }, + "name": { + "description": "Optional. The job name. Optional.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", "format": "int32", @@ -1158,6 +1168,11 @@ "required": true, "type": "string" }, + "name": { + "description": "Optional. The job name. Optional.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", "format": "int32", @@ -2225,7 +2240,7 @@ } } }, - "revision": "20220812", + "revision": "20220914", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -4820,6 +4835,10 @@ "$ref": "TransformSummary" }, "type": "array" + }, + "stepNamesHash": { + "description": "A hash value of the submitted pipeline portable graph step names if exists.", + "type": "string" } }, "type": "object" diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index 89906d1180f..4bcbf1e5119 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -4459,6 +4459,10 @@ type PipelineDescription struct { // pipeline and collections between them. OriginalPipelineTransform []*TransformSummary `json:"originalPipelineTransform,omitempty"` + // StepNamesHash: A hash value of the submitted pipeline portable graph + // step names if exists. + StepNamesHash string `json:"stepNamesHash,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisplayData") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -8557,6 +8561,12 @@ func (c *ProjectsJobsAggregatedCall) Location(location string) *ProjectsJobsAggr return c } +// Name sets the optional parameter "name": The job name. Optional. +func (c *ProjectsJobsAggregatedCall) Name(name string) *ProjectsJobsAggregatedCall { + c.urlParams_.Set("name", name) + return c +} + // PageSize sets the optional parameter "pageSize": If there are many // jobs, limit response to at most this many. The actual number of jobs // returned will be the lesser of max_responses and an unspecified @@ -8727,6 +8737,11 @@ func (c *ProjectsJobsAggregatedCall) Do(opts ...googleapi.CallOption) (*ListJobs // "location": "query", // "type": "string" // }, + // "name": { + // "description": "Optional. The job name. Optional.", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", // "format": "int32", @@ -9489,6 +9504,12 @@ func (c *ProjectsJobsListCall) Location(location string) *ProjectsJobsListCall { return c } +// Name sets the optional parameter "name": The job name. Optional. +func (c *ProjectsJobsListCall) Name(name string) *ProjectsJobsListCall { + c.urlParams_.Set("name", name) + return c +} + // PageSize sets the optional parameter "pageSize": If there are many // jobs, limit response to at most this many. The actual number of jobs // returned will be the lesser of max_responses and an unspecified @@ -9659,6 +9680,11 @@ func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsRespon // "location": "query", // "type": "string" // }, + // "name": { + // "description": "Optional. The job name. Optional.", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", // "format": "int32", @@ -12227,6 +12253,12 @@ func (c *ProjectsLocationsJobsListCall) Filter(filter string) *ProjectsLocations return c } +// Name sets the optional parameter "name": The job name. Optional. +func (c *ProjectsLocationsJobsListCall) Name(name string) *ProjectsLocationsJobsListCall { + c.urlParams_.Set("name", name) + return c +} + // PageSize sets the optional parameter "pageSize": If there are many // jobs, limit response to at most this many. The actual number of jobs // returned will be the lesser of max_responses and an unspecified @@ -12400,6 +12432,11 @@ func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJ // "required": true, // "type": "string" // }, + // "name": { + // "description": "Optional. The job name. Optional.", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", // "format": "int32", diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index a3aad42cdd4..dd0478f6d56 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -2764,7 +2764,7 @@ } } }, - "revision": "20220818", + "revision": "20220920", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -4925,6 +4925,10 @@ "readOnly": true, "type": "string" }, + "notebook": { + "$ref": "GoogleCloudDataplexV1TaskNotebookTaskConfig", + "description": "Config related to running scheduled Notebooks." + }, "spark": { "$ref": "GoogleCloudDataplexV1TaskSparkTaskConfig", "description": "Config related to running custom Spark tasks." @@ -5105,6 +5109,35 @@ }, "type": "object" }, + "GoogleCloudDataplexV1TaskNotebookTaskConfig": { + "description": "Config for running scheduled notebooks.", + "id": "GoogleCloudDataplexV1TaskNotebookTaskConfig", + "properties": { + "archiveUris": { + "description": "Optional. GCS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileUris": { + "description": "Optional. GCS URIs of files to be placed in the working directory of each executor.", + "items": { + "type": "string" + }, + "type": "array" + }, + "infrastructureSpec": { + "$ref": "GoogleCloudDataplexV1TaskInfrastructureSpec", + "description": "Optional. Infrastructure specification for the execution." + }, + "notebook": { + "description": "Required. Path to input notebook. This can be the GCS URI of the notebook file or the path to a Notebook Content. The execution args are accessible as environment variables (TASK_key=value).", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1TaskSparkTaskConfig": { "description": "User-specified config for running a Spark task.", "id": "GoogleCloudDataplexV1TaskSparkTaskConfig", @@ -5485,7 +5518,7 @@ "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. 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. 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. domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.", + "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. 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. domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.", "items": { "type": "string" }, diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index a555f7916cc..4d9f6a821bd 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -3288,6 +3288,9 @@ type GoogleCloudDataplexV1Task struct { // tasks/{task_id}. Name string `json:"name,omitempty"` + // Notebook: Config related to running scheduled Notebooks. + Notebook *GoogleCloudDataplexV1TaskNotebookTaskConfig `json:"notebook,omitempty"` + // Spark: Config related to running custom Spark tasks. Spark *GoogleCloudDataplexV1TaskSparkTaskConfig `json:"spark,omitempty"` @@ -3587,6 +3590,50 @@ func (s *GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDataplexV1TaskNotebookTaskConfig: Config for running +// scheduled notebooks. +type GoogleCloudDataplexV1TaskNotebookTaskConfig struct { + // ArchiveUris: Optional. GCS URIs of archives to be extracted into the + // working directory of each executor. Supported file types: .jar, .tar, + // .tar.gz, .tgz, and .zip. + ArchiveUris []string `json:"archiveUris,omitempty"` + + // FileUris: Optional. GCS URIs of files to be placed in the working + // directory of each executor. + FileUris []string `json:"fileUris,omitempty"` + + // InfrastructureSpec: Optional. Infrastructure specification for the + // execution. + InfrastructureSpec *GoogleCloudDataplexV1TaskInfrastructureSpec `json:"infrastructureSpec,omitempty"` + + // Notebook: Required. Path to input notebook. This can be the GCS URI + // of the notebook file or the path to a Notebook Content. The execution + // args are accessible as environment variables (TASK_key=value). + Notebook string `json:"notebook,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ArchiveUris") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ArchiveUris") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1TaskNotebookTaskConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TaskNotebookTaskConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1TaskSparkTaskConfig: User-specified config for // running a Spark task. type GoogleCloudDataplexV1TaskSparkTaskConfig struct { @@ -4186,11 +4233,12 @@ type GoogleIamV1Binding struct { // 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. 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. + // 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). diff --git a/dfareporting/v4/dfareporting-api.json b/dfareporting/v4/dfareporting-api.json index a654e02faab..9071949db32 100644 --- a/dfareporting/v4/dfareporting-api.json +++ b/dfareporting/v4/dfareporting-api.json @@ -8364,7 +8364,7 @@ ], "parameters": { "profileId": { - "description": "The DFA user profile ID.", + "description": "The Campaign Manager 360 user profile ID.", "format": "int64", "location": "path", "required": true, @@ -8602,8 +8602,8 @@ "DESCENDING" ], "enumDescriptions": [ - "", - "" + "Ascending order.", + "Descending order." ], "location": "query", "type": "string" @@ -10032,7 +10032,7 @@ } } }, - "revision": "20220815", + "revision": "20220921", "rootUrl": "https://dfareporting.googleapis.com/", "schemas": { "Account": { @@ -14786,7 +14786,7 @@ "type": "string" }, "name": { - "description": "The dimension name, e.g. dfa:advertiser", + "description": "The dimension name, e.g. advertiser", "type": "string" } }, @@ -15163,6 +15163,10 @@ "kind": { "description": "The kind of resource this is, in this case dfareporting#eventFilter.", "type": "string" + }, + "uvarFilter": { + "$ref": "UvarFilter", + "description": "Filter on a custom variable." } }, "type": "object" @@ -21338,6 +21342,47 @@ }, "type": "object" }, + "UvarFilter": { + "description": "Defines the filtering on a single uvar.", + "id": "UvarFilter", + "properties": { + "complement": { + "description": "Return rows which don't match this filter.", + "type": "boolean" + }, + "index": { + "description": "Custom variable index the filter is applied to.", + "format": "int64", + "type": "string" + }, + "kind": { + "description": "The kind of resource this is, in this case dfareporting#uvarFilter.", + "type": "string" + }, + "match": { + "description": "Indicates how the filter should be matched to the values.", + "enum": [ + "UNSPECIFIED", + "EXACT", + "CONTAINS" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "values": { + "description": "Values to filter on.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "VideoFormat": { "description": "Contains information about supported video formats.", "id": "VideoFormat", diff --git a/dfareporting/v4/dfareporting-gen.go b/dfareporting/v4/dfareporting-gen.go index 49fbf0c6dbc..fde281f3598 100644 --- a/dfareporting/v4/dfareporting-gen.go +++ b/dfareporting/v4/dfareporting-gen.go @@ -6839,7 +6839,7 @@ type Dimension struct { // dfareporting#dimension. Kind string `json:"kind,omitempty"` - // Name: The dimension name, e.g. dfa:advertiser + // Name: The dimension name, e.g. advertiser Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Kind") to @@ -7392,6 +7392,9 @@ type EventFilter struct { // dfareporting#eventFilter. Kind string `json:"kind,omitempty"` + // UvarFilter: Filter on a custom variable. + UvarFilter *UvarFilter `json:"uvarFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DimensionFilter") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -15196,6 +15199,52 @@ func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UvarFilter: Defines the filtering on a single uvar. +type UvarFilter struct { + // Complement: Return rows which don't match this filter. + Complement bool `json:"complement,omitempty"` + + // Index: Custom variable index the filter is applied to. + Index int64 `json:"index,omitempty,string"` + + // Kind: The kind of resource this is, in this case + // dfareporting#uvarFilter. + Kind string `json:"kind,omitempty"` + + // Match: Indicates how the filter should be matched to the values. + // + // Possible values: + // "UNSPECIFIED" + // "EXACT" + // "CONTAINS" + Match string `json:"match,omitempty"` + + // Values: Values to filter on. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Complement") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Complement") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UvarFilter) MarshalJSON() ([]byte, error) { + type NoMethod UvarFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VideoFormat: Contains information about supported video formats. type VideoFormat struct { // FileType: File type of the video format. @@ -47614,7 +47663,7 @@ type ReportsPatchCall struct { // Patch: Updates an existing report. This method supports patch // semantics. // -// - profileId: The DFA user profile ID. +// - profileId: The Campaign Manager 360 user profile ID. // - reportId: The ID of the report. func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall { c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47726,7 +47775,7 @@ func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) { // ], // "parameters": { // "profileId": { - // "description": "The DFA user profile ID.", + // "description": "The Campaign Manager 360 user profile ID.", // "format": "int64", // "location": "path", // "required": true, @@ -48451,8 +48500,8 @@ func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall // // Possible values: // -// "ASCENDING" -// "DESCENDING" (default) +// "ASCENDING" - Ascending order. +// "DESCENDING" (default) - Descending order. func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall { c.urlParams_.Set("sortOrder", sortOrder) return c @@ -48617,8 +48666,8 @@ func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, erro // "DESCENDING" // ], // "enumDescriptions": [ - // "", - // "" + // "Ascending order.", + // "Descending order." // ], // "location": "query", // "type": "string" diff --git a/displayvideo/v1/displayvideo-api.json b/displayvideo/v1/displayvideo-api.json index 5809aa1fc62..ff2403aefbb 100644 --- a/displayvideo/v1/displayvideo-api.json +++ b/displayvideo/v1/displayvideo-api.json @@ -4452,7 +4452,7 @@ "type": "string" }, "targetingType": { - "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", "enum": [ "TARGETING_TYPE_UNSPECIFIED", "TARGETING_TYPE_CHANNEL", @@ -4603,7 +4603,7 @@ "type": "string" }, "targetingType": { - "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", + "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", "enum": [ "TARGETING_TYPE_UNSPECIFIED", "TARGETING_TYPE_CHANNEL", @@ -8146,7 +8146,7 @@ } } }, - "revision": "20220815", + "revision": "20220926", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -8497,17 +8497,7 @@ "AGE_RANGE_45_54", "AGE_RANGE_55_64", "AGE_RANGE_65_PLUS", - "AGE_RANGE_UNKNOWN", - "AGE_RANGE_18_20", - "AGE_RANGE_21_24", - "AGE_RANGE_25_29", - "AGE_RANGE_30_34", - "AGE_RANGE_35_39", - "AGE_RANGE_40_44", - "AGE_RANGE_45_49", - "AGE_RANGE_50_54", - "AGE_RANGE_55_59", - "AGE_RANGE_60_64" + "AGE_RANGE_UNKNOWN" ], "enumDescriptions": [ "Default value when age range is not specified in this version. This enum is a placeholder for default value and does not represent a real age range option.", @@ -8517,17 +8507,7 @@ "The age range of the audience is 45 to 54.", "The age range of the audience is 55 to 64.", "The age range of the audience is 65 and up.", - "The age range of the audience is unknown.", - "The age range of the audience is 18 to 20, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 21 to 24, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 25 to 29, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 30 to 34, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 35 to 39, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 40 to 44, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 45 to 49, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 50 to 54, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 55 to 59, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 60 to 64, only supported for the AdGroup of YouTube Programmatic Reservation line item." + "The age range of the audience is unknown." ], "type": "string" }, @@ -8552,17 +8532,7 @@ "AGE_RANGE_45_54", "AGE_RANGE_55_64", "AGE_RANGE_65_PLUS", - "AGE_RANGE_UNKNOWN", - "AGE_RANGE_18_20", - "AGE_RANGE_21_24", - "AGE_RANGE_25_29", - "AGE_RANGE_30_34", - "AGE_RANGE_35_39", - "AGE_RANGE_40_44", - "AGE_RANGE_45_49", - "AGE_RANGE_50_54", - "AGE_RANGE_55_59", - "AGE_RANGE_60_64" + "AGE_RANGE_UNKNOWN" ], "enumDescriptions": [ "Default value when age range is not specified in this version. This enum is a placeholder for default value and does not represent a real age range option.", @@ -8572,17 +8542,7 @@ "The age range of the audience is 45 to 54.", "The age range of the audience is 55 to 64.", "The age range of the audience is 65 and up.", - "The age range of the audience is unknown.", - "The age range of the audience is 18 to 20, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 21 to 24, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 25 to 29, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 30 to 34, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 35 to 39, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 40 to 44, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 45 to 49, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 50 to 54, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 55 to 59, only supported for the AdGroup of YouTube Programmatic Reservation line item.", - "The age range of the audience is 60 to 64, only supported for the AdGroup of YouTube Programmatic Reservation line item." + "The age range of the audience is unknown." ], "readOnly": true, "type": "string" diff --git a/displayvideo/v1/displayvideo-gen.go b/displayvideo/v1/displayvideo-gen.go index bf1dd617959..c6544af5f73 100644 --- a/displayvideo/v1/displayvideo-gen.go +++ b/displayvideo/v1/displayvideo-gen.go @@ -1202,36 +1202,6 @@ type AgeRangeAssignedTargetingOptionDetails struct { // "AGE_RANGE_55_64" - The age range of the audience is 55 to 64. // "AGE_RANGE_65_PLUS" - The age range of the audience is 65 and up. // "AGE_RANGE_UNKNOWN" - The age range of the audience is unknown. - // "AGE_RANGE_18_20" - The age range of the audience is 18 to 20, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_21_24" - The age range of the audience is 21 to 24, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_25_29" - The age range of the audience is 25 to 29, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_30_34" - The age range of the audience is 30 to 34, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_35_39" - The age range of the audience is 35 to 39, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_40_44" - The age range of the audience is 40 to 44, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_45_49" - The age range of the audience is 45 to 49, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_50_54" - The age range of the audience is 50 to 54, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_55_59" - The age range of the audience is 55 to 59, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_60_64" - The age range of the audience is 60 to 64, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. AgeRange string `json:"ageRange,omitempty"` // TargetingOptionId: Required. The targeting_option_id of a @@ -1278,36 +1248,6 @@ type AgeRangeTargetingOptionDetails struct { // "AGE_RANGE_55_64" - The age range of the audience is 55 to 64. // "AGE_RANGE_65_PLUS" - The age range of the audience is 65 and up. // "AGE_RANGE_UNKNOWN" - The age range of the audience is unknown. - // "AGE_RANGE_18_20" - The age range of the audience is 18 to 20, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_21_24" - The age range of the audience is 21 to 24, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_25_29" - The age range of the audience is 25 to 29, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_30_34" - The age range of the audience is 30 to 34, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_35_39" - The age range of the audience is 35 to 39, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_40_44" - The age range of the audience is 40 to 44, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_45_49" - The age range of the audience is 45 to 49, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_50_54" - The age range of the audience is 50 to 54, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_55_59" - The age range of the audience is 55 to 59, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. - // "AGE_RANGE_60_64" - The age range of the audience is 60 to 64, only - // supported for the AdGroup of YouTube Programmatic Reservation line - // item. AgeRange string `json:"ageRange,omitempty"` // ForceSendFields is a list of field names (e.g. "AgeRange") to @@ -31744,8 +31684,7 @@ type AdvertisersTargetingTypesAssignedTargetingOptionsGetCall struct { // option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * // `TARGETING_TYPE_OMID` * -// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * -// `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`. +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall { c := &AdvertisersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId @@ -31881,7 +31820,7 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...go // "type": "string" // }, // "targetingType": { - // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", + // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", // "enum": [ // "TARGETING_TYPE_UNSPECIFIED", // "TARGETING_TYPE_CHANNEL", @@ -32014,8 +31953,7 @@ type AdvertisersTargetingTypesAssignedTargetingOptionsListCall struct { // list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * // `TARGETING_TYPE_OMID` * -// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * -// `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`. +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, targetingType string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { c := &AdvertisersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId @@ -32207,7 +32145,7 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...g // "type": "string" // }, // "targetingType": { - // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", + // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", // "enum": [ // "TARGETING_TYPE_UNSPECIFIED", // "TARGETING_TYPE_CHANNEL", diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index d7975d89bdc..682fcefa64a 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -4467,7 +4467,7 @@ "type": "string" }, "targetingType": { - "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", "enum": [ "TARGETING_TYPE_UNSPECIFIED", "TARGETING_TYPE_CHANNEL", @@ -4618,7 +4618,7 @@ "type": "string" }, "targetingType": { - "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", + "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", "enum": [ "TARGETING_TYPE_UNSPECIFIED", "TARGETING_TYPE_CHANNEL", @@ -8161,7 +8161,7 @@ } } }, - "revision": "20220916", + "revision": "20220926", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -12606,7 +12606,7 @@ "id": "ExchangeAssignedTargetingOptionDetails", "properties": { "exchange": { - "description": "Required. Output only in v1. Required in v2.", + "description": "Required. The enum value for the exchange.", "enum": [ "EXCHANGE_UNSPECIFIED", "EXCHANGE_GOOGLE_AD_MANAGER", diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index 386b04d245e..fec36568e2d 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -7611,7 +7611,7 @@ func (s *EnvironmentTargetingOptionDetails) MarshalJSON() ([]byte, error) { // AssignedTargetingOption when targeting_type is // `TARGETING_TYPE_EXCHANGE`. type ExchangeAssignedTargetingOptionDetails struct { - // Exchange: Required. Output only in v1. Required in v2. + // Exchange: Required. The enum value for the exchange. // // Possible values: // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in @@ -32355,8 +32355,7 @@ type AdvertisersTargetingTypesAssignedTargetingOptionsGetCall struct { // option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * // `TARGETING_TYPE_OMID` * -// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * -// `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`. +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall { c := &AdvertisersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId @@ -32492,7 +32491,7 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...go // "type": "string" // }, // "targetingType": { - // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", + // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", // "enum": [ // "TARGETING_TYPE_UNSPECIFIED", // "TARGETING_TYPE_CHANNEL", @@ -32625,8 +32624,7 @@ type AdvertisersTargetingTypesAssignedTargetingOptionsListCall struct { // list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * // `TARGETING_TYPE_OMID` * -// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * -// `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`. +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, targetingType string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { c := &AdvertisersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId @@ -32818,7 +32816,7 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...g // "type": "string" // }, // "targetingType": { - // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", + // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", // "enum": [ // "TARGETING_TYPE_UNSPECIFIED", // "TARGETING_TYPE_CHANNEL", diff --git a/dns/v1/dns-api.json b/dns/v1/dns-api.json index 7fb8d488655..ce1c5ebce84 100644 --- a/dns/v1/dns-api.json +++ b/dns/v1/dns-api.json @@ -1824,7 +1824,7 @@ } } }, - "revision": "20220908", + "revision": "20220915", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -3375,6 +3375,13 @@ "default": "dns#responsePolicy", "type": "string" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User labels.", + "type": "object" + }, "networks": { "description": "List of network names specifying networks to which this policy is applied.", "items": { diff --git a/dns/v1/dns-gen.go b/dns/v1/dns-gen.go index f1de4406ac9..10a8e6fa67f 100644 --- a/dns/v1/dns-gen.go +++ b/dns/v1/dns-gen.go @@ -2954,6 +2954,9 @@ type ResponsePolicy struct { Kind string `json:"kind,omitempty"` + // Labels: User labels. + Labels map[string]string `json:"labels,omitempty"` + // Networks: List of network names specifying networks to which this // policy is applied. Networks []*ResponsePolicyNetwork `json:"networks,omitempty"` diff --git a/dns/v1beta2/dns-api.json b/dns/v1beta2/dns-api.json index 222b7cc00ce..27ff02110f2 100644 --- a/dns/v1beta2/dns-api.json +++ b/dns/v1beta2/dns-api.json @@ -1821,7 +1821,7 @@ } } }, - "revision": "20220908", + "revision": "20220915", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -3381,6 +3381,13 @@ "default": "dns#responsePolicy", "type": "string" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User labels.", + "type": "object" + }, "networks": { "description": "List of network names specifying networks to which this policy is applied.", "items": { diff --git a/dns/v1beta2/dns-gen.go b/dns/v1beta2/dns-gen.go index b8f06bf55bf..6d23253ba26 100644 --- a/dns/v1beta2/dns-gen.go +++ b/dns/v1beta2/dns-gen.go @@ -2960,6 +2960,9 @@ type ResponsePolicy struct { Kind string `json:"kind,omitempty"` + // Labels: User labels. + Labels map[string]string `json:"labels,omitempty"` + // Networks: List of network names specifying networks to which this // policy is applied. Networks []*ResponsePolicyNetwork `json:"networks,omitempty"` diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index fc4859e16df..c4c560d83f4 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1069,7 +1069,7 @@ } } }, - "revision": "20220912", + "revision": "20220921", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -2161,7 +2161,7 @@ "type": "string" }, "mentionText": { - "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", + "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -2273,6 +2273,11 @@ "description": "The configuration used when outputting documents.", "id": "GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig", "properties": { + "fieldMask": { + "description": "Specifies which fields to include in the output documents.", + "format": "google-fieldmask", + "type": "string" + }, "gcsUri": { "description": "The Cloud Storage uri (a directory) of the output.", "type": "string" @@ -2320,6 +2325,10 @@ "$ref": "GoogleCloudDocumentaiV1DocumentPageImage", "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." }, + "imageQualityScores": { + "$ref": "GoogleCloudDocumentaiV1DocumentPageImageQualityScores", + "description": "Image Quality Scores." + }, "layout": { "$ref": "GoogleCloudDocumentaiV1DocumentPageLayout", "description": "Layout for the page." @@ -2593,6 +2602,41 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1DocumentPageImageQualityScores": { + "description": "Image Quality Scores for the page image", + "id": "GoogleCloudDocumentaiV1DocumentPageImageQualityScores", + "properties": { + "detectedDefects": { + "description": "A list of detected defects.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect" + }, + "type": "array" + }, + "qualityScore": { + "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect": { + "description": "Image Quality Defects", + "id": "GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect", + "properties": { + "confidence": { + "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "format": "float", + "type": "number" + }, + "type": { + "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1DocumentPageLayout": { "description": "Visual element describing a layout unit on a page.", "id": "GoogleCloudDocumentaiV1DocumentPageLayout", @@ -3300,10 +3344,6 @@ "inactive": { "description": "Whether the entity type should be considered as \"inactive\".", "type": "boolean" - }, - "prefixedNamingOnProperties": { - "description": "If set, the properties of this entity type must be prefixed with the parents.", - "type": "boolean" } }, "type": "object" @@ -4116,7 +4156,7 @@ "type": "string" }, "mentionText": { - "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", + "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -4253,6 +4293,10 @@ "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImage", "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." }, + "imageQualityScores": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", + "description": "Image Quality Scores." + }, "layout": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", "description": "Layout for the page." @@ -4526,6 +4570,41 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores": { + "description": "Image Quality Scores for the page image", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", + "properties": { + "detectedDefects": { + "description": "A list of detected defects.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect" + }, + "type": "array" + }, + "qualityScore": { + "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect": { + "description": "Image Quality Defects", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect", + "properties": { + "confidence": { + "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "format": "float", + "type": "number" + }, + "type": { + "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta1DocumentPageLayout": { "description": "Visual element describing a layout unit on a page.", "id": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", @@ -5354,7 +5433,7 @@ "type": "string" }, "mentionText": { - "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", + "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -5511,6 +5590,10 @@ "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImage", "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." }, + "imageQualityScores": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", + "description": "Image Quality Scores." + }, "layout": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", "description": "Layout for the page." @@ -5784,6 +5867,41 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores": { + "description": "Image Quality Scores for the page image", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", + "properties": { + "detectedDefects": { + "description": "A list of detected defects.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect" + }, + "type": "array" + }, + "qualityScore": { + "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect": { + "description": "Image Quality Defects", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect", + "properties": { + "confidence": { + "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "format": "float", + "type": "number" + }, + "type": { + "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentPageLayout": { "description": "Visual element describing a layout unit on a page.", "id": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 78e7bcdfdab..47ac70a5d25 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -2181,9 +2181,8 @@ type GoogleCloudDocumentaiV1DocumentEntity struct { // MentionId: Optional. Deprecated. Use `id` field instead. MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value in the document e.g. `1600 - // Amphitheatre Pkwy`. If the entity is not present in the document, - // this field will be empty. + // MentionText: Optional. Text value of the entity e.g. `1600 + // Amphitheatre Pkwy`. MentionText string `json:"mentionText,omitempty"` // NormalizedValue: Optional. Normalized entity value. Absent if the @@ -2397,10 +2396,13 @@ func (s *GoogleCloudDocumentaiV1DocumentOutputConfig) MarshalJSON() ([]byte, err // GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig: The // configuration used when outputting documents. type GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig struct { + // FieldMask: Specifies which fields to include in the output documents. + FieldMask string `json:"fieldMask,omitempty"` + // GcsUri: The Cloud Storage uri (a directory) of the output. GcsUri string `json:"gcsUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsUri") to + // ForceSendFields is a list of field names (e.g. "FieldMask") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2408,8 +2410,8 @@ type GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "FieldMask") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2448,6 +2450,9 @@ type GoogleCloudDocumentaiV1DocumentPage struct { // bounding boxes can be upright and axis-aligned. Image *GoogleCloudDocumentaiV1DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image Quality Scores. + ImageQualityScores *GoogleCloudDocumentaiV1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` @@ -2875,6 +2880,105 @@ func (s *GoogleCloudDocumentaiV1DocumentPageImage) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1DocumentPageImageQualityScores: Image Quality +// Scores for the page image +type GoogleCloudDocumentaiV1DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + + // QualityScore: The overall quality score. Range [0, 1] where 1 is + // perfect quality. + QualityScore float64 `json:"qualityScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedDefects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScores + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScores + var s1 struct { + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.QualityScore = float64(s1.QualityScore) + return nil +} + +// GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect: +// Image Quality Defects +type GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // indicates strong confidence of that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + + // Type: Name of the defect type. Supported values are + // "quality/defect_blurry", "quality/defect_noisy", + // "quality/defect_dark", "quality/defect_faint", + // "quality/defect_text_too_small", "quality/defect_document_cutoff", + // "quality/defect_text_cutoff", "quality/defect_glare" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // GoogleCloudDocumentaiV1DocumentPageLayout: Visual element describing // a layout unit on a page. type GoogleCloudDocumentaiV1DocumentPageLayout struct { @@ -4012,10 +4116,6 @@ type GoogleCloudDocumentaiV1EntityTypeMetadata struct { // Inactive: Whether the entity type should be considered as "inactive". Inactive bool `json:"inactive,omitempty"` - // PrefixedNamingOnProperties: If set, the properties of this entity - // type must be prefixed with the parents. - PrefixedNamingOnProperties bool `json:"prefixedNamingOnProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. // "HumanReviewLabelingMetadata") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -5457,9 +5557,8 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // MentionId: Optional. Deprecated. Use `id` field instead. MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value in the document e.g. `1600 - // Amphitheatre Pkwy`. If the entity is not present in the document, - // this field will be empty. + // MentionText: Optional. Text value of the entity e.g. `1600 + // Amphitheatre Pkwy`. MentionText string `json:"mentionText,omitempty"` // NormalizedValue: Optional. Normalized entity value. Absent if the @@ -5665,6 +5764,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // bounding boxes can be upright and axis-aligned. Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image Quality Scores. + ImageQualityScores *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` @@ -6093,6 +6195,105 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores: Image +// Quality Scores for the page image +type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + + // QualityScore: The overall quality score. Range [0, 1] where 1 is + // perfect quality. + QualityScore float64 `json:"qualityScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedDefects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores + var s1 struct { + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.QualityScore = float64(s1.QualityScore) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefe +// ct: Image Quality Defects +type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // indicates strong confidence of that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + + // Type: Name of the defect type. Supported values are + // "quality/defect_blurry", "quality/defect_noisy", + // "quality/defect_dark", "quality/defect_faint", + // "quality/defect_text_too_small", "quality/defect_document_cutoff", + // "quality/defect_text_cutoff", "quality/defect_glare" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element // describing a layout unit on a page. type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { @@ -7459,9 +7660,8 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // MentionId: Optional. Deprecated. Use `id` field instead. MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value in the document e.g. `1600 - // Amphitheatre Pkwy`. If the entity is not present in the document, - // this field will be empty. + // MentionText: Optional. Text value of the entity e.g. `1600 + // Amphitheatre Pkwy`. MentionText string `json:"mentionText,omitempty"` // NormalizedValue: Optional. Normalized entity value. Absent if the @@ -7722,6 +7922,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // bounding boxes can be upright and axis-aligned. Image *GoogleCloudDocumentaiV1beta2DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image Quality Scores. + ImageQualityScores *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` @@ -8150,6 +8353,105 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageImage) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores: Image +// Quality Scores for the page image +type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + + // QualityScore: The overall quality score. Range [0, 1] where 1 is + // perfect quality. + QualityScore float64 `json:"qualityScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedDefects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores + var s1 struct { + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.QualityScore = float64(s1.QualityScore) + return nil +} + +// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefe +// ct: Image Quality Defects +type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // indicates strong confidence of that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + + // Type: Name of the defect type. Supported values are + // "quality/defect_blurry", "quality/defect_noisy", + // "quality/defect_dark", "quality/defect_faint", + // "quality/defect_text_too_small", "quality/defect_document_cutoff", + // "quality/defect_text_cutoff", "quality/defect_glare" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // GoogleCloudDocumentaiV1beta2DocumentPageLayout: Visual element // describing a layout unit on a page. type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index 9ac1f59c23e..07f2f3cac96 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20220912", + "revision": "20220921", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1536,7 +1536,7 @@ "type": "string" }, "mentionText": { - "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", + "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -1673,6 +1673,10 @@ "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImage", "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." }, + "imageQualityScores": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", + "description": "Image Quality Scores." + }, "layout": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", "description": "Layout for the page." @@ -1946,6 +1950,41 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores": { + "description": "Image Quality Scores for the page image", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", + "properties": { + "detectedDefects": { + "description": "A list of detected defects.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect" + }, + "type": "array" + }, + "qualityScore": { + "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect": { + "description": "Image Quality Defects", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect", + "properties": { + "confidence": { + "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "format": "float", + "type": "number" + }, + "type": { + "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta1DocumentPageLayout": { "description": "Visual element describing a layout unit on a page.", "id": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", @@ -2799,7 +2838,7 @@ "type": "string" }, "mentionText": { - "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", + "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -2956,6 +2995,10 @@ "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImage", "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." }, + "imageQualityScores": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", + "description": "Image Quality Scores." + }, "layout": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", "description": "Layout for the page." @@ -3229,6 +3272,41 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores": { + "description": "Image Quality Scores for the page image", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", + "properties": { + "detectedDefects": { + "description": "A list of detected defects.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect" + }, + "type": "array" + }, + "qualityScore": { + "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect": { + "description": "Image Quality Defects", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect", + "properties": { + "confidence": { + "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "format": "float", + "type": "number" + }, + "type": { + "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentPageLayout": { "description": "Visual element describing a layout unit on a page.", "id": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index c52f0fc156f..da5dde85c8f 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -2363,9 +2363,8 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // MentionId: Optional. Deprecated. Use `id` field instead. MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value in the document e.g. `1600 - // Amphitheatre Pkwy`. If the entity is not present in the document, - // this field will be empty. + // MentionText: Optional. Text value of the entity e.g. `1600 + // Amphitheatre Pkwy`. MentionText string `json:"mentionText,omitempty"` // NormalizedValue: Optional. Normalized entity value. Absent if the @@ -2571,6 +2570,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // bounding boxes can be upright and axis-aligned. Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image Quality Scores. + ImageQualityScores *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` @@ -2999,6 +3001,105 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores: Image +// Quality Scores for the page image +type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + + // QualityScore: The overall quality score. Range [0, 1] where 1 is + // perfect quality. + QualityScore float64 `json:"qualityScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedDefects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores + var s1 struct { + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.QualityScore = float64(s1.QualityScore) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefe +// ct: Image Quality Defects +type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // indicates strong confidence of that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + + // Type: Name of the defect type. Supported values are + // "quality/defect_blurry", "quality/defect_noisy", + // "quality/defect_dark", "quality/defect_faint", + // "quality/defect_text_too_small", "quality/defect_document_cutoff", + // "quality/defect_text_cutoff", "quality/defect_glare" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element // describing a layout unit on a page. type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { @@ -4429,9 +4530,8 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // MentionId: Optional. Deprecated. Use `id` field instead. MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value in the document e.g. `1600 - // Amphitheatre Pkwy`. If the entity is not present in the document, - // this field will be empty. + // MentionText: Optional. Text value of the entity e.g. `1600 + // Amphitheatre Pkwy`. MentionText string `json:"mentionText,omitempty"` // NormalizedValue: Optional. Normalized entity value. Absent if the @@ -4692,6 +4792,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // bounding boxes can be upright and axis-aligned. Image *GoogleCloudDocumentaiV1beta2DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image Quality Scores. + ImageQualityScores *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` @@ -5120,6 +5223,105 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageImage) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores: Image +// Quality Scores for the page image +type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + + // QualityScore: The overall quality score. Range [0, 1] where 1 is + // perfect quality. + QualityScore float64 `json:"qualityScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedDefects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores + var s1 struct { + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.QualityScore = float64(s1.QualityScore) + return nil +} + +// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefe +// ct: Image Quality Defects +type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // indicates strong confidence of that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + + // Type: Name of the defect type. Supported values are + // "quality/defect_blurry", "quality/defect_noisy", + // "quality/defect_dark", "quality/defect_faint", + // "quality/defect_text_too_small", "quality/defect_document_cutoff", + // "quality/defect_text_cutoff", "quality/defect_glare" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // GoogleCloudDocumentaiV1beta2DocumentPageLayout: Visual element // describing a layout unit on a page. type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index cfc856ef5f5..4f3d3bae1a7 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -836,7 +836,7 @@ } } }, - "revision": "20220912", + "revision": "20220921", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -2080,7 +2080,7 @@ "type": "string" }, "mentionText": { - "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", + "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -2217,6 +2217,10 @@ "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImage", "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." }, + "imageQualityScores": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", + "description": "Image Quality Scores." + }, "layout": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", "description": "Layout for the page." @@ -2490,6 +2494,41 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores": { + "description": "Image Quality Scores for the page image", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", + "properties": { + "detectedDefects": { + "description": "A list of detected defects.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect" + }, + "type": "array" + }, + "qualityScore": { + "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect": { + "description": "Image Quality Defects", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect", + "properties": { + "confidence": { + "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "format": "float", + "type": "number" + }, + "type": { + "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta1DocumentPageLayout": { "description": "Visual element describing a layout unit on a page.", "id": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", @@ -3318,7 +3357,7 @@ "type": "string" }, "mentionText": { - "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", + "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -3475,6 +3514,10 @@ "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImage", "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." }, + "imageQualityScores": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", + "description": "Image Quality Scores." + }, "layout": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", "description": "Layout for the page." @@ -3748,6 +3791,41 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores": { + "description": "Image Quality Scores for the page image", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", + "properties": { + "detectedDefects": { + "description": "A list of detected defects.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect" + }, + "type": "array" + }, + "qualityScore": { + "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect": { + "description": "Image Quality Defects", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect", + "properties": { + "confidence": { + "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "format": "float", + "type": "number" + }, + "type": { + "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentPageLayout": { "description": "Visual element describing a layout unit on a page.", "id": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", @@ -4827,7 +4905,7 @@ "type": "string" }, "mentionText": { - "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", + "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -4939,6 +5017,11 @@ "description": "The configuration used when outputting documents.", "id": "GoogleCloudDocumentaiV1beta3DocumentOutputConfigGcsOutputConfig", "properties": { + "fieldMask": { + "description": "Specifies which fields to include in the output documents.", + "format": "google-fieldmask", + "type": "string" + }, "gcsUri": { "description": "The Cloud Storage uri (a directory) of the output.", "type": "string" @@ -4986,6 +5069,10 @@ "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageImage", "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." }, + "imageQualityScores": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores", + "description": "Image Quality Scores." + }, "layout": { "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageLayout", "description": "Layout for the page." @@ -5259,6 +5346,41 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores": { + "description": "Image Quality Scores for the page image", + "id": "GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores", + "properties": { + "detectedDefects": { + "description": "A list of detected defects.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect" + }, + "type": "array" + }, + "qualityScore": { + "description": "The overall quality score. Range [0, 1] where 1 is perfect quality.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect": { + "description": "Image Quality Defects", + "id": "GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect", + "properties": { + "confidence": { + "description": "Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists.", + "format": "float", + "type": "number" + }, + "type": { + "description": "Name of the defect type. Supported values are \"quality/defect_blurry\", \"quality/defect_noisy\", \"quality/defect_dark\", \"quality/defect_faint\", \"quality/defect_text_too_small\", \"quality/defect_document_cutoff\", \"quality/defect_text_cutoff\", \"quality/defect_glare\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3DocumentPageLayout": { "description": "Visual element describing a layout unit on a page.", "id": "GoogleCloudDocumentaiV1beta3DocumentPageLayout", @@ -5966,10 +6088,6 @@ "inactive": { "description": "Whether the entity type should be considered as \"inactive\".", "type": "boolean" - }, - "prefixedNamingOnProperties": { - "description": "If set, the properties of this entity type must be prefixed with the parents.", - "type": "boolean" } }, "type": "object" diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index b9fc5b6baab..22c5b401d10 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -2375,9 +2375,8 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // MentionId: Optional. Deprecated. Use `id` field instead. MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value in the document e.g. `1600 - // Amphitheatre Pkwy`. If the entity is not present in the document, - // this field will be empty. + // MentionText: Optional. Text value of the entity e.g. `1600 + // Amphitheatre Pkwy`. MentionText string `json:"mentionText,omitempty"` // NormalizedValue: Optional. Normalized entity value. Absent if the @@ -2583,6 +2582,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // bounding boxes can be upright and axis-aligned. Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image Quality Scores. + ImageQualityScores *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` @@ -3011,6 +3013,105 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores: Image +// Quality Scores for the page image +type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + + // QualityScore: The overall quality score. Range [0, 1] where 1 is + // perfect quality. + QualityScore float64 `json:"qualityScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedDefects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores + var s1 struct { + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.QualityScore = float64(s1.QualityScore) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefe +// ct: Image Quality Defects +type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // indicates strong confidence of that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + + // Type: Name of the defect type. Supported values are + // "quality/defect_blurry", "quality/defect_noisy", + // "quality/defect_dark", "quality/defect_faint", + // "quality/defect_text_too_small", "quality/defect_document_cutoff", + // "quality/defect_text_cutoff", "quality/defect_glare" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element // describing a layout unit on a page. type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { @@ -4377,9 +4478,8 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // MentionId: Optional. Deprecated. Use `id` field instead. MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value in the document e.g. `1600 - // Amphitheatre Pkwy`. If the entity is not present in the document, - // this field will be empty. + // MentionText: Optional. Text value of the entity e.g. `1600 + // Amphitheatre Pkwy`. MentionText string `json:"mentionText,omitempty"` // NormalizedValue: Optional. Normalized entity value. Absent if the @@ -4640,6 +4740,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // bounding boxes can be upright and axis-aligned. Image *GoogleCloudDocumentaiV1beta2DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image Quality Scores. + ImageQualityScores *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` @@ -5068,6 +5171,105 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageImage) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores: Image +// Quality Scores for the page image +type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + + // QualityScore: The overall quality score. Range [0, 1] where 1 is + // perfect quality. + QualityScore float64 `json:"qualityScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedDefects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores + var s1 struct { + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.QualityScore = float64(s1.QualityScore) + return nil +} + +// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefe +// ct: Image Quality Defects +type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // indicates strong confidence of that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + + // Type: Name of the defect type. Supported values are + // "quality/defect_blurry", "quality/defect_noisy", + // "quality/defect_dark", "quality/defect_faint", + // "quality/defect_text_too_small", "quality/defect_document_cutoff", + // "quality/defect_text_cutoff", "quality/defect_glare" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // GoogleCloudDocumentaiV1beta2DocumentPageLayout: Visual element // describing a layout unit on a page. type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { @@ -6855,9 +7057,8 @@ type GoogleCloudDocumentaiV1beta3DocumentEntity struct { // MentionId: Optional. Deprecated. Use `id` field instead. MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value in the document e.g. `1600 - // Amphitheatre Pkwy`. If the entity is not present in the document, - // this field will be empty. + // MentionText: Optional. Text value of the entity e.g. `1600 + // Amphitheatre Pkwy`. MentionText string `json:"mentionText,omitempty"` // NormalizedValue: Optional. Normalized entity value. Absent if the @@ -7072,10 +7273,13 @@ func (s *GoogleCloudDocumentaiV1beta3DocumentOutputConfig) MarshalJSON() ([]byte // GoogleCloudDocumentaiV1beta3DocumentOutputConfigGcsOutputConfig: The // configuration used when outputting documents. type GoogleCloudDocumentaiV1beta3DocumentOutputConfigGcsOutputConfig struct { + // FieldMask: Specifies which fields to include in the output documents. + FieldMask string `json:"fieldMask,omitempty"` + // GcsUri: The Cloud Storage uri (a directory) of the output. GcsUri string `json:"gcsUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsUri") to + // ForceSendFields is a list of field names (e.g. "FieldMask") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7083,8 +7287,8 @@ type GoogleCloudDocumentaiV1beta3DocumentOutputConfigGcsOutputConfig struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "FieldMask") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7123,6 +7327,9 @@ type GoogleCloudDocumentaiV1beta3DocumentPage struct { // bounding boxes can be upright and axis-aligned. Image *GoogleCloudDocumentaiV1beta3DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image Quality Scores. + ImageQualityScores *GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1beta3DocumentPageLayout `json:"layout,omitempty"` @@ -7551,6 +7758,105 @@ func (s *GoogleCloudDocumentaiV1beta3DocumentPageImage) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores: Image +// Quality Scores for the page image +type GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + + // QualityScore: The overall quality score. Range [0, 1] where 1 is + // perfect quality. + QualityScore float64 `json:"qualityScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedDefects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores + var s1 struct { + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.QualityScore = float64(s1.QualityScore) + return nil +} + +// GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefe +// ct: Image Quality Defects +type GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range [0, 1] where 1 + // indicates strong confidence of that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + + // Type: Name of the defect type. Supported values are + // "quality/defect_blurry", "quality/defect_noisy", + // "quality/defect_dark", "quality/defect_faint", + // "quality/defect_text_too_small", "quality/defect_document_cutoff", + // "quality/defect_text_cutoff", "quality/defect_glare" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Confidence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // GoogleCloudDocumentaiV1beta3DocumentPageLayout: Visual element // describing a layout unit on a page. type GoogleCloudDocumentaiV1beta3DocumentPageLayout struct { @@ -8689,10 +8995,6 @@ type GoogleCloudDocumentaiV1beta3EntityTypeMetadata struct { // Inactive: Whether the entity type should be considered as "inactive". Inactive bool `json:"inactive,omitempty"` - // PrefixedNamingOnProperties: If set, the properties of this entity - // type must be prefixed with the parents. - PrefixedNamingOnProperties bool `json:"prefixedNamingOnProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. // "HumanReviewLabelingMetadata") to unconditionally include in API // requests. By default, fields with empty or default values are omitted diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index e490446bef5..2446e45e19f 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -1197,7 +1197,7 @@ } } }, - "revision": "20220826", + "revision": "20220916", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -1960,7 +1960,7 @@ "DATA_LOSS" ], "enumDescriptions": [ - "Not an error; returned on success HTTP Mapping: 200 OK", + "Not an error; returned on success. HTTP Mapping: 200 OK", "The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request", "Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error", "The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request", diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index 5d0a86ef818..312631d5826 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -1610,7 +1610,7 @@ type StateCondition struct { // Code: The canonical code of the condition. // // Possible values: - // "OK" - Not an error; returned on success HTTP Mapping: 200 OK + // "OK" - Not an error; returned on success. HTTP Mapping: 200 OK // "CANCELLED" - The operation was cancelled, typically by the caller. // HTTP Mapping: 499 Client Closed Request // "UNKNOWN" - Unknown error. For example, this error may be returned diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 5a4fdaf56b0..00c85e6ef5c 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1089,6 +1089,35 @@ "https://www.googleapis.com/auth/datastore" ] }, + "runAggregationQuery": { + "description": "Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side. High-Level Example: ``` -- Return the number of documents in table given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); ```", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runAggregationQuery", + "httpMethod": "POST", + "id": "firestore.projects.databases.documents.runAggregationQuery", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:runAggregationQuery", + "request": { + "$ref": "RunAggregationQueryRequest" + }, + "response": { + "$ref": "RunAggregationQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, "runQuery": { "description": "Runs a query.", "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runQuery", @@ -1353,9 +1382,38 @@ } } }, - "revision": "20220831", + "revision": "20220915", "rootUrl": "https://firestore.googleapis.com/", "schemas": { + "Aggregation": { + "description": "Defines a aggregation that produces a single result.", + "id": "Aggregation", + "properties": { + "alias": { + "description": "Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format `field_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS field_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to document field name limitations.", + "type": "string" + }, + "count": { + "$ref": "Count", + "description": "Count aggregator." + } + }, + "type": "object" + }, + "AggregationResult": { + "description": "The result of a single bucket from a Firestore aggregation query. The keys of `aggregate_fields` are the same for all results in an aggregation query, unlike document queries which can have different fields present for each result.", + "id": "AggregationResult", + "properties": { + "aggregateFields": { + "additionalProperties": { + "$ref": "Value" + }, + "description": "The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.", + "type": "object" + } + }, + "type": "object" + }, "ArrayValue": { "description": "An array value.", "id": "ArrayValue", @@ -1571,6 +1629,18 @@ }, "type": "object" }, + "Count": { + "description": "Count of documents that match the query. The `COUNT(*)` aggregation function operates on the entire document so it does not require a field reference.", + "id": "Count", + "properties": { + "upTo": { + "description": "Optional. Optional constraint on the maximum number of documents to count. This provides a way to set an upper bound on the number of documents to scan, limiting latency and cost. Unspecified is interpreted as no bound. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be greater than zero when present.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Cursor": { "description": "A position in a query result set.", "id": "Cursor", @@ -2913,6 +2983,52 @@ }, "type": "object" }, + "RunAggregationQueryRequest": { + "description": "The request for Firestore.RunAggregationQuery.", + "id": "RunAggregationQueryRequest", + "properties": { + "newTransaction": { + "$ref": "TransactionOptions", + "description": "Starts a new transaction as part of the query, defaulting to read-only. The new transaction ID will be returned as the first response in the stream." + }, + "readTime": { + "description": "Executes the query at the given timestamp. Requires: * Cannot be more than 270 seconds in the past.", + "format": "google-datetime", + "type": "string" + }, + "structuredAggregationQuery": { + "$ref": "StructuredAggregationQuery", + "description": "An aggregation query." + }, + "transaction": { + "description": "Run the aggregation within an already active transaction. The value here is the opaque transaction ID to execute the query in.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "RunAggregationQueryResponse": { + "description": "The response for Firestore.RunAggregationQuery.", + "id": "RunAggregationQueryResponse", + "properties": { + "readTime": { + "description": "The time at which the aggregate value is valid for.", + "format": "google-datetime", + "type": "string" + }, + "result": { + "$ref": "AggregationResult", + "description": "A single aggregation result. Not present when reporting partial progress." + }, + "transaction": { + "description": "The transaction that was started as part of this request. Only present on the first response when the request requested to start a new transaction.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, "RunQueryRequest": { "description": "The request for Firestore.RunQuery.", "id": "RunQueryRequest", @@ -2995,6 +3111,24 @@ }, "type": "object" }, + "StructuredAggregationQuery": { + "description": "Firestore query for running an aggregation over a StructuredQuery.", + "id": "StructuredAggregationQuery", + "properties": { + "aggregations": { + "description": "Optional. Series of aggregations to apply over the results of the `structured_query`. Requires: * A minimum of one and maximum of five aggregations per query.", + "items": { + "$ref": "Aggregation" + }, + "type": "array" + }, + "structuredQuery": { + "$ref": "StructuredQuery", + "description": "Nested structured query." + } + }, + "type": "object" + }, "StructuredQuery": { "description": "A Firestore query.", "id": "StructuredQuery", diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index da9796c0f70..b87fcc293dc 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -240,6 +240,80 @@ type ProjectsLocationsService struct { s *Service } +// Aggregation: Defines a aggregation that produces a single result. +type Aggregation struct { + // Alias: Optional. Optional name of the field to store the result of + // the aggregation into. If not provided, Firestore will pick a default + // name following the format `field_`. For example: ``` AGGREGATE + // COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS + // count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` + // AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, + // COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS field_2 OVER ( ... + // ); ``` Requires: * Must be unique across all aggregation aliases. * + // Conform to document field name limitations. + Alias string `json:"alias,omitempty"` + + // Count: Count aggregator. + Count *Count `json:"count,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alias") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alias") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Aggregation) MarshalJSON() ([]byte, error) { + type NoMethod Aggregation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResult: The result of a single bucket from a Firestore +// aggregation query. The keys of `aggregate_fields` are the same for +// all results in an aggregation query, unlike document queries which +// can have different fields present for each result. +type AggregationResult struct { + // AggregateFields: The result of the aggregation functions, ex: + // `COUNT(*) AS total_docs`. The key is the alias assigned to the + // aggregation function on input and the size of this map equals the + // number of aggregation functions in the query. + AggregateFields map[string]Value `json:"aggregateFields,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregateFields") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregateFields") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AggregationResult) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ArrayValue: An array value. type ArrayValue struct { // Values: Values in the array. @@ -644,6 +718,41 @@ func (s *CompositeFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Count: Count of documents that match the query. The `COUNT(*)` +// aggregation function operates on the entire document so it does not +// require a field reference. +type Count struct { + // UpTo: Optional. Optional constraint on the maximum number of + // documents to count. This provides a way to set an upper bound on the + // number of documents to scan, limiting latency and cost. Unspecified + // is interpreted as no bound. High-Level Example: ``` AGGREGATE + // COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be + // greater than zero when present. + UpTo int64 `json:"upTo,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "UpTo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UpTo") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Count) MarshalJSON() ([]byte, error) { + type NoMethod Count + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Cursor: A position in a query result set. type Cursor struct { // Before: If the position is just before or just after the given @@ -3016,6 +3125,92 @@ func (s *RollbackRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RunAggregationQueryRequest: The request for +// Firestore.RunAggregationQuery. +type RunAggregationQueryRequest struct { + // NewTransaction: Starts a new transaction as part of the query, + // defaulting to read-only. The new transaction ID will be returned as + // the first response in the stream. + NewTransaction *TransactionOptions `json:"newTransaction,omitempty"` + + // ReadTime: Executes the query at the given timestamp. Requires: * + // Cannot be more than 270 seconds in the past. + ReadTime string `json:"readTime,omitempty"` + + // StructuredAggregationQuery: An aggregation query. + StructuredAggregationQuery *StructuredAggregationQuery `json:"structuredAggregationQuery,omitempty"` + + // Transaction: Run the aggregation within an already active + // transaction. The value here is the opaque transaction ID to execute + // the query in. + Transaction string `json:"transaction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NewTransaction") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NewTransaction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RunAggregationQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod RunAggregationQueryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunAggregationQueryResponse: The response for +// Firestore.RunAggregationQuery. +type RunAggregationQueryResponse struct { + // ReadTime: The time at which the aggregate value is valid for. + ReadTime string `json:"readTime,omitempty"` + + // Result: A single aggregation result. Not present when reporting + // partial progress. + Result *AggregationResult `json:"result,omitempty"` + + // Transaction: The transaction that was started as part of this + // request. Only present on the first response when the request + // requested to start a new transaction. + Transaction string `json:"transaction,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ReadTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ReadTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod RunAggregationQueryResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RunQueryRequest: The request for Firestore.RunQuery. type RunQueryRequest struct { // NewTransaction: Starts a new transaction and reads the documents. @@ -3156,6 +3351,40 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StructuredAggregationQuery: Firestore query for running an +// aggregation over a StructuredQuery. +type StructuredAggregationQuery struct { + // Aggregations: Optional. Series of aggregations to apply over the + // results of the `structured_query`. Requires: * A minimum of one and + // maximum of five aggregations per query. + Aggregations []*Aggregation `json:"aggregations,omitempty"` + + // StructuredQuery: Nested structured query. + StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Aggregations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Aggregations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StructuredAggregationQuery) MarshalJSON() ([]byte, error) { + type NoMethod StructuredAggregationQuery + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StructuredQuery: A Firestore query. type StructuredQuery struct { // EndAt: A potential prefix of a position in the result set to end the @@ -8330,6 +8559,160 @@ func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption } +// method id "firestore.projects.databases.documents.runAggregationQuery": + +type ProjectsDatabasesDocumentsRunAggregationQueryCall struct { + s *Service + parent string + runaggregationqueryrequest *RunAggregationQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RunAggregationQuery: Runs an aggregation query. Rather than producing +// Document results like Firestore.RunQuery, this API allows running an +// aggregation to produce a series of AggregationResult server-side. +// High-Level Example: ``` -- Return the number of documents in table +// given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true +// ); ``` +// +// - parent: The parent resource name. In the format: +// `projects/{project_id}/databases/{database_id}/documents` or +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. For example: +// `projects/my-project/databases/my-database/documents` or +// `projects/my-project/databases/my-database/documents/chatrooms/my-ch +// atroom`. +func (r *ProjectsDatabasesDocumentsService) RunAggregationQuery(parent string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsDatabasesDocumentsRunAggregationQueryCall { + c := &ProjectsDatabasesDocumentsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.runaggregationqueryrequest = runaggregationqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunAggregationQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunAggregationQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.runaggregationqueryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:runAggregationQuery") + 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 "firestore.projects.databases.documents.runAggregationQuery" call. +// Exactly one of *RunAggregationQueryResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *RunAggregationQueryResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RunAggregationQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side. High-Level Example: ``` -- Return the number of documents in table given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); ```", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runAggregationQuery", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.runAggregationQuery", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:runAggregationQuery", + // "request": { + // "$ref": "RunAggregationQueryRequest" + // }, + // "response": { + // "$ref": "RunAggregationQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + // method id "firestore.projects.databases.documents.runQuery": type ProjectsDatabasesDocumentsRunQueryCall struct { diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index 7e71b82d161..e190623e967 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -730,6 +730,35 @@ "https://www.googleapis.com/auth/datastore" ] }, + "runAggregationQuery": { + "description": "Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side. High-Level Example: ``` -- Return the number of documents in table given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); ```", + "flatPath": "v1beta1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runAggregationQuery", + "httpMethod": "POST", + "id": "firestore.projects.databases.documents.runAggregationQuery", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}:runAggregationQuery", + "request": { + "$ref": "RunAggregationQueryRequest" + }, + "response": { + "$ref": "RunAggregationQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, "runQuery": { "description": "Runs a query.", "flatPath": "v1beta1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runQuery", @@ -921,9 +950,38 @@ } } }, - "revision": "20220831", + "revision": "20220915", "rootUrl": "https://firestore.googleapis.com/", "schemas": { + "Aggregation": { + "description": "Defines a aggregation that produces a single result.", + "id": "Aggregation", + "properties": { + "alias": { + "description": "Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format `field_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS field_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to document field name limitations.", + "type": "string" + }, + "count": { + "$ref": "Count", + "description": "Count aggregator." + } + }, + "type": "object" + }, + "AggregationResult": { + "description": "The result of a single bucket from a Firestore aggregation query. The keys of `aggregate_fields` are the same for all results in an aggregation query, unlike document queries which can have different fields present for each result.", + "id": "AggregationResult", + "properties": { + "aggregateFields": { + "additionalProperties": { + "$ref": "Value" + }, + "description": "The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.", + "type": "object" + } + }, + "type": "object" + }, "ArrayValue": { "description": "An array value.", "id": "ArrayValue", @@ -1139,6 +1197,18 @@ }, "type": "object" }, + "Count": { + "description": "Count of documents that match the query. The `COUNT(*)` aggregation function operates on the entire document so it does not require a field reference.", + "id": "Count", + "properties": { + "upTo": { + "description": "Optional. Optional constraint on the maximum number of documents to count. This provides a way to set an upper bound on the number of documents to scan, limiting latency and cost. Unspecified is interpreted as no bound. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be greater than zero when present.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Cursor": { "description": "A position in a query result set.", "id": "Cursor", @@ -2094,6 +2164,52 @@ }, "type": "object" }, + "RunAggregationQueryRequest": { + "description": "The request for Firestore.RunAggregationQuery.", + "id": "RunAggregationQueryRequest", + "properties": { + "newTransaction": { + "$ref": "TransactionOptions", + "description": "Starts a new transaction as part of the query, defaulting to read-only. The new transaction ID will be returned as the first response in the stream." + }, + "readTime": { + "description": "Executes the query at the given timestamp. Requires: * Cannot be more than 270 seconds in the past.", + "format": "google-datetime", + "type": "string" + }, + "structuredAggregationQuery": { + "$ref": "StructuredAggregationQuery", + "description": "An aggregation query." + }, + "transaction": { + "description": "Run the aggregation within an already active transaction. The value here is the opaque transaction ID to execute the query in.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "RunAggregationQueryResponse": { + "description": "The response for Firestore.RunAggregationQuery.", + "id": "RunAggregationQueryResponse", + "properties": { + "readTime": { + "description": "The time at which the aggregate value is valid for.", + "format": "google-datetime", + "type": "string" + }, + "result": { + "$ref": "AggregationResult", + "description": "A single aggregation result. Not present when reporting partial progress." + }, + "transaction": { + "description": "The transaction that was started as part of this request. Only present on the first response when the request requested to start a new transaction.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, "RunQueryRequest": { "description": "The request for Firestore.RunQuery.", "id": "RunQueryRequest", @@ -2176,6 +2292,24 @@ }, "type": "object" }, + "StructuredAggregationQuery": { + "description": "Firestore query for running an aggregation over a StructuredQuery.", + "id": "StructuredAggregationQuery", + "properties": { + "aggregations": { + "description": "Optional. Series of aggregations to apply over the results of the `structured_query`. Requires: * A minimum of one and maximum of five aggregations per query.", + "items": { + "$ref": "Aggregation" + }, + "type": "array" + }, + "structuredQuery": { + "$ref": "StructuredQuery", + "description": "Nested structured query." + } + }, + "type": "object" + }, "StructuredQuery": { "description": "A Firestore query.", "id": "StructuredQuery", diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 5761c666907..32c2fa40e27 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -192,6 +192,80 @@ type ProjectsDatabasesIndexesService struct { s *Service } +// Aggregation: Defines a aggregation that produces a single result. +type Aggregation struct { + // Alias: Optional. Optional name of the field to store the result of + // the aggregation into. If not provided, Firestore will pick a default + // name following the format `field_`. For example: ``` AGGREGATE + // COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS + // count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` + // AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, + // COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS field_2 OVER ( ... + // ); ``` Requires: * Must be unique across all aggregation aliases. * + // Conform to document field name limitations. + Alias string `json:"alias,omitempty"` + + // Count: Count aggregator. + Count *Count `json:"count,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alias") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alias") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Aggregation) MarshalJSON() ([]byte, error) { + type NoMethod Aggregation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResult: The result of a single bucket from a Firestore +// aggregation query. The keys of `aggregate_fields` are the same for +// all results in an aggregation query, unlike document queries which +// can have different fields present for each result. +type AggregationResult struct { + // AggregateFields: The result of the aggregation functions, ex: + // `COUNT(*) AS total_docs`. The key is the alias assigned to the + // aggregation function on input and the size of this map equals the + // number of aggregation functions in the query. + AggregateFields map[string]Value `json:"aggregateFields,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregateFields") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregateFields") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AggregationResult) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ArrayValue: An array value. type ArrayValue struct { // Values: Values in the array. @@ -596,6 +670,41 @@ func (s *CompositeFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Count: Count of documents that match the query. The `COUNT(*)` +// aggregation function operates on the entire document so it does not +// require a field reference. +type Count struct { + // UpTo: Optional. Optional constraint on the maximum number of + // documents to count. This provides a way to set an upper bound on the + // number of documents to scan, limiting latency and cost. Unspecified + // is interpreted as no bound. High-Level Example: ``` AGGREGATE + // COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be + // greater than zero when present. + UpTo int64 `json:"upTo,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "UpTo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UpTo") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Count) MarshalJSON() ([]byte, error) { + type NoMethod Count + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Cursor: A position in a query result set. type Cursor struct { // Before: If the position is just before or just after the given @@ -2325,6 +2434,92 @@ func (s *RollbackRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RunAggregationQueryRequest: The request for +// Firestore.RunAggregationQuery. +type RunAggregationQueryRequest struct { + // NewTransaction: Starts a new transaction as part of the query, + // defaulting to read-only. The new transaction ID will be returned as + // the first response in the stream. + NewTransaction *TransactionOptions `json:"newTransaction,omitempty"` + + // ReadTime: Executes the query at the given timestamp. Requires: * + // Cannot be more than 270 seconds in the past. + ReadTime string `json:"readTime,omitempty"` + + // StructuredAggregationQuery: An aggregation query. + StructuredAggregationQuery *StructuredAggregationQuery `json:"structuredAggregationQuery,omitempty"` + + // Transaction: Run the aggregation within an already active + // transaction. The value here is the opaque transaction ID to execute + // the query in. + Transaction string `json:"transaction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NewTransaction") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NewTransaction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RunAggregationQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod RunAggregationQueryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunAggregationQueryResponse: The response for +// Firestore.RunAggregationQuery. +type RunAggregationQueryResponse struct { + // ReadTime: The time at which the aggregate value is valid for. + ReadTime string `json:"readTime,omitempty"` + + // Result: A single aggregation result. Not present when reporting + // partial progress. + Result *AggregationResult `json:"result,omitempty"` + + // Transaction: The transaction that was started as part of this + // request. Only present on the first response when the request + // requested to start a new transaction. + Transaction string `json:"transaction,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ReadTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ReadTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod RunAggregationQueryResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RunQueryRequest: The request for Firestore.RunQuery. type RunQueryRequest struct { // NewTransaction: Starts a new transaction and reads the documents. @@ -2465,6 +2660,40 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StructuredAggregationQuery: Firestore query for running an +// aggregation over a StructuredQuery. +type StructuredAggregationQuery struct { + // Aggregations: Optional. Series of aggregations to apply over the + // results of the `structured_query`. Requires: * A minimum of one and + // maximum of five aggregations per query. + Aggregations []*Aggregation `json:"aggregations,omitempty"` + + // StructuredQuery: Nested structured query. + StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Aggregations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Aggregations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StructuredAggregationQuery) MarshalJSON() ([]byte, error) { + type NoMethod StructuredAggregationQuery + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StructuredQuery: A Firestore query. type StructuredQuery struct { // EndAt: A potential prefix of a position in the result set to end the @@ -5827,6 +6056,160 @@ func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption } +// method id "firestore.projects.databases.documents.runAggregationQuery": + +type ProjectsDatabasesDocumentsRunAggregationQueryCall struct { + s *Service + parent string + runaggregationqueryrequest *RunAggregationQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RunAggregationQuery: Runs an aggregation query. Rather than producing +// Document results like Firestore.RunQuery, this API allows running an +// aggregation to produce a series of AggregationResult server-side. +// High-Level Example: ``` -- Return the number of documents in table +// given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true +// ); ``` +// +// - parent: The parent resource name. In the format: +// `projects/{project_id}/databases/{database_id}/documents` or +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. For example: +// `projects/my-project/databases/my-database/documents` or +// `projects/my-project/databases/my-database/documents/chatrooms/my-ch +// atroom`. +func (r *ProjectsDatabasesDocumentsService) RunAggregationQuery(parent string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsDatabasesDocumentsRunAggregationQueryCall { + c := &ProjectsDatabasesDocumentsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.runaggregationqueryrequest = runaggregationqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunAggregationQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunAggregationQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.runaggregationqueryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:runAggregationQuery") + 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 "firestore.projects.databases.documents.runAggregationQuery" call. +// Exactly one of *RunAggregationQueryResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *RunAggregationQueryResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RunAggregationQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side. High-Level Example: ``` -- Return the number of documents in table given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); ```", + // "flatPath": "v1beta1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runAggregationQuery", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.runAggregationQuery", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}:runAggregationQuery", + // "request": { + // "$ref": "RunAggregationQueryRequest" + // }, + // "response": { + // "$ref": "RunAggregationQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + // method id "firestore.projects.databases.documents.runQuery": type ProjectsDatabasesDocumentsRunQueryCall struct { diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index d6f66f176cf..f398e7588f6 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -4053,7 +4053,7 @@ } } }, - "revision": "20220818", + "revision": "20220912", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -4267,7 +4267,7 @@ "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. * `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`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "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`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", "items": { "type": "string" }, @@ -4555,6 +4555,10 @@ "description": "An AES 128/192/256 bit key. Causes the hash to be computed based on this key. A default key is generated for each Deidentify operation and is used when neither `crypto_key` nor `kms_wrapped` is specified. Must not be set if `kms_wrapped` is set.", "format": "byte", "type": "string" + }, + "kmsWrapped": { + "$ref": "KmsWrappedCryptoKey", + "description": "KMS wrapped key. Must not be set if `crypto_key` is set." } }, "type": "object" @@ -4582,6 +4586,25 @@ "description": "An AES 128/192/256 bit key. Causes the shift to be computed based on this key and the patient ID. A default key is generated for each de-identification operation and is used when neither `crypto_key` nor `kms_wrapped` is specified. Must not be set if `kms_wrapped` is set.", "format": "byte", "type": "string" + }, + "kmsWrapped": { + "$ref": "KmsWrappedCryptoKey", + "description": "KMS wrapped key. Must not be set if `crypto_key` is set." + } + }, + "type": "object" + }, + "DeidentifiedStoreDestination": { + "description": "Contains configuration for streaming de-identified FHIR export.", + "id": "DeidentifiedStoreDestination", + "properties": { + "config": { + "$ref": "DeidentifyConfig", + "description": "The configuration to use when de-identifying resources that are added to this store." + }, + "store": { + "description": "The full resource name of a Cloud Healthcare FHIR store, for example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", + "type": "string" } }, "type": "object" @@ -4670,6 +4693,10 @@ "resourceFilter": { "$ref": "FhirFilter", "description": "A filter specifying the resources to include in the output. If not specified, all resources are included in the output." + }, + "skipModifiedResources": { + "description": "If true, skips resources that are created or modified after the de-identify operation is created.", + "type": "boolean" } }, "type": "object" @@ -5701,6 +5728,22 @@ }, "type": "object" }, + "KmsWrappedCryptoKey": { + "description": "Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. The key must grant the Cloud IAM permission `cloudkms.cryptoKeyVersions.useToDecrypt` to the project's Cloud Healthcare Service Agent service account. For more information, see [Creating a wrapped key] (https://cloud.google.com/dlp/docs/create-wrapped-key).", + "id": "KmsWrappedCryptoKey", + "properties": { + "cryptoKey": { + "description": "Required. The resource name of the KMS CryptoKey to use for unwrapping. For example, `projects/{project_id}/locations/{location_id}/keyRings/{keyring}/cryptoKeys/{key}`.", + "type": "string" + }, + "wrappedKey": { + "description": "Required. The wrapped data crypto key.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, "LinkedEntity": { "description": "EntityMentions can be linked to multiple entities using a LinkedEntity message lets us add other fields, e.g. confidence.", "id": "LinkedEntity", @@ -6594,6 +6637,10 @@ "$ref": "GoogleCloudHealthcareV1FhirBigQueryDestination", "description": "The destination BigQuery structure that contains both the dataset location and corresponding schema config. The output is organized in one table per resource type. The server reuses the existing tables (if any) that are named after the resource types. For example, \"Patient\", \"Observation\". When there is no existing table for a given resource type, the server attempts to create one. When a table schema doesn't align with the schema config, either because of existing incompatible schema or out of band incompatible modification, the server does not stream in new data. BigQuery imposes a 1 MB limit on streaming insert row size, therefore any resource mutation that generates more than 1 MB of BigQuery data is not streamed. One resolution in this case is to delete the incompatible table and let the server recreate one, though the newly created table only contains data after the table recreation. Results are written to BigQuery tables according to the parameters in BigQueryDestination.WriteDisposition. Different versions of the same resource are distinguishable by the meta.versionId and meta.lastUpdated columns. The operation (CREATE/UPDATE/DELETE) that results in the new version is recorded in the meta.tag. The tables contain all historical resource versions since streaming was enabled. For query convenience, the server also creates one view per table of the same name containing only the current resource version. The streamed data in the BigQuery dataset is not guaranteed to be completely unique. The combination of the id and meta.versionId columns should ideally identify a single unique row. But in rare cases, duplicates may exist. At query time, users may use the SQL select statement to keep only one of the duplicate rows given an id and meta.versionId pair. Alternatively, the server created view mentioned above also filters out duplicates. If a resource mutation cannot be streamed to BigQuery, errors are logged to Cloud Logging. For more information, see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging))." }, + "deidentifiedStoreDestination": { + "$ref": "DeidentifiedStoreDestination", + "description": "The destination FHIR store for de-identified resources. After this field is added, all subsequent creates/updates/patches to the source store will be de-identified using the provided configuration and applied to the destination store. Importing resources to the source store will not trigger the streaming. If the source store already contains resources when this option is enabled, those resources will not be copied to the destination store unless they are subsequently updated. This may result in invalid references in the destination store. Before adding this config, you must grant the healthcare.fhirResources.update permission on the destination store to your project's **Cloud Healthcare Service Agent** [service account](https://cloud.google.com/healthcare/docs/how-tos/permissions-healthcare-api-gcp-products#the_cloud_healthcare_service_agent). The destination store must set enable_update_create to true. The destination store must have disable_referential_integrity set to true. If a resource cannot be de-identified, errors will be logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging))." + }, "resourceTypes": { "description": "Supply a FHIR resource type (such as \"Patient\" or \"Observation\"). See https://www.hl7.org/fhir/valueset-resource-types.html for a list of all FHIR resource types. The server treats an empty list as an intent to stream all the supported resource types in this FHIR store.", "items": { diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index ed3ddf73d0c..0a647870469 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -740,11 +740,12 @@ type Binding struct { // `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. * - // `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, + // 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 @@ -1263,6 +1264,9 @@ type CryptoHashConfig struct { // specified. Must not be set if `kms_wrapped` is set. CryptoKey string `json:"cryptoKey,omitempty"` + // KmsWrapped: KMS wrapped key. Must not be set if `crypto_key` is set. + KmsWrapped *KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"` + // ForceSendFields is a list of field names (e.g. "CryptoKey") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1339,6 +1343,9 @@ type DateShiftConfig struct { // if `kms_wrapped` is set. CryptoKey string `json:"cryptoKey,omitempty"` + // KmsWrapped: KMS wrapped key. Must not be set if `crypto_key` is set. + KmsWrapped *KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"` + // ForceSendFields is a list of field names (e.g. "CryptoKey") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1362,6 +1369,42 @@ func (s *DateShiftConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeidentifiedStoreDestination: Contains configuration for streaming +// de-identified FHIR export. +type DeidentifiedStoreDestination struct { + // Config: The configuration to use when de-identifying resources that + // are added to this store. + Config *DeidentifyConfig `json:"config,omitempty"` + + // Store: The full resource name of a Cloud Healthcare FHIR store, for + // example, + // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/f + // hirStores/{fhir_store_id}`. + Store string `json:"store,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Config") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeidentifiedStoreDestination) MarshalJSON() ([]byte, error) { + type NoMethod DeidentifiedStoreDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeidentifyConfig: Configures de-id options specific to different // types of content. Each submessage customizes the handling of an // https://tools.ietf.org/html/rfc6838 media type or subtype. Configs @@ -1534,6 +1577,10 @@ type DeidentifyFhirStoreRequest struct { // output. If not specified, all resources are included in the output. ResourceFilter *FhirFilter `json:"resourceFilter,omitempty"` + // SkipModifiedResources: If true, skips resources that are created or + // modified after the de-identify operation is created. + SkipModifiedResources bool `json:"skipModifiedResources,omitempty"` + // ForceSendFields is a list of field names (e.g. "Config") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3680,6 +3727,46 @@ func (s *IngestMessageResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// KmsWrappedCryptoKey: Include to use an existing data crypto key +// wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. +// The key must grant the Cloud IAM permission +// `cloudkms.cryptoKeyVersions.useToDecrypt` to the project's Cloud +// Healthcare Service Agent service account. For more information, see +// [Creating a wrapped key] +// (https://cloud.google.com/dlp/docs/create-wrapped-key). +type KmsWrappedCryptoKey struct { + // CryptoKey: Required. The resource name of the KMS CryptoKey to use + // for unwrapping. For example, + // `projects/{project_id}/locations/{location_id}/keyRings/{keyring}/cryp + // toKeys/{key}`. + CryptoKey string `json:"cryptoKey,omitempty"` + + // WrappedKey: Required. The wrapped data crypto key. + WrappedKey string `json:"wrappedKey,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CryptoKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CryptoKey") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { + type NoMethod KmsWrappedCryptoKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LinkedEntity: EntityMentions can be linked to multiple entities using // a LinkedEntity message lets us add other fields, e.g. confidence. type LinkedEntity struct { @@ -5439,6 +5526,26 @@ type StreamConfig struct { // (https://cloud.google.com/healthcare/docs/how-tos/logging)). BigqueryDestination *GoogleCloudHealthcareV1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"` + // DeidentifiedStoreDestination: The destination FHIR store for + // de-identified resources. After this field is added, all subsequent + // creates/updates/patches to the source store will be de-identified + // using the provided configuration and applied to the destination + // store. Importing resources to the source store will not trigger the + // streaming. If the source store already contains resources when this + // option is enabled, those resources will not be copied to the + // destination store unless they are subsequently updated. This may + // result in invalid references in the destination store. Before adding + // this config, you must grant the healthcare.fhirResources.update + // permission on the destination store to your project's **Cloud + // Healthcare Service Agent** service account + // (https://cloud.google.com/healthcare/docs/how-tos/permissions-healthcare-api-gcp-products#the_cloud_healthcare_service_agent). + // The destination store must set enable_update_create to true. The + // destination store must have disable_referential_integrity set to + // true. If a resource cannot be de-identified, errors will be logged to + // Cloud Logging (see Viewing error logs in Cloud Logging + // (https://cloud.google.com/healthcare/docs/how-tos/logging)). + DeidentifiedStoreDestination *DeidentifiedStoreDestination `json:"deidentifiedStoreDestination,omitempty"` + // ResourceTypes: Supply a FHIR resource type (such as "Patient" or // "Observation"). See // https://www.hl7.org/fhir/valueset-resource-types.html for a list of diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index e914b336ec8..7f8c202569d 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4865,7 +4865,7 @@ } } }, - "revision": "20220818", + "revision": "20220912", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -5171,7 +5171,7 @@ "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. * `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`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "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`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", "items": { "type": "string" }, diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 95ce18495bb..4bbca4cedda 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -969,11 +969,12 @@ type Binding struct { // `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. * - // `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, + // 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 diff --git a/identitytoolkit/v2/identitytoolkit-api.json b/identitytoolkit/v2/identitytoolkit-api.json index b37e7de4c02..6e36cf9b836 100644 --- a/identitytoolkit/v2/identitytoolkit-api.json +++ b/identitytoolkit/v2/identitytoolkit-api.json @@ -1559,9 +1559,37 @@ } } }, - "revision": "20220910", + "revision": "20220916", "rootUrl": "https://identitytoolkit.googleapis.com/", "schemas": { + "GoogleCloudIdentitytoolkitAdminV2AllowByDefault": { + "description": "Defines a policy of allowing every region by default and adding disallowed regions to a disallow list.", + "id": "GoogleCloudIdentitytoolkitAdminV2AllowByDefault", + "properties": { + "disallowedRegions": { + "description": "Two letter unicode region codes to disallow as defined by https://cldr.unicode.org/ The full list of these region codes is here: https://github.com/unicode-cldr/cldr-localenames-full/blob/master/main/en/territories.json", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudIdentitytoolkitAdminV2AllowlistOnly": { + "description": "Defines a policy of only allowing regions by explicitly adding them to an allowlist.", + "id": "GoogleCloudIdentitytoolkitAdminV2AllowlistOnly", + "properties": { + "allowedRegions": { + "description": "Two letter unicode region codes to allow as defined by https://cldr.unicode.org/ The full list of these region codes is here: https://github.com/unicode-cldr/cldr-localenames-full/blob/master/main/en/territories.json", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudIdentitytoolkitAdminV2Anonymous": { "description": "Configuration options related to authenticating an anonymous user.", "id": "GoogleCloudIdentitytoolkitAdminV2Anonymous", @@ -1726,6 +1754,10 @@ "$ref": "GoogleCloudIdentitytoolkitAdminV2SignInConfig", "description": "Configuration related to local sign in methods." }, + "smsRegionConfig": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig", + "description": "Configures which regions are enabled for SMS verification code sending." + }, "subtype": { "description": "Output only. The subtype of this config.", "enum": [ @@ -2444,6 +2476,21 @@ }, "type": "object" }, + "GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig": { + "description": "Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number.", + "id": "GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig", + "properties": { + "allowByDefault": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2AllowByDefault", + "description": "A policy of allowing SMS to every region by default and adding disallowed regions to a disallow list." + }, + "allowlistOnly": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2AllowlistOnly", + "description": "A policy of only allowing regions by explicitly adding them to an allowlist." + } + }, + "type": "object" + }, "GoogleCloudIdentitytoolkitAdminV2SmsTemplate": { "description": "The template to use when sending an SMS.", "id": "GoogleCloudIdentitytoolkitAdminV2SmsTemplate", @@ -2613,6 +2660,10 @@ "readOnly": true, "type": "string" }, + "smsRegionConfig": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig", + "description": "Configures which regions are enabled for SMS verification code sending." + }, "testPhoneNumbers": { "additionalProperties": { "type": "string" diff --git a/identitytoolkit/v2/identitytoolkit-gen.go b/identitytoolkit/v2/identitytoolkit-gen.go index b0760c7a85f..d6599249485 100644 --- a/identitytoolkit/v2/identitytoolkit-gen.go +++ b/identitytoolkit/v2/identitytoolkit-gen.go @@ -298,6 +298,73 @@ type ProjectsTenantsOauthIdpConfigsService struct { s *Service } +// GoogleCloudIdentitytoolkitAdminV2AllowByDefault: Defines a policy of +// allowing every region by default and adding disallowed regions to a +// disallow list. +type GoogleCloudIdentitytoolkitAdminV2AllowByDefault struct { + // DisallowedRegions: Two letter unicode region codes to disallow as + // defined by https://cldr.unicode.org/ The full list of these region + // codes is here: + // https://github.com/unicode-cldr/cldr-localenames-full/blob/master/main/en/territories.json + DisallowedRegions []string `json:"disallowedRegions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisallowedRegions") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisallowedRegions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2AllowByDefault) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2AllowByDefault + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudIdentitytoolkitAdminV2AllowlistOnly: Defines a policy of +// only allowing regions by explicitly adding them to an allowlist. +type GoogleCloudIdentitytoolkitAdminV2AllowlistOnly struct { + // AllowedRegions: Two letter unicode region codes to allow as defined + // by https://cldr.unicode.org/ The full list of these region codes is + // here: + // https://github.com/unicode-cldr/cldr-localenames-full/blob/master/main/en/territories.json + AllowedRegions []string `json:"allowedRegions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedRegions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedRegions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2AllowlistOnly) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2AllowlistOnly + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudIdentitytoolkitAdminV2Anonymous: Configuration options // related to authenticating an anonymous user. type GoogleCloudIdentitytoolkitAdminV2Anonymous struct { @@ -576,6 +643,10 @@ type GoogleCloudIdentitytoolkitAdminV2Config struct { // SignIn: Configuration related to local sign in methods. SignIn *GoogleCloudIdentitytoolkitAdminV2SignInConfig `json:"signIn,omitempty"` + // SmsRegionConfig: Configures which regions are enabled for SMS + // verification code sending. + SmsRegionConfig *GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig `json:"smsRegionConfig,omitempty"` + // Subtype: Output only. The subtype of this config. // // Possible values: @@ -1815,6 +1886,43 @@ func (s *GoogleCloudIdentitytoolkitAdminV2SignInConfig) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig: Configures the +// regions where users are allowed to send verification SMS for the +// project or tenant. This is based on the calling code of the +// destination phone number. +type GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig struct { + // AllowByDefault: A policy of allowing SMS to every region by default + // and adding disallowed regions to a disallow list. + AllowByDefault *GoogleCloudIdentitytoolkitAdminV2AllowByDefault `json:"allowByDefault,omitempty"` + + // AllowlistOnly: A policy of only allowing regions by explicitly adding + // them to an allowlist. + AllowlistOnly *GoogleCloudIdentitytoolkitAdminV2AllowlistOnly `json:"allowlistOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowByDefault") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowByDefault") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudIdentitytoolkitAdminV2SmsTemplate: The template to use // when sending an SMS. type GoogleCloudIdentitytoolkitAdminV2SmsTemplate struct { @@ -2054,6 +2162,10 @@ type GoogleCloudIdentitytoolkitAdminV2Tenant struct { // "projects/{project-id}/tenants/{tenant-id}" Name string `json:"name,omitempty"` + // SmsRegionConfig: Configures which regions are enabled for SMS + // verification code sending. + SmsRegionConfig *GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig `json:"smsRegionConfig,omitempty"` + // TestPhoneNumbers: A map of pairs that can be used for MFA. The phone // number should be in E.164 format // (https://www.itu.int/rec/T-REC-E.164/) and a maximum of 10 pairs can diff --git a/language/v1/language-api.json b/language/v1/language-api.json index 84d698ee94d..257eb8025ab 100644 --- a/language/v1/language-api.json +++ b/language/v1/language-api.json @@ -227,7 +227,7 @@ } } }, - "revision": "20210807", + "revision": "20220916", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -511,10 +511,29 @@ }, "type": "object" }, + "ClassificationModelOptions": { + "description": "Model options available for classification requests.", + "id": "ClassificationModelOptions", + "properties": { + "v1Model": { + "$ref": "V1Model", + "description": "Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future." + }, + "v2Model": { + "$ref": "V2Model", + "description": "Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model." + } + }, + "type": "object" + }, "ClassifyTextRequest": { "description": "The document classification request message.", "id": "ClassifyTextRequest", "properties": { + "classificationModelOptions": { + "$ref": "ClassificationModelOptions", + "description": "Model options to use for classification. Defaults to v1 options if not specified." + }, "document": { "$ref": "Document", "description": "Required. Input document." @@ -856,6 +875,10 @@ "description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input.", "id": "Features", "properties": { + "classificationModelOptions": { + "$ref": "ClassificationModelOptions", + "description": "The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true." + }, "classifyText": { "description": "Classify the full document into categories.", "type": "boolean" @@ -1243,6 +1266,33 @@ } }, "type": "object" + }, + "V1Model": { + "description": "Options for the V1 model.", + "id": "V1Model", + "properties": {}, + "type": "object" + }, + "V2Model": { + "description": "Options for the V2 model.", + "id": "V2Model", + "properties": { + "contentCategoriesVersion": { + "description": "The content categories used for classification.", + "enum": [ + "CONTENT_CATEGORIES_VERSION_UNSPECIFIED", + "V1", + "V2" + ], + "enumDescriptions": [ + "If `ContentCategoriesVersion` is not specified, this option will default to `V1`.", + "Legacy content categories of our initial launch in 2017.", + "Updated content categories in 2022." + ], + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/language/v1/language-gen.go b/language/v1/language-gen.go index 4727bca18e3..ffde86cae72 100644 --- a/language/v1/language-gen.go +++ b/language/v1/language-gen.go @@ -653,12 +653,20 @@ func (s *ClassificationCategory) UnmarshalJSON(data []byte) error { return nil } -// ClassifyTextRequest: The document classification request message. -type ClassifyTextRequest struct { - // Document: Required. Input document. - Document *Document `json:"document,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Document") to +// ClassificationModelOptions: Model options available for +// classification requests. +type ClassificationModelOptions struct { + // V1Model: Setting this field will use the V1 model and V1 content + // categories version. The V1 model is a legacy model; support for this + // will be discontinued in the future. + V1Model *V1Model `json:"v1Model,omitempty"` + + // V2Model: Setting this field will use the V2 model with the + // appropriate content categories version. The V2 model is a better + // performing model. + V2Model *V2Model `json:"v2Model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "V1Model") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -666,7 +674,7 @@ type ClassifyTextRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") to include in + // NullFields is a list of field names (e.g. "V1Model") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -675,6 +683,40 @@ type ClassifyTextRequest struct { NullFields []string `json:"-"` } +func (s *ClassificationModelOptions) MarshalJSON() ([]byte, error) { + type NoMethod ClassificationModelOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ClassifyTextRequest: The document classification request message. +type ClassifyTextRequest struct { + // ClassificationModelOptions: Model options to use for classification. + // Defaults to v1 options if not specified. + ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"` + + // Document: Required. Input document. + Document *Document `json:"document,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ClassificationModelOptions") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "ClassificationModelOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + func (s *ClassifyTextRequest) MarshalJSON() ([]byte, error) { type NoMethod ClassifyTextRequest raw := NoMethod(*s) @@ -1043,6 +1085,11 @@ func (s *EntityMention) MarshalJSON() ([]byte, error) { // analysis. Setting each one to true will enable that specific analysis // for the input. type Features struct { + // ClassificationModelOptions: The model options to use for + // classification. Defaults to v1 options if not specified. Only used if + // `classify_text` is set to true. + ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"` + // ClassifyText: Classify the full document into categories. ClassifyText bool `json:"classifyText,omitempty"` @@ -1059,20 +1106,22 @@ type Features struct { // ExtractSyntax: Extract syntax information. ExtractSyntax bool `json:"extractSyntax,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClassifyText") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ClassificationModelOptions") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClassifyText") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ClassificationModelOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -1462,6 +1511,48 @@ func (s *Token) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// V1Model: Options for the V1 model. +type V1Model struct { +} + +// V2Model: Options for the V2 model. +type V2Model struct { + // ContentCategoriesVersion: The content categories used for + // classification. + // + // Possible values: + // "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" - If + // `ContentCategoriesVersion` is not specified, this option will default + // to `V1`. + // "V1" - Legacy content categories of our initial launch in 2017. + // "V2" - Updated content categories in 2022. + ContentCategoriesVersion string `json:"contentCategoriesVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ContentCategoriesVersion") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentCategoriesVersion") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *V2Model) MarshalJSON() ([]byte, error) { + type NoMethod V2Model + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "language.documents.analyzeEntities": type DocumentsAnalyzeEntitiesCall struct { diff --git a/language/v1beta2/language-api.json b/language/v1beta2/language-api.json index d233a5c6f42..4ef0c3b3566 100644 --- a/language/v1beta2/language-api.json +++ b/language/v1beta2/language-api.json @@ -227,7 +227,7 @@ } } }, - "revision": "20220801", + "revision": "20220916", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -511,10 +511,29 @@ }, "type": "object" }, + "ClassificationModelOptions": { + "description": "Model options available for classification requests.", + "id": "ClassificationModelOptions", + "properties": { + "v1Model": { + "$ref": "V1Model", + "description": "Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future." + }, + "v2Model": { + "$ref": "V2Model", + "description": "Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model." + } + }, + "type": "object" + }, "ClassifyTextRequest": { "description": "The document classification request message.", "id": "ClassifyTextRequest", "properties": { + "classificationModelOptions": { + "$ref": "ClassificationModelOptions", + "description": "Model options to use for classification. Defaults to v1 options if not specified." + }, "document": { "$ref": "Document", "description": "Required. Input document." @@ -874,6 +893,10 @@ "description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. Next ID: 11", "id": "Features", "properties": { + "classificationModelOptions": { + "$ref": "ClassificationModelOptions", + "description": "The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true." + }, "classifyText": { "description": "Classify the full document into categories. If this is true, the API will use the default model which classifies into a [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories).", "type": "boolean" @@ -1261,6 +1284,33 @@ } }, "type": "object" + }, + "V1Model": { + "description": "Options for the V1 model.", + "id": "V1Model", + "properties": {}, + "type": "object" + }, + "V2Model": { + "description": "Options for the V2 model.", + "id": "V2Model", + "properties": { + "contentCategoriesVersion": { + "description": "The content categories used for classification.", + "enum": [ + "CONTENT_CATEGORIES_VERSION_UNSPECIFIED", + "V1", + "V2" + ], + "enumDescriptions": [ + "If `ContentCategoriesVersion` is not specified, this option will default to `V1`.", + "Legacy content categories of our initial launch in 2017.", + "Updated content categories in 2022." + ], + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/language/v1beta2/language-gen.go b/language/v1beta2/language-gen.go index 18e833eec05..be1be6a8731 100644 --- a/language/v1beta2/language-gen.go +++ b/language/v1beta2/language-gen.go @@ -653,12 +653,20 @@ func (s *ClassificationCategory) UnmarshalJSON(data []byte) error { return nil } -// ClassifyTextRequest: The document classification request message. -type ClassifyTextRequest struct { - // Document: Required. Input document. - Document *Document `json:"document,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Document") to +// ClassificationModelOptions: Model options available for +// classification requests. +type ClassificationModelOptions struct { + // V1Model: Setting this field will use the V1 model and V1 content + // categories version. The V1 model is a legacy model; support for this + // will be discontinued in the future. + V1Model *V1Model `json:"v1Model,omitempty"` + + // V2Model: Setting this field will use the V2 model with the + // appropriate content categories version. The V2 model is a better + // performing model. + V2Model *V2Model `json:"v2Model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "V1Model") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -666,7 +674,7 @@ type ClassifyTextRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") to include in + // NullFields is a list of field names (e.g. "V1Model") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -675,6 +683,40 @@ type ClassifyTextRequest struct { NullFields []string `json:"-"` } +func (s *ClassificationModelOptions) MarshalJSON() ([]byte, error) { + type NoMethod ClassificationModelOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ClassifyTextRequest: The document classification request message. +type ClassifyTextRequest struct { + // ClassificationModelOptions: Model options to use for classification. + // Defaults to v1 options if not specified. + ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"` + + // Document: Required. Input document. + Document *Document `json:"document,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ClassificationModelOptions") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "ClassificationModelOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + func (s *ClassifyTextRequest) MarshalJSON() ([]byte, error) { type NoMethod ClassifyTextRequest raw := NoMethod(*s) @@ -1061,6 +1103,11 @@ func (s *EntityMention) MarshalJSON() ([]byte, error) { // analysis. Setting each one to true will enable that specific analysis // for the input. Next ID: 11 type Features struct { + // ClassificationModelOptions: The model options to use for + // classification. Defaults to v1 options if not specified. Only used if + // `classify_text` is set to true. + ClassificationModelOptions *ClassificationModelOptions `json:"classificationModelOptions,omitempty"` + // ClassifyText: Classify the full document into categories. If this is // true, the API will use the default model which classifies into a // predefined taxonomy @@ -1080,20 +1127,22 @@ type Features struct { // ExtractSyntax: Extract syntax information. ExtractSyntax bool `json:"extractSyntax,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClassifyText") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ClassificationModelOptions") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClassifyText") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ClassificationModelOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -1481,6 +1530,48 @@ func (s *Token) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// V1Model: Options for the V1 model. +type V1Model struct { +} + +// V2Model: Options for the V2 model. +type V2Model struct { + // ContentCategoriesVersion: The content categories used for + // classification. + // + // Possible values: + // "CONTENT_CATEGORIES_VERSION_UNSPECIFIED" - If + // `ContentCategoriesVersion` is not specified, this option will default + // to `V1`. + // "V1" - Legacy content categories of our initial launch in 2017. + // "V2" - Updated content categories in 2022. + ContentCategoriesVersion string `json:"contentCategoriesVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ContentCategoriesVersion") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentCategoriesVersion") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *V2Model) MarshalJSON() ([]byte, error) { + type NoMethod V2Model + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "language.documents.analyzeEntities": type DocumentsAnalyzeEntitiesCall struct { diff --git a/lifesciences/v2beta/lifesciences-api.json b/lifesciences/v2beta/lifesciences-api.json index d26ac6489c9..1b828072729 100644 --- a/lifesciences/v2beta/lifesciences-api.json +++ b/lifesciences/v2beta/lifesciences-api.json @@ -312,7 +312,7 @@ } } }, - "revision": "20220401", + "revision": "20220916", "rootUrl": "https://lifesciences.googleapis.com/", "schemas": { "Accelerator": { @@ -643,7 +643,7 @@ "DATA_LOSS" ], "enumDescriptions": [ - "Not an error; returned on success HTTP Mapping: 200 OK", + "Not an error; returned on success. HTTP Mapping: 200 OK", "The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request", "Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error", "The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request", diff --git a/lifesciences/v2beta/lifesciences-gen.go b/lifesciences/v2beta/lifesciences-gen.go index 4fdda262cf9..0333391de71 100644 --- a/lifesciences/v2beta/lifesciences-gen.go +++ b/lifesciences/v2beta/lifesciences-gen.go @@ -728,7 +728,7 @@ type FailedEvent struct { // failure. // // Possible values: - // "OK" - Not an error; returned on success HTTP Mapping: 200 OK + // "OK" - Not an error; returned on success. HTTP Mapping: 200 OK // "CANCELLED" - The operation was cancelled, typically by the caller. // HTTP Mapping: 499 Client Closed Request // "UNKNOWN" - Unknown error. For example, this error may be returned diff --git a/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index 4b0ad0b379f..50ca1d93b43 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -1467,7 +1467,7 @@ } } }, - "revision": "20220905", + "revision": "20220919", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AuditConfig": { @@ -1549,10 +1549,12 @@ "description": "The type of the backend metastore.", "enum": [ "METASTORE_TYPE_UNSPECIFIED", + "BIGQUERY", "DATAPROC_METASTORE" ], "enumDescriptions": [ "The metastore type is not set.", + "The backend metastore is BigQuery.", "The backend metastore is Dataproc Metastore." ], "type": "string" diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index 898198f86c4..34f66b8b592 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -388,6 +388,7 @@ type BackendMetastore struct { // // Possible values: // "METASTORE_TYPE_UNSPECIFIED" - The metastore type is not set. + // "BIGQUERY" - The backend metastore is BigQuery. // "DATAPROC_METASTORE" - The backend metastore is Dataproc Metastore. MetastoreType string `json:"metastoreType,omitempty"` diff --git a/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index 997aefab7f3..04e74e0fcd4 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1467,7 +1467,7 @@ } } }, - "revision": "20220905", + "revision": "20220919", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AuditConfig": { @@ -1549,10 +1549,12 @@ "description": "The type of the backend metastore.", "enum": [ "METASTORE_TYPE_UNSPECIFIED", + "BIGQUERY", "DATAPROC_METASTORE" ], "enumDescriptions": [ "The metastore type is not set.", + "The backend metastore is BigQuery.", "The backend metastore is Dataproc Metastore." ], "type": "string" diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index 7c65ed4230a..e2e8649cd49 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -388,6 +388,7 @@ type BackendMetastore struct { // // Possible values: // "METASTORE_TYPE_UNSPECIFIED" - The metastore type is not set. + // "BIGQUERY" - The backend metastore is BigQuery. // "DATAPROC_METASTORE" - The backend metastore is Dataproc Metastore. MetastoreType string `json:"metastoreType,omitempty"` diff --git a/monitoring/v1/monitoring-api.json b/monitoring/v1/monitoring-api.json index 441403642f8..456064c1c7c 100644 --- a/monitoring/v1/monitoring-api.json +++ b/monitoring/v1/monitoring-api.json @@ -769,7 +769,7 @@ } } }, - "revision": "20220725", + "revision": "20220916", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -1837,15 +1837,7 @@ "TableDisplayOptions": { "description": "Table display options that can be reused.", "id": "TableDisplayOptions", - "properties": { - "shownColumns": { - "description": "Optional. Columns to display in the table. Leave empty to display all available columns. Note: This field is for future features and is not currently used.", - "items": { - "type": "string" - }, - "type": "array" - } - }, + "properties": {}, "type": "object" }, "Text": { diff --git a/monitoring/v1/monitoring-gen.go b/monitoring/v1/monitoring-gen.go index e189f5f36cf..cf5004b2bae 100644 --- a/monitoring/v1/monitoring-gen.go +++ b/monitoring/v1/monitoring-gen.go @@ -2276,32 +2276,6 @@ func (s *TableDataSet) MarshalJSON() ([]byte, error) { // TableDisplayOptions: Table display options that can be reused. type TableDisplayOptions struct { - // ShownColumns: Optional. Columns to display in the table. Leave empty - // to display all available columns. Note: This field is for future - // features and is not currently used. - ShownColumns []string `json:"shownColumns,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ShownColumns") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ShownColumns") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TableDisplayOptions) MarshalJSON() ([]byte, error) { - type NoMethod TableDisplayOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Text: A widget that displays textual content. diff --git a/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index d8738302a92..8492577c0c8 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -177,97 +177,6 @@ } }, "resources": { - "connectionPolicies": { - "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionPolicies/{connectionPoliciesId}:getIamPolicy", - "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.connectionPolicies.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/[^/]+/connectionPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha1/{+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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionPolicies/{connectionPoliciesId}:setIamPolicy", - "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.connectionPolicies.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/[^/]+/connectionPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha1/{+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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionPolicies/{connectionPoliciesId}:testIamPermissions", - "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.connectionPolicies.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/[^/]+/connectionPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, "global": { "resources": { "hubs": { @@ -755,13 +664,104 @@ } } }, - "serviceIdentifiers": { + "serviceClasses": { + "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceClasses.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/[^/]+/serviceClasses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceClasses.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/[^/]+/serviceClasses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceClasses.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/[^/]+/serviceClasses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serviceConnectionMaps": { "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:getIamPolicy", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.serviceIdentifiers.getIamPolicy", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy", "parameterOrder": [ "resource" ], @@ -775,7 +775,7 @@ "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/[^/]+/serviceIdentifiers/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", "required": true, "type": "string" } @@ -790,9 +790,9 @@ }, "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:setIamPolicy", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceIdentifiers.setIamPolicy", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", "parameterOrder": [ "resource" ], @@ -800,7 +800,7 @@ "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/[^/]+/serviceIdentifiers/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", "required": true, "type": "string" } @@ -818,9 +818,9 @@ }, "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:testIamPermissions", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceIdentifiers.testIamPermissions", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", "parameterOrder": [ "resource" ], @@ -828,7 +828,7 @@ "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/[^/]+/serviceIdentifiers/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", "required": true, "type": "string" } @@ -846,13 +846,13 @@ } } }, - "serviceInstances": { + "serviceConnectionPolicies": { "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceInstances/{serviceInstancesId}:getIamPolicy", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.serviceInstances.getIamPolicy", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy", "parameterOrder": [ "resource" ], @@ -866,7 +866,7 @@ "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/[^/]+/serviceInstances/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", "required": true, "type": "string" } @@ -881,9 +881,9 @@ }, "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceInstances/{serviceInstancesId}:setIamPolicy", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceInstances.setIamPolicy", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", "parameterOrder": [ "resource" ], @@ -891,7 +891,7 @@ "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/[^/]+/serviceInstances/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", "required": true, "type": "string" } @@ -909,9 +909,9 @@ }, "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceInstances/{serviceInstancesId}:testIamPermissions", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceInstances.testIamPermissions", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", "parameterOrder": [ "resource" ], @@ -919,7 +919,7 @@ "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/[^/]+/serviceInstances/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", "required": true, "type": "string" } @@ -1211,7 +1211,7 @@ } } }, - "revision": "20220912", + "revision": "20220919", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index 85232fb5df0..ea3b07f282d 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -151,12 +151,12 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} - rs.ConnectionPolicies = NewProjectsLocationsConnectionPoliciesService(s) rs.Global = NewProjectsLocationsGlobalService(s) rs.InternalRanges = NewProjectsLocationsInternalRangesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) - rs.ServiceIdentifiers = NewProjectsLocationsServiceIdentifiersService(s) - rs.ServiceInstances = NewProjectsLocationsServiceInstancesService(s) + rs.ServiceClasses = NewProjectsLocationsServiceClassesService(s) + rs.ServiceConnectionMaps = NewProjectsLocationsServiceConnectionMapsService(s) + rs.ServiceConnectionPolicies = NewProjectsLocationsServiceConnectionPoliciesService(s) rs.Spokes = NewProjectsLocationsSpokesService(s) return rs } @@ -164,28 +164,19 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service - ConnectionPolicies *ProjectsLocationsConnectionPoliciesService - Global *ProjectsLocationsGlobalService InternalRanges *ProjectsLocationsInternalRangesService Operations *ProjectsLocationsOperationsService - ServiceIdentifiers *ProjectsLocationsServiceIdentifiersService - - ServiceInstances *ProjectsLocationsServiceInstancesService + ServiceClasses *ProjectsLocationsServiceClassesService - Spokes *ProjectsLocationsSpokesService -} + ServiceConnectionMaps *ProjectsLocationsServiceConnectionMapsService -func NewProjectsLocationsConnectionPoliciesService(s *Service) *ProjectsLocationsConnectionPoliciesService { - rs := &ProjectsLocationsConnectionPoliciesService{s: s} - return rs -} + ServiceConnectionPolicies *ProjectsLocationsServiceConnectionPoliciesService -type ProjectsLocationsConnectionPoliciesService struct { - s *Service + Spokes *ProjectsLocationsSpokesService } func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { @@ -227,21 +218,30 @@ type ProjectsLocationsOperationsService struct { s *Service } -func NewProjectsLocationsServiceIdentifiersService(s *Service) *ProjectsLocationsServiceIdentifiersService { - rs := &ProjectsLocationsServiceIdentifiersService{s: s} +func NewProjectsLocationsServiceClassesService(s *Service) *ProjectsLocationsServiceClassesService { + rs := &ProjectsLocationsServiceClassesService{s: s} return rs } -type ProjectsLocationsServiceIdentifiersService struct { +type ProjectsLocationsServiceClassesService struct { s *Service } -func NewProjectsLocationsServiceInstancesService(s *Service) *ProjectsLocationsServiceInstancesService { - rs := &ProjectsLocationsServiceInstancesService{s: s} +func NewProjectsLocationsServiceConnectionMapsService(s *Service) *ProjectsLocationsServiceConnectionMapsService { + rs := &ProjectsLocationsServiceConnectionMapsService{s: s} return rs } -type ProjectsLocationsServiceInstancesService struct { +type ProjectsLocationsServiceConnectionMapsService struct { + s *Service +} + +func NewProjectsLocationsServiceConnectionPoliciesService(s *Service) *ProjectsLocationsServiceConnectionPoliciesService { + rs := &ProjectsLocationsServiceConnectionPoliciesService{s: s} + return rs +} + +type ProjectsLocationsServiceConnectionPoliciesService struct { s *Service } @@ -1614,118 +1614,114 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } -// method id "networkconnectivity.projects.locations.connectionPolicies.getIamPolicy": +// method id "networkconnectivity.projects.locations.global.hubs.create": -type ProjectsLocationsConnectionPoliciesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalHubsCreateCall struct { + s *Service + parent string + hub *Hub + 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 Network Connectivity Center hub in the +// specified project. // -// - 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 *ProjectsLocationsConnectionPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsConnectionPoliciesGetIamPolicyCall { - c := &ProjectsLocationsConnectionPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The parent resource's name of the Hub. +func (r *ProjectsLocationsGlobalHubsService) Create(parent string, hub *Hub) *ProjectsLocationsGlobalHubsCreateCall { + c := &ProjectsLocationsGlobalHubsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.hub = hub 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 *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionPoliciesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// HubId sets the optional parameter "hubId": Unique id for the Hub to +// create. +func (c *ProjectsLocationsGlobalHubsCreateCall) HubId(hubId string) *ProjectsLocationsGlobalHubsCreateCall { + c.urlParams_.Set("hubId", hubId) + 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 t he +// 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 *ProjectsLocationsGlobalHubsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionPoliciesGetIamPolicyCall { +func (c *ProjectsLocationsGlobalHubsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionPoliciesGetIamPolicyCall { +func (c *ProjectsLocationsGlobalHubsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlobalHubsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalHubsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.hub) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/hubs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.connectionPolicies.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkconnectivity.projects.locations.global.hubs.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1744,7 +1740,7 @@ func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1756,31 +1752,38 @@ func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionPolicies/{connectionPoliciesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.connectionPolicies.getIamPolicy", + // "description": "Creates a new Network Connectivity Center hub in the specified project.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.global.hubs.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", + // "hubId": { + // "description": "Optional. Unique id for the Hub to create.", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "parent": { + // "description": "Required. The parent resource's name of the Hub.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/global$", // "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 t he 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": "v1alpha1/{+resource}:getIamPolicy", + // "path": "v1alpha1/{+parent}/hubs", + // "request": { + // "$ref": "Hub" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1789,36 +1792,47 @@ func (c *ProjectsLocationsConnectionPoliciesGetIamPolicyCall) Do(opts ...googlea } -// method id "networkconnectivity.projects.locations.connectionPolicies.setIamPolicy": +// method id "networkconnectivity.projects.locations.global.hubs.delete": -type ProjectsLocationsConnectionPoliciesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalHubsDeleteCall 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 Network Connectivity Center hub. // -// - 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 *ProjectsLocationsConnectionPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsConnectionPoliciesSetIamPolicyCall { - c := &ProjectsLocationsConnectionPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the Hub to delete. +func (r *ProjectsLocationsGlobalHubsService) Delete(name string) *ProjectsLocationsGlobalHubsDeleteCall { + c := &ProjectsLocationsGlobalHubsDeleteCall{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 t he +// 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 *ProjectsLocationsGlobalHubsDeleteCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionPoliciesSetIamPolicyCall { +func (c *ProjectsLocationsGlobalHubsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1826,21 +1840,21 @@ func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionPoliciesSetIamPolicyCall { +func (c *ProjectsLocationsGlobalHubsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlobalHubsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalHubsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1848,34 +1862,29 @@ func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "networkconnectivity.projects.locations.connectionPolicies.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkconnectivity.projects.locations.global.hubs.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1894,7 +1903,7 @@ func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1906,28 +1915,30 @@ func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) Do(opts ...googlea } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionPolicies/{connectionPoliciesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.connectionPolicies.setIamPolicy", + // "description": "Deletes a Network Connectivity Center hub.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", + // "httpMethod": "DELETE", + // "id": "networkconnectivity.projects.locations.global.hubs.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The name of the Hub to delete.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", // "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 t he 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": "v1alpha1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1alpha1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1936,96 +1947,95 @@ func (c *ProjectsLocationsConnectionPoliciesSetIamPolicyCall) Do(opts ...googlea } -// method id "networkconnectivity.projects.locations.connectionPolicies.testIamPermissions": +// method id "networkconnectivity.projects.locations.global.hubs.get": -type ProjectsLocationsConnectionPoliciesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalHubsGetCall 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 details about a Network Connectivity Center hub. // -// - 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 *ProjectsLocationsConnectionPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall { - c := &ProjectsLocationsConnectionPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: Name of the Hub resource to get. +func (r *ProjectsLocationsGlobalHubsService) Get(name string) *ProjectsLocationsGlobalHubsGetCall { + c := &ProjectsLocationsGlobalHubsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall { +func (c *ProjectsLocationsGlobalHubsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGlobalHubsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall { +func (c *ProjectsLocationsGlobalHubsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsGlobalHubsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalHubsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "networkconnectivity.projects.locations.connectionPolicies.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "networkconnectivity.projects.locations.global.hubs.get" call. +// Exactly one of *Hub or error will be non-nil. Any non-2xx status code +// is an error. Response headers are in either +// *Hub.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsGlobalHubsGetCall) Do(opts ...googleapi.CallOption) (*Hub, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2044,7 +2054,7 @@ func (c *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &TestIamPermissionsResponse{ + ret := &Hub{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2056,28 +2066,25 @@ func (c *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall) Do(opts ...g } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/connectionPolicies/{connectionPoliciesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.connectionPolicies.testIamPermissions", + // "description": "Gets details about a Network Connectivity Center hub.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.global.hubs.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. Name of the Hub resource to get.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectionPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1alpha1/{+name}", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "Hub" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2086,114 +2093,118 @@ func (c *ProjectsLocationsConnectionPoliciesTestIamPermissionsCall) Do(opts ...g } -// method id "networkconnectivity.projects.locations.global.hubs.create": +// method id "networkconnectivity.projects.locations.global.hubs.getIamPolicy": -type ProjectsLocationsGlobalHubsCreateCall struct { - s *Service - parent string - hub *Hub - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalHubsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Network Connectivity Center hub in the -// specified project. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - parent: The parent resource's name of the Hub. -func (r *ProjectsLocationsGlobalHubsService) Create(parent string, hub *Hub) *ProjectsLocationsGlobalHubsCreateCall { - c := &ProjectsLocationsGlobalHubsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.hub = hub - return c -} - -// HubId sets the optional parameter "hubId": Unique id for the Hub to -// create. -func (c *ProjectsLocationsGlobalHubsCreateCall) HubId(hubId string) *ProjectsLocationsGlobalHubsCreateCall { - c.urlParams_.Set("hubId", hubId) +// - 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 *ProjectsLocationsGlobalHubsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalHubsGetIamPolicyCall { + c := &ProjectsLocationsGlobalHubsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + 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. 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 t he -// 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 *ProjectsLocationsGlobalHubsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsCreateCall { - c.urlParams_.Set("requestId", requestId) +// 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 *ProjectsLocationsGlobalHubsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalHubsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGlobalHubsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsCreateCall { +func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalHubsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsCreateCall { +func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalHubsCreateCall) Header() http.Header { +func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalHubsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.hub) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/hubs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.global.hubs.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "networkconnectivity.projects.locations.global.hubs.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2212,7 +2223,7 @@ func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2224,38 +2235,31 @@ func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a new Network Connectivity Center hub in the specified project.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.global.hubs.create", + // "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": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.global.hubs.getIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "hubId": { - // "description": "Optional. Unique id for the Hub to create.", + // "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": "string" + // "type": "integer" // }, - // "parent": { - // "description": "Required. The parent resource's name of the Hub.", + // "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/global$", + // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", // "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 t he 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": "v1alpha1/{+parent}/hubs", - // "request": { - // "$ref": "Hub" - // }, + // "path": "v1alpha1/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2264,99 +2268,123 @@ func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) } -// method id "networkconnectivity.projects.locations.global.hubs.delete": +// method id "networkconnectivity.projects.locations.global.hubs.list": -type ProjectsLocationsGlobalHubsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalHubsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Network Connectivity Center hub. +// List: Lists the Network Connectivity Center hubs associated with a +// given project. // -// - name: The name of the Hub to delete. -func (r *ProjectsLocationsGlobalHubsService) Delete(name string) *ProjectsLocationsGlobalHubsDeleteCall { - c := &ProjectsLocationsGlobalHubsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource's name. +func (r *ProjectsLocationsGlobalHubsService) List(parent string) *ProjectsLocationsGlobalHubsListCall { + c := &ProjectsLocationsGlobalHubsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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 t he -// 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 *ProjectsLocationsGlobalHubsDeleteCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsDeleteCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters the results listed in the response. +func (c *ProjectsLocationsGlobalHubsListCall) Filter(filter string) *ProjectsLocationsGlobalHubsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort the results by a +// certain order. +func (c *ProjectsLocationsGlobalHubsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalHubsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results per page that should be returned. +func (c *ProjectsLocationsGlobalHubsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalHubsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token. +func (c *ProjectsLocationsGlobalHubsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalHubsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGlobalHubsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsDeleteCall { +func (c *ProjectsLocationsGlobalHubsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGlobalHubsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalHubsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsDeleteCall { +func (c *ProjectsLocationsGlobalHubsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalHubsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGlobalHubsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalHubsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalHubsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/hubs") 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 "networkconnectivity.projects.locations.global.hubs.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkconnectivity.projects.locations.global.hubs.list" call. +// Exactly one of *ListHubsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListHubsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsGlobalHubsListCall) Do(opts ...googleapi.CallOption) (*ListHubsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2375,7 +2403,7 @@ func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &ListHubsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2387,30 +2415,46 @@ func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a Network Connectivity Center hub.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", - // "httpMethod": "DELETE", - // "id": "networkconnectivity.projects.locations.global.hubs.delete", + // "description": "Lists the Network Connectivity Center hubs associated with a given project.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.global.hubs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the Hub to delete.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", - // "required": true, + // "filter": { + // "description": "A filter expression that filters the results listed in the response.", + // "location": "query", // "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 t he 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).", + // "orderBy": { + // "description": "Sort the results by a certain order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results per page that should be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha1/{+name}", + // "path": "v1alpha1/{+parent}/hubs", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "ListHubsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2419,77 +2463,121 @@ func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "networkconnectivity.projects.locations.global.hubs.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsGlobalHubsListCall) Pages(ctx context.Context, f func(*ListHubsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsGlobalHubsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "networkconnectivity.projects.locations.global.hubs.patch": + +type ProjectsLocationsGlobalHubsPatchCall struct { + s *Service + name string + hub *Hub + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details about a Network Connectivity Center hub. +// Patch: Updates the description and/or labels of a Network +// Connectivity Center hub. // -// - name: Name of the Hub resource to get. -func (r *ProjectsLocationsGlobalHubsService) Get(name string) *ProjectsLocationsGlobalHubsGetCall { - c := &ProjectsLocationsGlobalHubsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The name of a Hub resource. +func (r *ProjectsLocationsGlobalHubsService) Patch(name string, hub *Hub) *ProjectsLocationsGlobalHubsPatchCall { + c := &ProjectsLocationsGlobalHubsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.hub = hub + 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 t he +// 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 *ProjectsLocationsGlobalHubsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Hub 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 *ProjectsLocationsGlobalHubsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalHubsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGlobalHubsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGetCall { +func (c *ProjectsLocationsGlobalHubsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGlobalHubsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalHubsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGetCall { +func (c *ProjectsLocationsGlobalHubsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalHubsGetCall) Header() http.Header { +func (c *ProjectsLocationsGlobalHubsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalHubsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalHubsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.hub) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 } @@ -2500,14 +2588,14 @@ func (c *ProjectsLocationsGlobalHubsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.global.hubs.get" call. -// Exactly one of *Hub or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *Hub.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsGlobalHubsGetCall) Do(opts ...googleapi.CallOption) (*Hub, error) { +// Do executes the "networkconnectivity.projects.locations.global.hubs.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2526,7 +2614,7 @@ func (c *ProjectsLocationsGlobalHubsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Hub{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2538,26 +2626,40 @@ func (c *ProjectsLocationsGlobalHubsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets details about a Network Connectivity Center hub.", + // "description": "Updates the description and/or labels of a Network Connectivity Center hub.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.global.hubs.get", + // "httpMethod": "PATCH", + // "id": "networkconnectivity.projects.locations.global.hubs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the Hub resource to get.", + // "description": "Immutable. The name of a Hub resource.", // "location": "path", // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", // "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 t he 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 Hub 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": "v1alpha1/{+name}", - // "response": { + // "request": { // "$ref": "Hub" // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -2565,100 +2667,75 @@ func (c *ProjectsLocationsGlobalHubsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "networkconnectivity.projects.locations.global.hubs.getIamPolicy": +// method id "networkconnectivity.projects.locations.global.hubs.setIamPolicy": -type ProjectsLocationsGlobalHubsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalHubsSetIamPolicyCall 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. See Resource names +// specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsGlobalHubsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalHubsGetIamPolicyCall { - c := &ProjectsLocationsGlobalHubsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlobalHubsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalHubsSetIamPolicyCall { + c := &ProjectsLocationsGlobalHubsSetIamPolicyCall{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 *ProjectsLocationsGlobalHubsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalHubsGetIamPolicyCall { - 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 information. -func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGetIamPolicyCall { +func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGetIamPolicyCall { +func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 } @@ -2669,14 +2746,14 @@ func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.global.hubs.getIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.global.hubs.setIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2707,29 +2784,26 @@ func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.global.hubs.getIamPolicy", + // "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": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.global.hubs.setIamPolicy", // "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.", + // "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/global/hubs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+resource}:getIamPolicy", + // "path": "v1alpha1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { // "$ref": "Policy" // }, @@ -2740,123 +2814,96 @@ func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Do(opts ...googleapi.CallO } -// method id "networkconnectivity.projects.locations.global.hubs.list": +// method id "networkconnectivity.projects.locations.global.hubs.testIamPermissions": -type ProjectsLocationsGlobalHubsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalHubsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the Network Connectivity Center hubs associated with a -// given project. +// 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 parent resource's name. -func (r *ProjectsLocationsGlobalHubsService) List(parent string) *ProjectsLocationsGlobalHubsListCall { - c := &ProjectsLocationsGlobalHubsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters the results listed in the response. -func (c *ProjectsLocationsGlobalHubsListCall) Filter(filter string) *ProjectsLocationsGlobalHubsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sort the results by a -// certain order. -func (c *ProjectsLocationsGlobalHubsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalHubsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results per page that should be returned. -func (c *ProjectsLocationsGlobalHubsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalHubsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The page token. -func (c *ProjectsLocationsGlobalHubsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalHubsListCall { - 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 *ProjectsLocationsGlobalHubsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalHubsTestIamPermissionsCall { + c := &ProjectsLocationsGlobalHubsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGlobalHubsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsListCall { +func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGlobalHubsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalHubsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsListCall { +func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalHubsListCall) Header() http.Header { +func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalHubsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/hubs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "networkconnectivity.projects.locations.global.hubs.list" call. -// Exactly one of *ListHubsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListHubsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkconnectivity.projects.locations.global.hubs.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsGlobalHubsListCall) Do(opts ...googleapi.CallOption) (*ListHubsResponse, error) { +func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2875,7 +2922,7 @@ func (c *ProjectsLocationsGlobalHubsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListHubsResponse{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2887,46 +2934,28 @@ func (c *ProjectsLocationsGlobalHubsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists the Network Connectivity Center hubs associated with a given project.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.global.hubs.list", + // "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": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.global.hubs.testIamPermissions", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters the results listed in the response.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Sort the results by a certain order.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results per page that should be returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource's name.", + // "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/global$", + // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+parent}/hubs", + // "path": "v1alpha1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "ListHubsResponse" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2935,139 +2964,118 @@ func (c *ProjectsLocationsGlobalHubsListCall) 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 *ProjectsLocationsGlobalHubsListCall) Pages(ctx context.Context, f func(*ListHubsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "networkconnectivity.projects.locations.global.hubs.patch": - -type ProjectsLocationsGlobalHubsPatchCall struct { - s *Service - name string - hub *Hub - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the description and/or labels of a Network -// Connectivity Center hub. -// -// - name: Immutable. The name of a Hub resource. -func (r *ProjectsLocationsGlobalHubsService) Patch(name string, hub *Hub) *ProjectsLocationsGlobalHubsPatchCall { - c := &ProjectsLocationsGlobalHubsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.hub = hub - return c -} +// method id "networkconnectivity.projects.locations.internalRanges.getIamPolicy": -// 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 t he -// 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 *ProjectsLocationsGlobalHubsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsPatchCall { - c.urlParams_.Set("requestId", requestId) +type ProjectsLocationsInternalRangesGetIamPolicyCall 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 *ProjectsLocationsInternalRangesService) GetIamPolicy(resource string) *ProjectsLocationsInternalRangesGetIamPolicyCall { + c := &ProjectsLocationsInternalRangesGetIamPolicyCall{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 Hub 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 *ProjectsLocationsGlobalHubsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalHubsPatchCall { - 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 *ProjectsLocationsInternalRangesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsInternalRangesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGlobalHubsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsPatchCall { +func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsInternalRangesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalHubsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsPatchCall { +func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalHubsPatchCall) Header() http.Header { +func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalHubsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.hub) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.global.hubs.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "networkconnectivity.projects.locations.internalRanges.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3086,7 +3094,7 @@ func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3098,39 +3106,31 @@ func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates the description and/or labels of a Network Connectivity Center hub.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", - // "httpMethod": "PATCH", - // "id": "networkconnectivity.projects.locations.global.hubs.patch", + // "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.internalRanges.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Immutable. The name of a Hub resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", - // "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 t he 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).", + // "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": "string" + // "type": "integer" // }, - // "updateMask": { - // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Hub 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", + // "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/[^/]+/internalRanges/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+name}", - // "request": { - // "$ref": "Hub" - // }, + // "path": "v1alpha1/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3139,9 +3139,9 @@ func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) } -// method id "networkconnectivity.projects.locations.global.hubs.setIamPolicy": +// method id "networkconnectivity.projects.locations.internalRanges.setIamPolicy": -type ProjectsLocationsGlobalHubsSetIamPolicyCall struct { +type ProjectsLocationsInternalRangesSetIamPolicyCall struct { s *Service resource string setiampolicyrequest *SetIamPolicyRequest @@ -3158,8 +3158,8 @@ type ProjectsLocationsGlobalHubsSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsGlobalHubsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalHubsSetIamPolicyCall { - c := &ProjectsLocationsGlobalHubsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInternalRangesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsInternalRangesSetIamPolicyCall { + c := &ProjectsLocationsInternalRangesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.setiampolicyrequest = setiampolicyrequest return c @@ -3168,7 +3168,7 @@ func (r *ProjectsLocationsGlobalHubsService) SetIamPolicy(resource string, setia // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsSetIamPolicyCall { +func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3176,21 +3176,21 @@ func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsSetIamPolicyCall { +func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3218,14 +3218,14 @@ func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.global.hubs.setIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.internalRanges.setIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3257,9 +3257,9 @@ func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:setIamPolicy", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:setIamPolicy", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.global.hubs.setIamPolicy", + // "id": "networkconnectivity.projects.locations.internalRanges.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -3267,7 +3267,7 @@ func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Do(opts ...googleapi.CallO // "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/global/hubs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", // "required": true, // "type": "string" // } @@ -3286,9 +3286,9 @@ func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Do(opts ...googleapi.CallO } -// method id "networkconnectivity.projects.locations.global.hubs.testIamPermissions": +// method id "networkconnectivity.projects.locations.internalRanges.testIamPermissions": -type ProjectsLocationsGlobalHubsTestIamPermissionsCall struct { +type ProjectsLocationsInternalRangesTestIamPermissionsCall struct { s *Service resource string testiampermissionsrequest *TestIamPermissionsRequest @@ -3308,8 +3308,8 @@ type ProjectsLocationsGlobalHubsTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsGlobalHubsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalHubsTestIamPermissionsCall { - c := &ProjectsLocationsGlobalHubsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInternalRangesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsInternalRangesTestIamPermissionsCall { + c := &ProjectsLocationsInternalRangesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.testiampermissionsrequest = testiampermissionsrequest return c @@ -3318,7 +3318,7 @@ func (r *ProjectsLocationsGlobalHubsService) TestIamPermissions(resource string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsTestIamPermissionsCall { +func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3326,21 +3326,21 @@ func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Fields(s ...googleap // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsTestIamPermissionsCall { +func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3368,14 +3368,14 @@ func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.global.hubs.testIamPermissions" call. +// Do executes the "networkconnectivity.projects.locations.internalRanges.testIamPermissions" call. // Exactly one of *TestIamPermissionsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *TestIamPermissionsResponse.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3407,9 +3407,9 @@ func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Do(opts ...googleapi return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:testIamPermissions", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:testIamPermissions", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.global.hubs.testIamPermissions", + // "id": "networkconnectivity.projects.locations.internalRanges.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -3417,7 +3417,7 @@ func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Do(opts ...googleapi // "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/global/hubs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", // "required": true, // "type": "string" // } @@ -3436,118 +3436,97 @@ func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Do(opts ...googleapi } -// method id "networkconnectivity.projects.locations.internalRanges.getIamPolicy": +// method id "networkconnectivity.projects.locations.operations.cancel": -type ProjectsLocationsInternalRangesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + 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. +// 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 is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsInternalRangesService) GetIamPolicy(resource string) *ProjectsLocationsInternalRangesGetIamPolicyCall { - c := &ProjectsLocationsInternalRangesGetIamPolicyCall{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 *ProjectsLocationsInternalRangesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsInternalRangesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesGetIamPolicyCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsInternalRangesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesGetIamPolicyCall { +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.internalRanges.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// Do executes the "networkconnectivity.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) +// *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 *ProjectsLocationsInternalRangesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3566,7 +3545,7 @@ func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3578,31 +3557,28 @@ func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.internalRanges.getIamPolicy", + // "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.operations.cancel", // "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": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+resource}:getIamPolicy", + // "path": "v1alpha1/{+name}:cancel", + // "request": { + // "$ref": "GoogleLongrunningCancelOperationRequest" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3611,36 +3587,32 @@ func (c *ProjectsLocationsInternalRangesGetIamPolicyCall) Do(opts ...googleapi.C } -// method id "networkconnectivity.projects.locations.internalRanges.setIamPolicy": +// method id "networkconnectivity.projects.locations.operations.delete": -type ProjectsLocationsInternalRangesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsDeleteCall 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 *ProjectsLocationsInternalRangesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsInternalRangesSetIamPolicyCall { - c := &ProjectsLocationsInternalRangesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesSetIamPolicyCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3648,21 +3620,21 @@ func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesSetIamPolicyCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3670,34 +3642,29 @@ func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "networkconnectivity.projects.locations.internalRanges.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// Do executes the "networkconnectivity.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) +// *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 *ProjectsLocationsInternalRangesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3716,7 +3683,7 @@ func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3728,28 +3695,25 @@ func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.internalRanges.setIamPolicy", + // "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "networkconnectivity.projects.locations.operations.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1alpha1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3758,96 +3722,97 @@ func (c *ProjectsLocationsInternalRangesSetIamPolicyCall) Do(opts ...googleapi.C } -// method id "networkconnectivity.projects.locations.internalRanges.testIamPermissions": +// method id "networkconnectivity.projects.locations.operations.get": -type ProjectsLocationsInternalRangesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsGetCall 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 *ProjectsLocationsInternalRangesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsInternalRangesTestIamPermissionsCall { - c := &ProjectsLocationsInternalRangesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "networkconnectivity.projects.locations.internalRanges.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Do executes the "networkconnectivity.projects.locations.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 { @@ -3866,7 +3831,7 @@ func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3878,28 +3843,25 @@ func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Do(opts ...googl } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.internalRanges.testIamPermissions", + // "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.operations.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1alpha1/{+name}", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3908,79 +3870,107 @@ func (c *ProjectsLocationsInternalRangesTestIamPermissionsCall) Do(opts ...googl } -// method id "networkconnectivity.projects.locations.operations.cancel": +// method id "networkconnectivity.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// 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 *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) 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 *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 } @@ -3991,14 +3981,15 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networkconnectivity.projects.locations.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4017,7 +4008,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Empty{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4029,28 +4020,41 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.operations.cancel", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "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": "v1alpha1/{+name}:cancel", - // "request": { - // "$ref": "GoogleLongrunningCancelOperationRequest" - // }, + // "path": "v1alpha1/{+name}/operations", // "response": { - // "$ref": "Empty" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4059,84 +4063,139 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "networkconnectivity.projects.locations.operations.delete": +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "networkconnectivity.projects.locations.serviceClasses.getIamPolicy": + +type ProjectsLocationsServiceClassesGetIamPolicyCall struct { + s *Service + resource 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`. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceClassesService) GetIamPolicy(resource string) *ProjectsLocationsServiceClassesGetIamPolicyCall { + c := &ProjectsLocationsServiceClassesGetIamPolicyCall{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 *ProjectsLocationsServiceClassesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceClassesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) 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 *ProjectsLocationsServiceClassesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// Do executes the "networkconnectivity.projects.locations.serviceClasses.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) +// *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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4155,7 +4214,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Empty{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4167,25 +4226,31 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "networkconnectivity.projects.locations.operations.delete", + // "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceClasses.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+name}", + // "path": "v1alpha1/{+resource}:getIamPolicy", // "response": { - // "$ref": "Empty" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4194,97 +4259,93 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "networkconnectivity.projects.locations.operations.get": +// method id "networkconnectivity.projects.locations.serviceClasses.setIamPolicy": -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceClassesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + 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. +// 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. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceClassesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceClassesSetIamPolicyCall { + c := &ProjectsLocationsServiceClassesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) 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 *ProjectsLocationsServiceClassesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "networkconnectivity.projects.locations.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "networkconnectivity.projects.locations.serviceClasses.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4303,7 +4364,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4315,25 +4376,28 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.operations.get", + // "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceClasses.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "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/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha1/{+name}", + // "path": "v1alpha1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4342,126 +4406,96 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "networkconnectivity.projects.locations.operations.list": +// method id "networkconnectivity.projects.locations.serviceClasses.testIamPermissions": -type ProjectsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceClassesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + 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`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. +// 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's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - 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 *ProjectsLocationsServiceClassesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceClassesTestIamPermissionsCall { + c := &ProjectsLocationsServiceClassesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) 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 *ProjectsLocationsServiceClassesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "networkconnectivity.projects.locations.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "networkconnectivity.projects.locations.serviceClasses.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4480,7 +4514,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4492,41 +4526,28 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.operations.list", + // "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": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceClasses.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "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/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "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": "v1alpha1/{+name}/operations", + // "path": "v1alpha1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4535,30 +4556,9 @@ 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 { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "networkconnectivity.projects.locations.serviceIdentifiers.getIamPolicy": +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy": -type ProjectsLocationsServiceIdentifiersGetIamPolicyCall struct { +type ProjectsLocationsServiceConnectionMapsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -4575,8 +4575,8 @@ type ProjectsLocationsServiceIdentifiersGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceIdentifiersService) GetIamPolicy(resource string) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { - c := &ProjectsLocationsServiceIdentifiersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceConnectionMapsService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionMapsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -4594,7 +4594,7 @@ func (r *ProjectsLocationsServiceIdentifiersService) GetIamPolicy(resource strin // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -4602,7 +4602,7 @@ func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) OptionsRequestedPo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4612,7 +4612,7 @@ func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -4620,21 +4620,21 @@ func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceIdentifiersGetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4660,14 +4660,14 @@ func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceIdentifiers.getIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4699,9 +4699,9 @@ func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Do(opts ...googlea return ret, nil // { // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:getIamPolicy", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.serviceIdentifiers.getIamPolicy", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -4715,7 +4715,7 @@ func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Do(opts ...googlea // "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/[^/]+/serviceIdentifiers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", // "required": true, // "type": "string" // } @@ -4731,9 +4731,9 @@ func (c *ProjectsLocationsServiceIdentifiersGetIamPolicyCall) Do(opts ...googlea } -// method id "networkconnectivity.projects.locations.serviceIdentifiers.setIamPolicy": +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy": -type ProjectsLocationsServiceIdentifiersSetIamPolicyCall struct { +type ProjectsLocationsServiceConnectionMapsSetIamPolicyCall struct { s *Service resource string setiampolicyrequest *SetIamPolicyRequest @@ -4750,8 +4750,8 @@ type ProjectsLocationsServiceIdentifiersSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceIdentifiersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceIdentifiersSetIamPolicyCall { - c := &ProjectsLocationsServiceIdentifiersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceConnectionMapsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionMapsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.setiampolicyrequest = setiampolicyrequest return c @@ -4760,7 +4760,7 @@ func (r *ProjectsLocationsServiceIdentifiersService) SetIamPolicy(resource strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceIdentifiersSetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4768,21 +4768,21 @@ func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceIdentifiersSetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4810,14 +4810,14 @@ func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceIdentifiers.setIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4849,9 +4849,9 @@ func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Do(opts ...googlea return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:setIamPolicy", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceIdentifiers.setIamPolicy", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -4859,7 +4859,7 @@ func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Do(opts ...googlea // "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/[^/]+/serviceIdentifiers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", // "required": true, // "type": "string" // } @@ -4878,9 +4878,9 @@ func (c *ProjectsLocationsServiceIdentifiersSetIamPolicyCall) Do(opts ...googlea } -// method id "networkconnectivity.projects.locations.serviceIdentifiers.testIamPermissions": +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions": -type ProjectsLocationsServiceIdentifiersTestIamPermissionsCall struct { +type ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall struct { s *Service resource string testiampermissionsrequest *TestIamPermissionsRequest @@ -4900,8 +4900,8 @@ type ProjectsLocationsServiceIdentifiersTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceIdentifiersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall { - c := &ProjectsLocationsServiceIdentifiersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceConnectionMapsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { + c := &ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.testiampermissionsrequest = testiampermissionsrequest return c @@ -4910,7 +4910,7 @@ func (r *ProjectsLocationsServiceIdentifiersService) TestIamPermissions(resource // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall { +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4918,21 +4918,21 @@ func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall { +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4960,14 +4960,14 @@ func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceIdentifiers.testIamPermissions" call. +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions" call. // Exactly one of *TestIamPermissionsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *TestIamPermissionsResponse.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4999,9 +4999,9 @@ func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Do(opts ...g return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceIdentifiers/{serviceIdentifiersId}:testIamPermissions", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceIdentifiers.testIamPermissions", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -5009,7 +5009,7 @@ func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Do(opts ...g // "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/[^/]+/serviceIdentifiers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", // "required": true, // "type": "string" // } @@ -5028,9 +5028,9 @@ func (c *ProjectsLocationsServiceIdentifiersTestIamPermissionsCall) Do(opts ...g } -// method id "networkconnectivity.projects.locations.serviceInstances.getIamPolicy": +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy": -type ProjectsLocationsServiceInstancesGetIamPolicyCall struct { +type ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -5047,8 +5047,8 @@ type ProjectsLocationsServiceInstancesGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceInstancesService) GetIamPolicy(resource string) *ProjectsLocationsServiceInstancesGetIamPolicyCall { - c := &ProjectsLocationsServiceInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceConnectionPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -5066,7 +5066,7 @@ func (r *ProjectsLocationsServiceInstancesService) GetIamPolicy(resource string) // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceInstancesGetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -5074,7 +5074,7 @@ func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) OptionsRequestedPoli // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceInstancesGetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5084,7 +5084,7 @@ func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) Fields(s ...googleap // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceInstancesGetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -5092,21 +5092,21 @@ func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) IfNoneMatch(entityTa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceInstancesGetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5132,14 +5132,14 @@ func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceInstances.getIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5171,9 +5171,9 @@ func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) Do(opts ...googleapi return ret, nil // { // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceInstances/{serviceInstancesId}:getIamPolicy", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.serviceInstances.getIamPolicy", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -5187,7 +5187,7 @@ func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) Do(opts ...googleapi // "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/[^/]+/serviceInstances/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", // "required": true, // "type": "string" // } @@ -5203,9 +5203,9 @@ func (c *ProjectsLocationsServiceInstancesGetIamPolicyCall) Do(opts ...googleapi } -// method id "networkconnectivity.projects.locations.serviceInstances.setIamPolicy": +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy": -type ProjectsLocationsServiceInstancesSetIamPolicyCall struct { +type ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall struct { s *Service resource string setiampolicyrequest *SetIamPolicyRequest @@ -5222,8 +5222,8 @@ type ProjectsLocationsServiceInstancesSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceInstancesSetIamPolicyCall { - c := &ProjectsLocationsServiceInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceConnectionPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.setiampolicyrequest = setiampolicyrequest return c @@ -5232,7 +5232,7 @@ func (r *ProjectsLocationsServiceInstancesService) SetIamPolicy(resource string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceInstancesSetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5240,21 +5240,21 @@ func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) Fields(s ...googleap // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceInstancesSetIamPolicyCall { +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5282,14 +5282,14 @@ func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceInstances.setIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5321,9 +5321,9 @@ func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) Do(opts ...googleapi return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceInstances/{serviceInstancesId}:setIamPolicy", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceInstances.setIamPolicy", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -5331,7 +5331,7 @@ func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) Do(opts ...googleapi // "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/[^/]+/serviceInstances/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", // "required": true, // "type": "string" // } @@ -5350,9 +5350,9 @@ func (c *ProjectsLocationsServiceInstancesSetIamPolicyCall) Do(opts ...googleapi } -// method id "networkconnectivity.projects.locations.serviceInstances.testIamPermissions": +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions": -type ProjectsLocationsServiceInstancesTestIamPermissionsCall struct { +type ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall struct { s *Service resource string testiampermissionsrequest *TestIamPermissionsRequest @@ -5372,8 +5372,8 @@ type ProjectsLocationsServiceInstancesTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceInstancesTestIamPermissionsCall { - c := &ProjectsLocationsServiceInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceConnectionPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { + c := &ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.testiampermissionsrequest = testiampermissionsrequest return c @@ -5382,7 +5382,7 @@ func (r *ProjectsLocationsServiceInstancesService) TestIamPermissions(resource s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceInstancesTestIamPermissionsCall { +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5390,21 +5390,21 @@ func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) Fields(s ...go // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceInstancesTestIamPermissionsCall { +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5432,14 +5432,14 @@ func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceInstances.testIamPermissions" call. +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions" call. // Exactly one of *TestIamPermissionsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *TestIamPermissionsResponse.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5471,9 +5471,9 @@ func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) Do(opts ...goo return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceInstances/{serviceInstancesId}:testIamPermissions", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceInstances.testIamPermissions", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -5481,7 +5481,7 @@ func (c *ProjectsLocationsServiceInstancesTestIamPermissionsCall) Do(opts ...goo // "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/[^/]+/serviceInstances/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", // "required": true, // "type": "string" // } diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 08f37dd3a2d..1feb4d45fe6 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20220908", + "revision": "20220915", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1661,6 +1661,13 @@ "description": "Destination IP range of the route.", "type": "string" }, + "destPortRanges": { + "description": "Destination port ranges of the route. Policy based routes only.", + "items": { + "type": "string" + }, + "type": "array" + }, "displayName": { "description": "Name of a Compute Engine route.", "type": "string" @@ -1717,6 +1724,13 @@ "format": "int32", "type": "integer" }, + "protocols": { + "description": "Protocols of the route. Policy based routes only.", + "items": { + "type": "string" + }, + "type": "array" + }, "routeType": { "description": "Type of route.", "enum": [ @@ -1726,7 +1740,8 @@ "DYNAMIC", "PEERING_SUBNET", "PEERING_STATIC", - "PEERING_DYNAMIC" + "PEERING_DYNAMIC", + "POLICY_BASED_ROUTE" ], "enumDescriptions": [ "Unspecified type. Default value.", @@ -1735,10 +1750,22 @@ "Dynamic route exchanged between BGP peers.", "A subnet route received from peering network.", "A static route received from peering network.", - "A dynamic route received from peering network." + "A dynamic route received from peering network.", + "Policy based route." ], "type": "string" }, + "srcIpRange": { + "description": "Source IP address range of the route. Policy based routes only.", + "type": "string" + }, + "srcPortRanges": { + "description": "Source port ranges of the route. Policy based routes only.", + "items": { + "type": "string" + }, + "type": "array" + }, "uri": { "description": "URI of a Compute Engine route. Dynamic route from cloud router does not have a URI. Advertised route from Google Cloud VPC to on-premises network also does not have a URI.", "type": "string" diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 7aeca7f4bb4..58ba73227de 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -1885,6 +1885,10 @@ type RouteInfo struct { // DestIpRange: Destination IP range of the route. DestIpRange string `json:"destIpRange,omitempty"` + // DestPortRanges: Destination port ranges of the route. Policy based + // routes only. + DestPortRanges []string `json:"destPortRanges,omitempty"` + // DisplayName: Name of a Compute Engine route. DisplayName string `json:"displayName,omitempty"` @@ -1925,6 +1929,9 @@ type RouteInfo struct { // Priority: Priority of the route. Priority int64 `json:"priority,omitempty"` + // Protocols: Protocols of the route. Policy based routes only. + Protocols []string `json:"protocols,omitempty"` + // RouteType: Type of route. // // Possible values: @@ -1937,8 +1944,17 @@ type RouteInfo struct { // "PEERING_SUBNET" - A subnet route received from peering network. // "PEERING_STATIC" - A static route received from peering network. // "PEERING_DYNAMIC" - A dynamic route received from peering network. + // "POLICY_BASED_ROUTE" - Policy based route. RouteType string `json:"routeType,omitempty"` + // SrcIpRange: Source IP address range of the route. Policy based routes + // only. + SrcIpRange string `json:"srcIpRange,omitempty"` + + // SrcPortRanges: Source port ranges of the route. Policy based routes + // only. + SrcPortRanges []string `json:"srcPortRanges,omitempty"` + // Uri: URI of a Compute Engine route. Dynamic route from cloud router // does not have a URI. Advertised route from Google Cloud VPC to // on-premises network also does not have a URI. diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 8f7d1ca0d28..151d6f9038b 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20220908", + "revision": "20220915", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1804,6 +1804,13 @@ "description": "Destination IP range of the route.", "type": "string" }, + "destPortRanges": { + "description": "Destination port ranges of the route. Policy based routes only.", + "items": { + "type": "string" + }, + "type": "array" + }, "displayName": { "description": "Name of a Compute Engine route.", "type": "string" @@ -1860,6 +1867,13 @@ "format": "int32", "type": "integer" }, + "protocols": { + "description": "Protocols of the route. Policy based routes only.", + "items": { + "type": "string" + }, + "type": "array" + }, "routeType": { "description": "Type of route.", "enum": [ @@ -1869,7 +1883,8 @@ "DYNAMIC", "PEERING_SUBNET", "PEERING_STATIC", - "PEERING_DYNAMIC" + "PEERING_DYNAMIC", + "POLICY_BASED_ROUTE" ], "enumDescriptions": [ "Unspecified type. Default value.", @@ -1878,10 +1893,22 @@ "Dynamic route exchanged between BGP peers.", "A subnet route received from peering network.", "A static route received from peering network.", - "A dynamic route received from peering network." + "A dynamic route received from peering network.", + "Policy based route." ], "type": "string" }, + "srcIpRange": { + "description": "Source IP address range of the route. Policy based routes only.", + "type": "string" + }, + "srcPortRanges": { + "description": "Source port ranges of the route. Policy based routes only.", + "items": { + "type": "string" + }, + "type": "array" + }, "uri": { "description": "URI of a Compute Engine route. Dynamic route from cloud router does not have a URI. Advertised route from Google Cloud VPC to on-premises network also does not have a URI.", "type": "string" diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 6a5378f0a2b..27e83316fb2 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -2094,6 +2094,10 @@ type RouteInfo struct { // DestIpRange: Destination IP range of the route. DestIpRange string `json:"destIpRange,omitempty"` + // DestPortRanges: Destination port ranges of the route. Policy based + // routes only. + DestPortRanges []string `json:"destPortRanges,omitempty"` + // DisplayName: Name of a Compute Engine route. DisplayName string `json:"displayName,omitempty"` @@ -2134,6 +2138,9 @@ type RouteInfo struct { // Priority: Priority of the route. Priority int64 `json:"priority,omitempty"` + // Protocols: Protocols of the route. Policy based routes only. + Protocols []string `json:"protocols,omitempty"` + // RouteType: Type of route. // // Possible values: @@ -2146,8 +2153,17 @@ type RouteInfo struct { // "PEERING_SUBNET" - A subnet route received from peering network. // "PEERING_STATIC" - A static route received from peering network. // "PEERING_DYNAMIC" - A dynamic route received from peering network. + // "POLICY_BASED_ROUTE" - Policy based route. RouteType string `json:"routeType,omitempty"` + // SrcIpRange: Source IP address range of the route. Policy based routes + // only. + SrcIpRange string `json:"srcIpRange,omitempty"` + + // SrcPortRanges: Source port ranges of the route. Policy based routes + // only. + SrcPortRanges []string `json:"srcPortRanges,omitempty"` + // Uri: URI of a Compute Engine route. Dynamic route from cloud router // does not have a URI. Advertised route from Google Cloud VPC to // on-premises network also does not have a URI. diff --git a/ondemandscanning/v1/ondemandscanning-api.json b/ondemandscanning/v1/ondemandscanning-api.json index 00f37f8f444..aacf1fa738d 100644 --- a/ondemandscanning/v1/ondemandscanning-api.json +++ b/ondemandscanning/v1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20220806", + "revision": "20220917", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -966,7 +966,7 @@ "Resource is known but no action has been taken yet.", "Resource is being analyzed.", "Analysis has finished successfully.", - "Analysis has completed", + "Analysis has completed.", "Analysis has finished unsuccessfully, the analysis itself is in a bad state.", "The resource is known not to be supported." ], @@ -2322,6 +2322,20 @@ "format": "float", "type": "number" }, + "cvssVersion": { + "description": "Output only. CVSS version used to populate cvss_score and severity.", + "enum": [ + "CVSS_VERSION_UNSPECIFIED", + "CVSS_VERSION_2", + "CVSS_VERSION_3" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "cvssv3": { "$ref": "CVSS", "description": "The cvss v3 score for the vulnerability." diff --git a/ondemandscanning/v1/ondemandscanning-gen.go b/ondemandscanning/v1/ondemandscanning-gen.go index b0cab62516a..8b4c51d613c 100644 --- a/ondemandscanning/v1/ondemandscanning-gen.go +++ b/ondemandscanning/v1/ondemandscanning-gen.go @@ -1074,7 +1074,7 @@ type DiscoveryOccurrence struct { // "PENDING" - Resource is known but no action has been taken yet. // "SCANNING" - Resource is being analyzed. // "FINISHED_SUCCESS" - Analysis has finished successfully. - // "COMPLETE" - Analysis has completed + // "COMPLETE" - Analysis has completed. // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the // analysis itself is in a bad state. // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. @@ -3314,6 +3314,15 @@ type VulnerabilityOccurrence struct { // indicates high severity. CvssScore float64 `json:"cvssScore,omitempty"` + // CvssVersion: Output only. CVSS version used to populate cvss_score + // and severity. + // + // Possible values: + // "CVSS_VERSION_UNSPECIFIED" + // "CVSS_VERSION_2" + // "CVSS_VERSION_3" + CvssVersion string `json:"cvssVersion,omitempty"` + // Cvssv3: The cvss v3 score for the vulnerability. Cvssv3 *CVSS `json:"cvssv3,omitempty"` diff --git a/ondemandscanning/v1beta1/ondemandscanning-api.json b/ondemandscanning/v1beta1/ondemandscanning-api.json index 1c12a342de2..2fdaf844561 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-api.json +++ b/ondemandscanning/v1beta1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20220806", + "revision": "20220917", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -962,7 +962,7 @@ "Resource is known but no action has been taken yet.", "Resource is being analyzed.", "Analysis has finished successfully.", - "Analysis has completed", + "Analysis has completed.", "Analysis has finished unsuccessfully, the analysis itself is in a bad state.", "The resource is known not to be supported." ], @@ -2318,6 +2318,20 @@ "format": "float", "type": "number" }, + "cvssVersion": { + "description": "Output only. CVSS version used to populate cvss_score and severity.", + "enum": [ + "CVSS_VERSION_UNSPECIFIED", + "CVSS_VERSION_2", + "CVSS_VERSION_3" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "cvssv3": { "$ref": "CVSS", "description": "The cvss v3 score for the vulnerability." diff --git a/ondemandscanning/v1beta1/ondemandscanning-gen.go b/ondemandscanning/v1beta1/ondemandscanning-gen.go index cc52f0c1d78..38c1de40be1 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-gen.go +++ b/ondemandscanning/v1beta1/ondemandscanning-gen.go @@ -1068,7 +1068,7 @@ type DiscoveryOccurrence struct { // "PENDING" - Resource is known but no action has been taken yet. // "SCANNING" - Resource is being analyzed. // "FINISHED_SUCCESS" - Analysis has finished successfully. - // "COMPLETE" - Analysis has completed + // "COMPLETE" - Analysis has completed. // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the // analysis itself is in a bad state. // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. @@ -3308,6 +3308,15 @@ type VulnerabilityOccurrence struct { // indicates high severity. CvssScore float64 `json:"cvssScore,omitempty"` + // CvssVersion: Output only. CVSS version used to populate cvss_score + // and severity. + // + // Possible values: + // "CVSS_VERSION_UNSPECIFIED" + // "CVSS_VERSION_2" + // "CVSS_VERSION_3" + CvssVersion string `json:"cvssVersion,omitempty"` + // Cvssv3: The cvss v3 score for the vulnerability. Cvssv3 *CVSS `json:"cvssv3,omitempty"` diff --git a/privateca/v1/privateca-api.json b/privateca/v1/privateca-api.json index bd2797e3461..79ef6197486 100644 --- a/privateca/v1/privateca-api.json +++ b/privateca/v1/privateca-api.json @@ -1595,7 +1595,7 @@ } } }, - "revision": "20220825", + "revision": "20220915", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -2947,13 +2947,14 @@ "type": "boolean" }, "exclusiveAction": { + "description": "Excluisive action returned by the CLH.", "enum": [ "UNKNOWN_REPAIR_ACTION", "DELETE", "RETRY" ], "enumDescriptions": [ - "", + "Unknown repair action.", "The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel. For more information - go/ccfe-delete-on-upsert, go/ccfe-reconciliation-protocol-ug#apply_delete", "This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." ], diff --git a/privateca/v1/privateca-gen.go b/privateca/v1/privateca-gen.go index 8450dd28437..e90757da362 100644 --- a/privateca/v1/privateca-gen.go +++ b/privateca/v1/privateca-gen.go @@ -2628,8 +2628,10 @@ type ReconciliationOperationMetadata struct { // DeleteResource: DEPRECATED. Use exclusive_action instead. DeleteResource bool `json:"deleteResource,omitempty"` + // ExclusiveAction: Excluisive action returned by the CLH. + // // Possible values: - // "UNKNOWN_REPAIR_ACTION" + // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. // "DELETE" - The resource has to be deleted. When using this bit, the // CLH should fail the operation. DEPRECATED. Instead use // DELETE_RESOURCE OperationSignal in SideChannel. For more information diff --git a/privateca/v1beta1/privateca-api.json b/privateca/v1beta1/privateca-api.json index 85e4471ab9b..de036eca402 100644 --- a/privateca/v1beta1/privateca-api.json +++ b/privateca/v1beta1/privateca-api.json @@ -1254,7 +1254,7 @@ } } }, - "revision": "20220825", + "revision": "20220915", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -2394,13 +2394,14 @@ "type": "boolean" }, "exclusiveAction": { + "description": "Excluisive action returned by the CLH.", "enum": [ "UNKNOWN_REPAIR_ACTION", "DELETE", "RETRY" ], "enumDescriptions": [ - "", + "Unknown repair action.", "The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel. For more information - go/ccfe-delete-on-upsert, go/ccfe-reconciliation-protocol-ug#apply_delete", "This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." ], diff --git a/privateca/v1beta1/privateca-gen.go b/privateca/v1beta1/privateca-gen.go index 6a7e7fc34a5..75c5e2dc36f 100644 --- a/privateca/v1beta1/privateca-gen.go +++ b/privateca/v1beta1/privateca-gen.go @@ -2195,8 +2195,10 @@ type ReconciliationOperationMetadata struct { // DeleteResource: DEPRECATED. Use exclusive_action instead. DeleteResource bool `json:"deleteResource,omitempty"` + // ExclusiveAction: Excluisive action returned by the CLH. + // // Possible values: - // "UNKNOWN_REPAIR_ACTION" + // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. // "DELETE" - The resource has to be deleted. When using this bit, the // CLH should fail the operation. DEPRECATED. Instead use // DELETE_RESOURCE OperationSignal in SideChannel. For more information diff --git a/realtimebidding/v1/realtimebidding-api.json b/realtimebidding/v1/realtimebidding-api.json index def324d66cf..1f4838af024 100644 --- a/realtimebidding/v1/realtimebidding-api.json +++ b/realtimebidding/v1/realtimebidding-api.json @@ -1305,7 +1305,7 @@ } } }, - "revision": "20220914", + "revision": "20220927", "rootUrl": "https://realtimebidding.googleapis.com/", "schemas": { "ActivatePretargetingConfigRequest": { @@ -1804,6 +1804,10 @@ "$ref": "NativeContent", "description": "A native creative." }, + "renderUrl": { + "description": "Experimental field that can be used during the [FLEDGE Origin Trial](/authorized-buyers/rtb/fledge-origin-trial). The URL to fetch an interest group ad used in [TURTLEDOVE on-device auction](https://github.com/WICG/turtledove/blob/main/FLEDGE.md#1-browsers-record-interest-groups\"). This should be unique among all creatives for a given `accountId`.", + "type": "string" + }, "restrictedCategories": { "description": "All restricted categories for the ads that may be shown from this creative.", "items": { diff --git a/realtimebidding/v1/realtimebidding-gen.go b/realtimebidding/v1/realtimebidding-gen.go index 1131ec5c5b1..782aefa18bb 100644 --- a/realtimebidding/v1/realtimebidding-gen.go +++ b/realtimebidding/v1/realtimebidding-gen.go @@ -958,6 +958,13 @@ type Creative struct { // Native: A native creative. Native *NativeContent `json:"native,omitempty"` + // RenderUrl: Experimental field that can be used during the FLEDGE + // Origin Trial (/authorized-buyers/rtb/fledge-origin-trial). The URL to + // fetch an interest group ad used in TURTLEDOVE on-device auction + // (https://github.com/WICG/turtledove/blob/main/FLEDGE.md#1-browsers-record-interest-groups"). + // This should be unique among all creatives for a given `accountId`. + RenderUrl string `json:"renderUrl,omitempty"` + // RestrictedCategories: All restricted categories for the ads that may // be shown from this creative. // diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 82f31f83a59..53da147a789 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -514,7 +514,7 @@ } } }, - "revision": "20220826", + "revision": "20220925", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -1104,7 +1104,7 @@ "type": "string" }, "hostname": { - "description": "The hostname of the page on which the token was generated.", + "description": "The hostname of the page on which the token was generated (Web keys only).", "type": "string" }, "invalidReason": { diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index c7017be084d..ab5ff688c94 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -1243,7 +1243,8 @@ type GoogleCloudRecaptchaenterpriseV1TokenProperties struct { // token. CreateTime string `json:"createTime,omitempty"` - // Hostname: The hostname of the page on which the token was generated. + // Hostname: The hostname of the page on which the token was generated + // (Web keys only). Hostname string `json:"hostname,omitempty"` // InvalidReason: Reason associated with the response when valid = diff --git a/recommender/v1/recommender-api.json b/recommender/v1/recommender-api.json index 8957d6e49d4..b3b22db76ca 100644 --- a/recommender/v1/recommender-api.json +++ b/recommender/v1/recommender-api.json @@ -110,6 +110,72 @@ "locations": { "resources": { "insightTypes": { + "methods": { + "getConfig": { + "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "GET", + "id": "recommender.billingAccounts.locations.insightTypes.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", + "location": "path", + "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "PATCH", + "id": "recommender.billingAccounts.locations.insightTypes.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + "location": "path", + "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insights": { "methods": { @@ -212,6 +278,72 @@ } }, "recommenders": { + "methods": { + "getConfig": { + "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", + "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "GET", + "id": "recommender.billingAccounts.locations.recommenders.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "location": "path", + "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates a Recommender Config. This will create a new revision of the config.", + "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "PATCH", + "id": "recommender.billingAccounts.locations.recommenders.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + "location": "path", + "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "recommendations": { "methods": { @@ -657,7 +789,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", "required": true, @@ -825,7 +957,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", "required": true, @@ -1057,7 +1189,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", "required": true, @@ -1225,7 +1357,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", "required": true, @@ -1442,7 +1574,7 @@ } } }, - "revision": "20220905", + "revision": "20220917", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1CostProjection": { diff --git a/recommender/v1/recommender-gen.go b/recommender/v1/recommender-gen.go index 1063113bb7b..c3c67cf11cc 100644 --- a/recommender/v1/recommender-gen.go +++ b/recommender/v1/recommender-gen.go @@ -1520,9 +1520,9 @@ func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "recommender.billingAccounts.locations.insightTypes.insights.get": +// method id "recommender.billingAccounts.locations.insightTypes.getConfig": -type BillingAccountsLocationsInsightTypesInsightsGetCall struct { +type BillingAccountsLocationsInsightTypesGetConfigCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1531,12 +1531,20 @@ type BillingAccountsLocationsInsightTypesInsightsGetCall struct { header_ http.Header } -// Get: Gets the requested insight. Requires the recommender.*.get IAM -// permission for the specified insight type. +// GetConfig: Gets the requested InsightTypeConfig. There is only one +// instance of the config for each InsightType. // -// - name: Name of the insight. -func (r *BillingAccountsLocationsInsightTypesInsightsService) Get(name string) *BillingAccountsLocationsInsightTypesInsightsGetCall { - c := &BillingAccountsLocationsInsightTypesInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the InsightTypeConfig to get. Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY +// PE_ID]/config` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]/config`. +func (r *BillingAccountsLocationsInsightTypesService) GetConfig(name string) *BillingAccountsLocationsInsightTypesGetConfigCall { + c := &BillingAccountsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -1544,7 +1552,7 @@ func (r *BillingAccountsLocationsInsightTypesInsightsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsGetCall { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesGetConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1554,7 +1562,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesInsightsGetCall { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesGetConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -1562,21 +1570,21 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsGetCall { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesGetConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Header() http.Header { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1602,14 +1610,16 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.billingAccounts.locations.insightTypes.insights.get" call. -// Exactly one of *GoogleCloudRecommenderV1Insight or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { +// Do executes the "recommender.billingAccounts.locations.insightTypes.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1628,7 +1638,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1Insight{ + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1640,10 +1650,706 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", - // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", + // "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", // "httpMethod": "GET", - // "id": "recommender.billingAccounts.locations.insightTypes.insights.get", + // "id": "recommender.billingAccounts.locations.insightTypes.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.billingAccounts.locations.insightTypes.updateConfig": + +type BillingAccountsLocationsInsightTypesUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateConfig: Updates an InsightTypeConfig change. This will create a +// new revision of the config. +// +// - name: Name of insight type config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT +// _TYPE_ID]/config. +func (r *BillingAccountsLocationsInsightTypesService) UpdateConfig(name string, googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c := &BillingAccountsLocationsInsightTypesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1insighttypeconfig = googlecloudrecommenderv1insighttypeconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) UpdateMask(updateMask string) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) ValidateOnly(validateOnly bool) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1insighttypeconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.billingAccounts.locations.insightTypes.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.billingAccounts.locations.insightTypes.updateConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // }, + // "response": { + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.billingAccounts.locations.insightTypes.insights.get": + +type BillingAccountsLocationsInsightTypesInsightsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the requested insight. Requires the recommender.*.get IAM +// permission for the specified insight type. +// +// - name: Name of the insight. +func (r *BillingAccountsLocationsInsightTypesInsightsService) Get(name string) *BillingAccountsLocationsInsightTypesInsightsGetCall { + c := &BillingAccountsLocationsInsightTypesInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesInsightsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.billingAccounts.locations.insightTypes.insights.get" call. +// Exactly one of *GoogleCloudRecommenderV1Insight or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1Insight{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", + // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", + // "httpMethod": "GET", + // "id": "recommender.billingAccounts.locations.insightTypes.insights.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the insight.", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1Insight" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.billingAccounts.locations.insightTypes.insights.list": + +type BillingAccountsLocationsInsightTypesInsightsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists insights for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified insight type. +// +// - parent: The container resource on which to execute the request. +// Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY +// PE_ID]` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]` * +// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE +// _ID]` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: +// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to +// supported insight types: +// https://cloud.google.com/recommender/docs/insights/insight-types. +func (r *BillingAccountsLocationsInsightTypesInsightsService) List(parent string) *BillingAccountsLocationsInsightTypesInsightsListCall { + c := &BillingAccountsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter expression to +// restrict the insights returned. Supported filter fields: * +// `stateInfo.state` * `insightSubtype` * `severity` Examples: * +// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * +// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR +// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL +// OR severity = HIGH)` (These expressions are based on the filter +// language described at https://google.aip.dev/160) +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Filter(filter string) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return from this request. Non-positive values are +// ignored. If not specified, the server will determine the number of +// results to return. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, +// retrieves the next batch of results from the preceding call to this +// method. `page_token` must be the value of `next_page_token` from the +// previous response. The values of other method parameters must be +// identical to those in the previous call. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/insights") + 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 "recommender.billingAccounts.locations.insightTypes.insights.list" call. +// Exactly one of *GoogleCloudRecommenderV1ListInsightsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1ListInsightsResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1ListInsightsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1ListInsightsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", + // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", + // "httpMethod": "GET", + // "id": "recommender.billingAccounts.locations.insightTypes.insights.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/insights", + // "response": { + // "$ref": "GoogleCloudRecommenderV1ListInsightsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommenderV1ListInsightsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "recommender.billingAccounts.locations.insightTypes.insights.markAccepted": + +type BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall struct { + s *Service + name string + googlecloudrecommenderv1markinsightacceptedrequest *GoogleCloudRecommenderV1MarkInsightAcceptedRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MarkAccepted: Marks the Insight State as Accepted. Users can use this +// method to indicate to the Recommender API that they have applied some +// action based on the insight. This stops the insight content from +// being updated. MarkInsightAccepted can be applied to insights in +// ACTIVE state. Requires the recommender.*.update IAM permission for +// the specified insight. +// +// - name: Name of the insight. +func (r *BillingAccountsLocationsInsightTypesInsightsService) MarkAccepted(name string, googlecloudrecommenderv1markinsightacceptedrequest *GoogleCloudRecommenderV1MarkInsightAcceptedRequest) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { + c := &BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1markinsightacceptedrequest = googlecloudrecommenderv1markinsightacceptedrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1markinsightacceptedrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:markAccepted") + 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 "recommender.billingAccounts.locations.insightTypes.insights.markAccepted" call. +// Exactly one of *GoogleCloudRecommenderV1Insight or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1Insight{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", + // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", + // "httpMethod": "POST", + // "id": "recommender.billingAccounts.locations.insightTypes.insights.markAccepted", // "parameterOrder": [ // "name" // ], @@ -1656,7 +2362,10 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googlea // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:markAccepted", + // "request": { + // "$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" + // }, // "response": { // "$ref": "GoogleCloudRecommenderV1Insight" // }, @@ -1667,77 +2376,40 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googlea } -// method id "recommender.billingAccounts.locations.insightTypes.insights.list": +// method id "recommender.billingAccounts.locations.recommenders.getConfig": -type BillingAccountsLocationsInsightTypesInsightsListCall struct { +type BillingAccountsLocationsRecommendersGetConfigCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists insights for the specified Cloud Resource. Requires the -// recommender.*.list IAM permission for the specified insight type. +// GetConfig: Gets the requested Recommender Config. There is only one +// instance of the config for each Recommender. // -// - parent: The container resource on which to execute the request. -// Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH -// T_TYPE_ID]` * -// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY -// PE_ID]` * -// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy -// pes/[INSIGHT_TYPE_ID]` * -// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE -// _ID]` * -// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ -// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: -// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to -// supported insight types: -// https://cloud.google.com/recommender/docs/insights/insight-types. -func (r *BillingAccountsLocationsInsightTypesInsightsService) List(parent string) *BillingAccountsLocationsInsightTypesInsightsListCall { - c := &BillingAccountsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter expression to -// restrict the insights returned. Supported filter fields: * -// `stateInfo.state` * `insightSubtype` * `severity` Examples: * -// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * -// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR -// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL -// OR severity = HIGH)` (These expressions are based on the filter -// language described at https://google.aip.dev/160) -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Filter(filter string) *BillingAccountsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return from this request. Non-positive values are -// ignored. If not specified, the server will determine the number of -// results to return. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *BillingAccountsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, -// retrieves the next batch of results from the preceding call to this -// method. `page_token` must be the value of `next_page_token` from the -// previous response. The values of other method parameters must be -// identical to those in the previous call. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *BillingAccountsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the Recommendation Config to get. Acceptable formats: +// * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMM +// ENDER_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE +// R_ID]/config` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ +// RECOMMENDER_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommend +// ers/[RECOMMENDER_ID]/config`. +func (r *BillingAccountsLocationsRecommendersService) GetConfig(name string) *BillingAccountsLocationsRecommendersGetConfigCall { + c := &BillingAccountsLocationsRecommendersGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsListCall { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsRecommendersGetConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1747,7 +2419,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesInsightsListCall { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsRecommendersGetConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -1755,21 +2427,21 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsListCall { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) Context(ctx context.Context) *BillingAccountsLocationsRecommendersGetConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Header() http.Header { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1782,7 +2454,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) 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/{+parent}/insights") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1790,21 +2462,21 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) 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 "recommender.billingAccounts.locations.insightTypes.insights.list" call. -// Exactly one of *GoogleCloudRecommenderV1ListInsightsResponse or error +// Do executes the "recommender.billingAccounts.locations.recommenders.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudRecommenderV1ListInsightsResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1ListInsightsResponse, error) { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1823,7 +2495,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1ListInsightsResponse{ + ret := &GoogleCloudRecommenderV1RecommenderConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1835,41 +2507,25 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Do(opts ...google } return ret, nil // { - // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", - // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", + // "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", + // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", // "httpMethod": "GET", - // "id": "recommender.billingAccounts.locations.insightTypes.insights.list", + // "id": "recommender.billingAccounts.locations.recommenders.getConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + // "name": { + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/insights", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudRecommenderV1ListInsightsResponse" + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1878,57 +2534,49 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) 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 *BillingAccountsLocationsInsightTypesInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommenderV1ListInsightsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} +// method id "recommender.billingAccounts.locations.recommenders.updateConfig": -// method id "recommender.billingAccounts.locations.insightTypes.insights.markAccepted": - -type BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall struct { - s *Service - name string - googlecloudrecommenderv1markinsightacceptedrequest *GoogleCloudRecommenderV1MarkInsightAcceptedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BillingAccountsLocationsRecommendersUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MarkAccepted: Marks the Insight State as Accepted. Users can use this -// method to indicate to the Recommender API that they have applied some -// action based on the insight. This stops the insight content from -// being updated. MarkInsightAccepted can be applied to insights in -// ACTIVE state. Requires the recommender.*.update IAM permission for -// the specified insight. +// UpdateConfig: Updates a Recommender Config. This will create a new +// revision of the config. // -// - name: Name of the insight. -func (r *BillingAccountsLocationsInsightTypesInsightsService) MarkAccepted(name string, googlecloudrecommenderv1markinsightacceptedrequest *GoogleCloudRecommenderV1MarkInsightAcceptedRequest) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { - c := &BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of recommender config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMME +// NDER_ID]/config. +func (r *BillingAccountsLocationsRecommendersService) UpdateConfig(name string, googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig) *BillingAccountsLocationsRecommendersUpdateConfigCall { + c := &BillingAccountsLocationsRecommendersUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudrecommenderv1markinsightacceptedrequest = googlecloudrecommenderv1markinsightacceptedrequest + c.googlecloudrecommenderv1recommenderconfig = googlecloudrecommenderv1recommenderconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) UpdateMask(updateMask string) *BillingAccountsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) ValidateOnly(validateOnly bool) *BillingAccountsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsRecommendersUpdateConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1936,21 +2584,21 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) Context(ctx context.Context) *BillingAccountsLocationsRecommendersUpdateConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Header() http.Header { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1958,16 +2606,16 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1markinsightacceptedrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1recommenderconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:markAccepted") + 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 } @@ -1978,14 +2626,16 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.billingAccounts.locations.insightTypes.insights.markAccepted" call. -// Exactly one of *GoogleCloudRecommenderV1Insight or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { +// Do executes the "recommender.billingAccounts.locations.recommenders.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2004,7 +2654,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1Insight{ + ret := &GoogleCloudRecommenderV1RecommenderConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2016,28 +2666,39 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts . } return ret, nil // { - // "description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", - // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", - // "httpMethod": "POST", - // "id": "recommender.billingAccounts.locations.insightTypes.insights.markAccepted", + // "description": "Updates a Recommender Config. This will create a new revision of the config.", + // "flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.billingAccounts.locations.recommenders.updateConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the insight.", + // "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+name}:markAccepted", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1Insight" + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4249,12 +4910,14 @@ type OrganizationsLocationsInsightTypesGetConfigCall struct { // instance of the config for each InsightType. // // - name: Name of the InsightTypeConfig to get. Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY // PE_ID]/config` * -// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I -// D]/config` * -// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI -// GHT_TYPE_ID]/config`. +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]/config`. func (r *OrganizationsLocationsInsightTypesService) GetConfig(name string) *OrganizationsLocationsInsightTypesGetConfigCall { c := &OrganizationsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4371,7 +5034,7 @@ func (c *OrganizationsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.C // ], // "parameters": { // "name": { - // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", // "required": true, @@ -5109,7 +5772,9 @@ type OrganizationsLocationsRecommendersGetConfigCall struct { // `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE // R_ID]/config` * // `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ -// RECOMMENDER_ID]/config`. +// RECOMMENDER_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommend +// ers/[RECOMMENDER_ID]/config`. func (r *OrganizationsLocationsRecommendersService) GetConfig(name string) *OrganizationsLocationsRecommendersGetConfigCall { c := &OrganizationsLocationsRecommendersGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5226,7 +5891,7 @@ func (c *OrganizationsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.C // ], // "parameters": { // "name": { - // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", // "required": true, @@ -6263,12 +6928,14 @@ type ProjectsLocationsInsightTypesGetConfigCall struct { // instance of the config for each InsightType. // // - name: Name of the InsightTypeConfig to get. Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY // PE_ID]/config` * -// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I -// D]/config` * -// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI -// GHT_TYPE_ID]/config`. +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]/config`. func (r *ProjectsLocationsInsightTypesService) GetConfig(name string) *ProjectsLocationsInsightTypesGetConfigCall { c := &ProjectsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6385,7 +7052,7 @@ func (c *ProjectsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "name": { - // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", // "required": true, @@ -7123,7 +7790,9 @@ type ProjectsLocationsRecommendersGetConfigCall struct { // `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE // R_ID]/config` * // `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ -// RECOMMENDER_ID]/config`. +// RECOMMENDER_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommend +// ers/[RECOMMENDER_ID]/config`. func (r *ProjectsLocationsRecommendersService) GetConfig(name string) *ProjectsLocationsRecommendersGetConfigCall { c := &ProjectsLocationsRecommendersGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7240,7 +7909,7 @@ func (c *ProjectsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "name": { - // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", // "required": true, diff --git a/recommender/v1beta1/recommender-api.json b/recommender/v1beta1/recommender-api.json index afdf07fe168..09aae2a1b3c 100644 --- a/recommender/v1beta1/recommender-api.json +++ b/recommender/v1beta1/recommender-api.json @@ -110,6 +110,72 @@ "locations": { "resources": { "insightTypes": { + "methods": { + "getConfig": { + "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "GET", + "id": "recommender.billingAccounts.locations.insightTypes.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", + "location": "path", + "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "PATCH", + "id": "recommender.billingAccounts.locations.insightTypes.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + "location": "path", + "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insights": { "methods": { @@ -212,6 +278,72 @@ } }, "recommenders": { + "methods": { + "getConfig": { + "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", + "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "GET", + "id": "recommender.billingAccounts.locations.recommenders.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "location": "path", + "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates a Recommender Config. This will create a new revision of the config.", + "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "PATCH", + "id": "recommender.billingAccounts.locations.recommenders.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + "location": "path", + "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "recommendations": { "methods": { @@ -657,7 +789,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", "required": true, @@ -825,7 +957,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", "required": true, @@ -1057,7 +1189,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", "required": true, @@ -1225,7 +1357,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", "required": true, @@ -1442,7 +1574,7 @@ } } }, - "revision": "20220905", + "revision": "20220917", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1beta1CostProjection": { @@ -1518,14 +1650,16 @@ "COST", "SECURITY", "PERFORMANCE", - "MANAGEABILITY" + "MANAGEABILITY", + "SUSTAINABILITY" ], "enumDescriptions": [ "Unspecified category.", "The insight is related to cost.", "The insight is related to security.", "The insight is related to performance.", - "This insight is related to manageability." + "This insight is related to manageability.", + "The insight is related to sustainability." ], "type": "string" }, diff --git a/recommender/v1beta1/recommender-gen.go b/recommender/v1beta1/recommender-gen.go index 3fbbe77a633..652307f7af8 100644 --- a/recommender/v1beta1/recommender-gen.go +++ b/recommender/v1beta1/recommender-gen.go @@ -524,6 +524,7 @@ type GoogleCloudRecommenderV1beta1Insight struct { // "SECURITY" - The insight is related to security. // "PERFORMANCE" - The insight is related to performance. // "MANAGEABILITY" - This insight is related to manageability. + // "SUSTAINABILITY" - The insight is related to sustainability. Category string `json:"category,omitempty"` // Content: A struct of custom fields to explain the insight. Example: @@ -1574,9 +1575,9 @@ func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "recommender.billingAccounts.locations.insightTypes.insights.get": +// method id "recommender.billingAccounts.locations.insightTypes.getConfig": -type BillingAccountsLocationsInsightTypesInsightsGetCall struct { +type BillingAccountsLocationsInsightTypesGetConfigCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1585,12 +1586,20 @@ type BillingAccountsLocationsInsightTypesInsightsGetCall struct { header_ http.Header } -// Get: Gets the requested insight. Requires the recommender.*.get IAM -// permission for the specified insight type. +// GetConfig: Gets the requested InsightTypeConfig. There is only one +// instance of the config for each InsightType. // -// - name: Name of the insight. -func (r *BillingAccountsLocationsInsightTypesInsightsService) Get(name string) *BillingAccountsLocationsInsightTypesInsightsGetCall { - c := &BillingAccountsLocationsInsightTypesInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the InsightTypeConfig to get. Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY +// PE_ID]/config` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]/config`. +func (r *BillingAccountsLocationsInsightTypesService) GetConfig(name string) *BillingAccountsLocationsInsightTypesGetConfigCall { + c := &BillingAccountsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -1598,7 +1607,7 @@ func (r *BillingAccountsLocationsInsightTypesInsightsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsGetCall { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesGetConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1608,7 +1617,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesInsightsGetCall { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesGetConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -1616,21 +1625,21 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsGetCall { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesGetConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Header() http.Header { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1656,7 +1665,706 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.billingAccounts.locations.insightTypes.insights.get" call. +// Do executes the "recommender.billingAccounts.locations.insightTypes.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1beta1InsightTypeConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1beta1InsightTypeConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1InsightTypeConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1beta1InsightTypeConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "GET", + // "id": "recommender.billingAccounts.locations.insightTypes.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.billingAccounts.locations.insightTypes.updateConfig": + +type BillingAccountsLocationsInsightTypesUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1beta1insighttypeconfig *GoogleCloudRecommenderV1beta1InsightTypeConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateConfig: Updates an InsightTypeConfig change. This will create a +// new revision of the config. +// +// - name: Name of insight type config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT +// _TYPE_ID]/config. +func (r *BillingAccountsLocationsInsightTypesService) UpdateConfig(name string, googlecloudrecommenderv1beta1insighttypeconfig *GoogleCloudRecommenderV1beta1InsightTypeConfig) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c := &BillingAccountsLocationsInsightTypesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1beta1insighttypeconfig = googlecloudrecommenderv1beta1insighttypeconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) UpdateMask(updateMask string) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) ValidateOnly(validateOnly bool) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesUpdateConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1beta1insighttypeconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.billingAccounts.locations.insightTypes.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1beta1InsightTypeConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1beta1InsightTypeConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1InsightTypeConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1beta1InsightTypeConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.billingAccounts.locations.insightTypes.updateConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" + // }, + // "response": { + // "$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.billingAccounts.locations.insightTypes.insights.get": + +type BillingAccountsLocationsInsightTypesInsightsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the requested insight. Requires the recommender.*.get IAM +// permission for the specified insight type. +// +// - name: Name of the insight. +func (r *BillingAccountsLocationsInsightTypesInsightsService) Get(name string) *BillingAccountsLocationsInsightTypesInsightsGetCall { + c := &BillingAccountsLocationsInsightTypesInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesInsightsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.billingAccounts.locations.insightTypes.insights.get" call. +// Exactly one of *GoogleCloudRecommenderV1beta1Insight or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRecommenderV1beta1Insight.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1Insight, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1beta1Insight{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", + // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", + // "httpMethod": "GET", + // "id": "recommender.billingAccounts.locations.insightTypes.insights.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the insight.", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1beta1Insight" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.billingAccounts.locations.insightTypes.insights.list": + +type BillingAccountsLocationsInsightTypesInsightsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists insights for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified insight type. +// +// - parent: The container resource on which to execute the request. +// Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY +// PE_ID]` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]` * +// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE +// _ID]` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: +// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to +// supported insight types: +// https://cloud.google.com/recommender/docs/insights/insight-types. +func (r *BillingAccountsLocationsInsightTypesInsightsService) List(parent string) *BillingAccountsLocationsInsightTypesInsightsListCall { + c := &BillingAccountsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter expression to +// restrict the insights returned. Supported filter fields: * +// `stateInfo.state` * `insightSubtype` * `severity` Examples: * +// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * +// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR +// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL +// OR severity = HIGH)` (These expressions are based on the filter +// language described at https://google.aip.dev/160) +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Filter(filter string) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return from this request. Non-positive values are +// ignored. If not specified, the server will determine the number of +// results to return. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, +// retrieves the next batch of results from the preceding call to this +// method. `page_token` must be the value of `next_page_token` from the +// previous response. The values of other method parameters must be +// identical to those in the previous call. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/insights") + 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 "recommender.billingAccounts.locations.insightTypes.insights.list" call. +// Exactly one of *GoogleCloudRecommenderV1beta1ListInsightsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1beta1ListInsightsResponse.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 *BillingAccountsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1ListInsightsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1beta1ListInsightsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", + // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", + // "httpMethod": "GET", + // "id": "recommender.billingAccounts.locations.insightTypes.insights.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/insights", + // "response": { + // "$ref": "GoogleCloudRecommenderV1beta1ListInsightsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommenderV1beta1ListInsightsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "recommender.billingAccounts.locations.insightTypes.insights.markAccepted": + +type BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall struct { + s *Service + name string + googlecloudrecommenderv1beta1markinsightacceptedrequest *GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MarkAccepted: Marks the Insight State as Accepted. Users can use this +// method to indicate to the Recommender API that they have applied some +// action based on the insight. This stops the insight content from +// being updated. MarkInsightAccepted can be applied to insights in +// ACTIVE state. Requires the recommender.*.update IAM permission for +// the specified insight. +// +// - name: Name of the insight. +func (r *BillingAccountsLocationsInsightTypesInsightsService) MarkAccepted(name string, googlecloudrecommenderv1beta1markinsightacceptedrequest *GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { + c := &BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1beta1markinsightacceptedrequest = googlecloudrecommenderv1beta1markinsightacceptedrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1beta1markinsightacceptedrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:markAccepted") + 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 "recommender.billingAccounts.locations.insightTypes.insights.markAccepted" call. // Exactly one of *GoogleCloudRecommenderV1beta1Insight or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GoogleCloudRecommenderV1beta1Insight.ServerResponse.Header or @@ -1664,7 +2372,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) doRequest(alt stri // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1Insight, error) { +func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1Insight, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1695,10 +2403,10 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", - // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", - // "httpMethod": "GET", - // "id": "recommender.billingAccounts.locations.insightTypes.insights.get", + // "description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", + // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", + // "httpMethod": "POST", + // "id": "recommender.billingAccounts.locations.insightTypes.insights.markAccepted", // "parameterOrder": [ // "name" // ], @@ -1711,7 +2419,10 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googlea // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+name}:markAccepted", + // "request": { + // "$ref": "GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest" + // }, // "response": { // "$ref": "GoogleCloudRecommenderV1beta1Insight" // }, @@ -1722,77 +2433,40 @@ func (c *BillingAccountsLocationsInsightTypesInsightsGetCall) Do(opts ...googlea } -// method id "recommender.billingAccounts.locations.insightTypes.insights.list": +// method id "recommender.billingAccounts.locations.recommenders.getConfig": -type BillingAccountsLocationsInsightTypesInsightsListCall struct { +type BillingAccountsLocationsRecommendersGetConfigCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists insights for the specified Cloud Resource. Requires the -// recommender.*.list IAM permission for the specified insight type. +// GetConfig: Gets the requested Recommender Config. There is only one +// instance of the config for each Recommender. // -// - parent: The container resource on which to execute the request. -// Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH -// T_TYPE_ID]` * -// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY -// PE_ID]` * -// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy -// pes/[INSIGHT_TYPE_ID]` * -// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE -// _ID]` * -// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ -// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: -// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to -// supported insight types: -// https://cloud.google.com/recommender/docs/insights/insight-types. -func (r *BillingAccountsLocationsInsightTypesInsightsService) List(parent string) *BillingAccountsLocationsInsightTypesInsightsListCall { - c := &BillingAccountsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter expression to -// restrict the insights returned. Supported filter fields: * -// `stateInfo.state` * `insightSubtype` * `severity` Examples: * -// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * -// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR -// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL -// OR severity = HIGH)` (These expressions are based on the filter -// language described at https://google.aip.dev/160) -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Filter(filter string) *BillingAccountsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return from this request. Non-positive values are -// ignored. If not specified, the server will determine the number of -// results to return. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *BillingAccountsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, -// retrieves the next batch of results from the preceding call to this -// method. `page_token` must be the value of `next_page_token` from the -// previous response. The values of other method parameters must be -// identical to those in the previous call. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *BillingAccountsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the Recommendation Config to get. Acceptable formats: +// * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMM +// ENDER_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE +// R_ID]/config` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ +// RECOMMENDER_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommend +// ers/[RECOMMENDER_ID]/config`. +func (r *BillingAccountsLocationsRecommendersService) GetConfig(name string) *BillingAccountsLocationsRecommendersGetConfigCall { + c := &BillingAccountsLocationsRecommendersGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsListCall { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsRecommendersGetConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1802,7 +2476,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsInsightTypesInsightsListCall { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) IfNoneMatch(entityTag string) *BillingAccountsLocationsRecommendersGetConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -1810,21 +2484,21 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsListCall { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) Context(ctx context.Context) *BillingAccountsLocationsRecommendersGetConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Header() http.Header { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1837,7 +2511,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) 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/{+parent}/insights") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1845,21 +2519,21 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) 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 "recommender.billingAccounts.locations.insightTypes.insights.list" call. -// Exactly one of *GoogleCloudRecommenderV1beta1ListInsightsResponse or +// Do executes the "recommender.billingAccounts.locations.recommenders.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1beta1RecommenderConfig or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudRecommenderV1beta1ListInsightsResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudRecommenderV1beta1RecommenderConfig.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1ListInsightsResponse, error) { +func (c *BillingAccountsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1RecommenderConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1878,7 +2552,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1beta1ListInsightsResponse{ + ret := &GoogleCloudRecommenderV1beta1RecommenderConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1890,41 +2564,25 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) Do(opts ...google } return ret, nil // { - // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", - // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", + // "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", + // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", // "httpMethod": "GET", - // "id": "recommender.billingAccounts.locations.insightTypes.insights.list", + // "id": "recommender.billingAccounts.locations.recommenders.getConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + // "name": { + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/insights", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "GoogleCloudRecommenderV1beta1ListInsightsResponse" + // "$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1933,57 +2591,49 @@ func (c *BillingAccountsLocationsInsightTypesInsightsListCall) 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 *BillingAccountsLocationsInsightTypesInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommenderV1beta1ListInsightsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "recommender.billingAccounts.locations.insightTypes.insights.markAccepted": +// method id "recommender.billingAccounts.locations.recommenders.updateConfig": -type BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall struct { - s *Service - name string - googlecloudrecommenderv1beta1markinsightacceptedrequest *GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BillingAccountsLocationsRecommendersUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1beta1recommenderconfig *GoogleCloudRecommenderV1beta1RecommenderConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MarkAccepted: Marks the Insight State as Accepted. Users can use this -// method to indicate to the Recommender API that they have applied some -// action based on the insight. This stops the insight content from -// being updated. MarkInsightAccepted can be applied to insights in -// ACTIVE state. Requires the recommender.*.update IAM permission for -// the specified insight. +// UpdateConfig: Updates a Recommender Config. This will create a new +// revision of the config. // -// - name: Name of the insight. -func (r *BillingAccountsLocationsInsightTypesInsightsService) MarkAccepted(name string, googlecloudrecommenderv1beta1markinsightacceptedrequest *GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { - c := &BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of recommender config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMME +// NDER_ID]/config. +func (r *BillingAccountsLocationsRecommendersService) UpdateConfig(name string, googlecloudrecommenderv1beta1recommenderconfig *GoogleCloudRecommenderV1beta1RecommenderConfig) *BillingAccountsLocationsRecommendersUpdateConfigCall { + c := &BillingAccountsLocationsRecommendersUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudrecommenderv1beta1markinsightacceptedrequest = googlecloudrecommenderv1beta1markinsightacceptedrequest + c.googlecloudrecommenderv1beta1recommenderconfig = googlecloudrecommenderv1beta1recommenderconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) UpdateMask(updateMask string) *BillingAccountsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) ValidateOnly(validateOnly bool) *BillingAccountsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) Fields(s ...googleapi.Field) *BillingAccountsLocationsRecommendersUpdateConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1991,21 +2641,21 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Context(ctx context.Context) *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) Context(ctx context.Context) *BillingAccountsLocationsRecommendersUpdateConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Header() http.Header { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2013,16 +2663,16 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1beta1markinsightacceptedrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1beta1recommenderconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:markAccepted") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 } @@ -2033,15 +2683,16 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.billingAccounts.locations.insightTypes.insights.markAccepted" call. -// Exactly one of *GoogleCloudRecommenderV1beta1Insight or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudRecommenderV1beta1Insight.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "recommender.billingAccounts.locations.recommenders.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1beta1RecommenderConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1beta1RecommenderConfig.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1Insight, error) { +func (c *BillingAccountsLocationsRecommendersUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1beta1RecommenderConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2060,7 +2711,7 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1beta1Insight{ + ret := &GoogleCloudRecommenderV1beta1RecommenderConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2072,28 +2723,39 @@ func (c *BillingAccountsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts . } return ret, nil // { - // "description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", - // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", - // "httpMethod": "POST", - // "id": "recommender.billingAccounts.locations.insightTypes.insights.markAccepted", + // "description": "Updates a Recommender Config. This will create a new revision of the config.", + // "flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.billingAccounts.locations.recommenders.updateConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the insight.", + // "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1beta1/{+name}:markAccepted", + // "path": "v1beta1/{+name}", // "request": { - // "$ref": "GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest" + // "$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1beta1Insight" + // "$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4315,12 +4977,14 @@ type OrganizationsLocationsInsightTypesGetConfigCall struct { // instance of the config for each InsightType. // // - name: Name of the InsightTypeConfig to get. Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY // PE_ID]/config` * -// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I -// D]/config` * -// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI -// GHT_TYPE_ID]/config`. +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]/config`. func (r *OrganizationsLocationsInsightTypesService) GetConfig(name string) *OrganizationsLocationsInsightTypesGetConfigCall { c := &OrganizationsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4437,7 +5101,7 @@ func (c *OrganizationsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.C // ], // "parameters": { // "name": { - // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", // "required": true, @@ -5177,7 +5841,9 @@ type OrganizationsLocationsRecommendersGetConfigCall struct { // `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE // R_ID]/config` * // `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ -// RECOMMENDER_ID]/config`. +// RECOMMENDER_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommend +// ers/[RECOMMENDER_ID]/config`. func (r *OrganizationsLocationsRecommendersService) GetConfig(name string) *OrganizationsLocationsRecommendersGetConfigCall { c := &OrganizationsLocationsRecommendersGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -5294,7 +5960,7 @@ func (c *OrganizationsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.C // ], // "parameters": { // "name": { - // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", // "required": true, @@ -6335,12 +7001,14 @@ type ProjectsLocationsInsightTypesGetConfigCall struct { // instance of the config for each InsightType. // // - name: Name of the InsightTypeConfig to get. Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY // PE_ID]/config` * -// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I -// D]/config` * -// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI -// GHT_TYPE_ID]/config`. +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]/config`. func (r *ProjectsLocationsInsightTypesService) GetConfig(name string) *ProjectsLocationsInsightTypesGetConfigCall { c := &ProjectsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6457,7 +7125,7 @@ func (c *ProjectsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "name": { - // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", // "required": true, @@ -7197,7 +7865,9 @@ type ProjectsLocationsRecommendersGetConfigCall struct { // `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE // R_ID]/config` * // `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ -// RECOMMENDER_ID]/config`. +// RECOMMENDER_ID]/config` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommend +// ers/[RECOMMENDER_ID]/config`. func (r *ProjectsLocationsRecommendersService) GetConfig(name string) *ProjectsLocationsRecommendersGetConfigCall { c := &ProjectsLocationsRecommendersGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7314,7 +7984,7 @@ func (c *ProjectsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "name": { - // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", // "required": true, diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 768819f44ee..4242836732f 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -1770,7 +1770,7 @@ } } }, - "revision": "20220909", + "revision": "20220917", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2892,7 +2892,7 @@ "id": "GoogleCloudRetailV2PredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return *no* results. If instead you want empty result sets to return generic (unfiltered) popular products, set `strictFiltering` to False in `PredictRequest.params`. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", "type": "string" }, "labels": { @@ -5012,7 +5012,7 @@ "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", "properties": { "candidates": { - "description": "Required. The candidates to consider on the panel. Limit = 10.", + "description": "Required. The candidates to consider on the panel.", "items": { "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" }, @@ -5265,6 +5265,17 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaCreateModelMetadata": { + "description": "Metadata associated with a create operation.", + "id": "GoogleCloudRetailV2betaCreateModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaExportErrorsConfig": { "description": "Configuration of destination for Export related errors.", "id": "GoogleCloudRetailV2betaExportErrorsConfig", @@ -5437,6 +5448,150 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaModel": { + "description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", + "id": "GoogleCloudRetailV2betaModel", + "properties": { + "createTime": { + "description": "Output only. Timestamp the Recommendation Model was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataState": { + "description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The model has sufficient training data.", + "The model does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "filteringOption": { + "description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", + "enum": [ + "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", + "RECOMMENDATIONS_FILTERING_DISABLED", + "RECOMMENDATIONS_FILTERING_ENABLED" + ], + "enumDescriptions": [ + "Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", + "Recommendation filtering is disabled.", + "Recommendation filtering is enabled." + ], + "type": "string" + }, + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", + "type": "string" + }, + "optimizationObjective": { + "description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr` `frequently-bought-together` =\u003e `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", + "type": "string" + }, + "periodicTuningState": { + "description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", + "enum": [ + "PERIODIC_TUNING_STATE_UNSPECIFIED", + "PERIODIC_TUNING_DISABLED", + "ALL_TUNING_DISABLED", + "PERIODIC_TUNING_ENABLED" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", + "The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", + "The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." + ], + "type": "string" + }, + "servingConfigLists": { + "description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", + "items": { + "$ref": "GoogleCloudRetailV2betaModelServingConfigList" + }, + "readOnly": true, + "type": "array" + }, + "servingState": { + "description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The model is not serving.", + "The model is serving and can be queried.", + "The model is trained on tuned hyperparameters and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "trainingState": { + "description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The model training is paused.", + "The model is training." + ], + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaModelServingConfigList": { + "description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", + "id": "GoogleCloudRetailV2betaModelServingConfigList", + "properties": { + "servingConfigIds": { + "description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaOutputResult": { "description": "Output result.", "id": "GoogleCloudRetailV2betaOutputResult", @@ -5523,6 +5678,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2betaTuneModelMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudRetailV2betaTuneModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaTuneModelResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudRetailV2betaTuneModelResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudRetailV2betaUserEventImportSummary": { "description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", "id": "GoogleCloudRetailV2betaUserEventImportSummary", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 70f41f67fd9..c16b919c8ec 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -2490,16 +2490,16 @@ type GoogleCloudRetailV2PredictRequest struct { // OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" // tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems If your filter blocks all prediction results, - // the API will return generic (unfiltered) popular products. If you - // only want results strictly matching the filters, set - // `strictFiltering` to True in `PredictRequest.params` to receive empty - // results instead. Note that the API will never return items with - // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. - // If `filterSyntaxV2` is set to true under the `params` field, then - // attribute-based expressions are expected instead of the above - // described tag-based syntax. Examples: * (colors: ANY("Red", "Blue")) - // AND NOT (categories: ANY("Phones")) * (availability: ANY("IN_STOCK")) - // AND (colors: ANY("Red") OR categories: ANY("Phones")) + // the API will return *no* results. If instead you want empty result + // sets to return generic (unfiltered) popular products, set + // `strictFiltering` to False in `PredictRequest.params`. Note that the + // API will never return items with storageStatus of "EXPIRED" or + // "DELETED" regardless of filter choices. If `filterSyntaxV2` is set to + // true under the `params` field, then attribute-based expressions are + // expected instead of the above described tag-based syntax. Examples: * + // (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) * + // (availability: ANY("IN_STOCK")) AND (colors: ANY("Red") OR + // categories: ANY("Phones")) Filter string `json:"filter,omitempty"` // Labels: The labels applied to a resource must meet the following @@ -6616,8 +6616,7 @@ func (s *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate) MarshalJS // GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel: An // individual panel with a list of ServingConfigs to consider for it. type GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel struct { - // Candidates: Required. The candidates to consider on the panel. Limit - // = 10. + // Candidates: Required. The candidates to consider on the panel. Candidates []*GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"candidates,omitempty"` // DefaultCandidate: Required. The default candidate. If the model fails @@ -7075,6 +7074,38 @@ func (s *GoogleCloudRetailV2betaBigQueryOutputResult) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaCreateModelMetadata: Metadata associated with +// a create operation. +type GoogleCloudRetailV2betaCreateModelMetadata struct { + // Model: The resource name of the model that this create applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_i + // d}/models/{model_id}` + Model string `json:"model,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaCreateModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCreateModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaExportErrorsConfig: Configuration of // destination for Export related errors. type GoogleCloudRetailV2betaExportErrorsConfig struct { @@ -7414,6 +7445,201 @@ func (s *GoogleCloudRetailV2betaImportUserEventsResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaModel: Metadata that describes the training +// and serving parameters of a Model. A Model can be associated with a +// ServingConfig and then queried through the Predict API. +type GoogleCloudRetailV2betaModel struct { + // CreateTime: Output only. Timestamp the Recommendation Model was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataState: Output only. The state of data requirements for this + // model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be + // trained if the data is in `DATA_ERROR` state. Recommendation model + // can have `DATA_ERROR` state even if serving state is `ACTIVE`: models + // were trained successfully before, but cannot be refreshed because + // model no longer has sufficient data for training. + // + // Possible values: + // "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never + // be explicitly set. + // "DATA_OK" - The model has sufficient training data. + // "DATA_ERROR" - The model does not have sufficient training data. + // Error messages can be queried via Stackdriver. + DataState string `json:"dataState,omitempty"` + + // DisplayName: Required. The display name of the model. Should be human + // readable, used to display Recommendation Models in the Retail Cloud + // Console Dashboard. UTF-8 encoded string with limit of 1024 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // FilteringOption: Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, + // recommendation filtering by attributes is enabled for the model. + // + // Possible values: + // "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED" - Value used when + // unset. In this case, server behavior defaults to + // RECOMMENDATIONS_FILTERING_DISABLED. + // "RECOMMENDATIONS_FILTERING_DISABLED" - Recommendation filtering is + // disabled. + // "RECOMMENDATIONS_FILTERING_ENABLED" - Recommendation filtering is + // enabled. + FilteringOption string `json:"filteringOption,omitempty"` + + // LastTuneTime: Output only. The timestamp when the latest successful + // tune finished. + LastTuneTime string `json:"lastTuneTime,omitempty"` + + // Name: Required. The fully qualified resource name of the model. + // Format: + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_i + // d}/models/{model_id}` catalog_id has char limit of 50. + // recommendation_model_id has char limit of 40. + Name string `json:"name,omitempty"` + + // OptimizationObjective: Optional. The optimization objective e.g. + // `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. + // If not specified, we choose default based on model type. Default + // depends on type of recommendation: `recommended-for-you` => `ctr` + // `others-you-may-like` => `ctr` `frequently-bought-together` => + // `revenue_per_order` This field together with optimization_objective + // describe model metadata to use to control model training and serving. + // See https://cloud.google.com/retail/docs/models for more details on + // what the model metadata control and which combination of parameters + // are valid. For invalid combinations of parameters (e.g. type = + // `frequently-bought-together` and optimization_objective = `ctr`), you + // receive an error 400 if you try to create/update a recommendation + // with this set of knobs. + OptimizationObjective string `json:"optimizationObjective,omitempty"` + + // PeriodicTuningState: Optional. The state of periodic tuning. The + // period we use is 3 months - to do a one-off tune earlier use the + // `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`. + // + // Possible values: + // "PERIODIC_TUNING_STATE_UNSPECIFIED" - Unspecified default value, + // should never be explicitly set. + // "PERIODIC_TUNING_DISABLED" - The model has periodic tuning + // disabled. Tuning can be reenabled by calling the + // `EnableModelPeriodicTuning` method or by calling the `TuneModel` + // method. + // "ALL_TUNING_DISABLED" - The model cannot be tuned with periodic + // tuning OR the `TuneModel` method. Hide the options in customer UI and + // reject any requests through the backend self serve API. + // "PERIODIC_TUNING_ENABLED" - The model has periodic tuning enabled. + // Tuning can be disabled by calling the `DisableModelPeriodicTuning` + // method. + PeriodicTuningState string `json:"periodicTuningState,omitempty"` + + // ServingConfigLists: Output only. The list of valid serving configs + // associated with the PageOptimizationConfig. + ServingConfigLists []*GoogleCloudRetailV2betaModelServingConfigList `json:"servingConfigLists,omitempty"` + + // ServingState: Output only. The serving state of the model: `ACTIVE`, + // `NOT_ACTIVE`. + // + // Possible values: + // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. + // "INACTIVE" - The model is not serving. + // "ACTIVE" - The model is serving and can be queried. + // "TUNED" - The model is trained on tuned hyperparameters and can be + // queried. + ServingState string `json:"servingState,omitempty"` + + // TrainingState: Optional. The training state that the model is in + // (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the + // service is frequency of training - this can be used to determine when + // to train model in order to control cost. If not specified: the + // default value for `CreateModel` method is `TRAINING`. The default + // value for `UpdateModel` method is to keep the state the same as + // before. + // + // Possible values: + // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. + // "PAUSED" - The model training is paused. + // "TRAINING" - The model is training. + TrainingState string `json:"trainingState,omitempty"` + + // TuningOperation: Output only. The tune operation associated with the + // model. Can be used to determine if there is an ongoing tune for this + // recommendation. Empty field implies no tune is goig on. + TuningOperation string `json:"tuningOperation,omitempty"` + + // Type: Required. The type of model e.g. `home-page`. Currently + // supported values: `recommended-for-you`, `others-you-may-like`, + // `frequently-bought-together`, `page-optimization`, `similar-items`, + // `buy-it-again`, and `recently-viewed`(readonly value). This field + // together with optimization_objective describe model metadata to use + // to control model training and serving. See + // https://cloud.google.com/retail/docs/models for more details on what + // the model metadata control and which combination of parameters are + // valid. For invalid combinations of parameters (e.g. type = + // `frequently-bought-together` and optimization_objective = `ctr`), you + // receive an error 400 if you try to create/update a recommendation + // with this set of knobs. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Model was last + // updated. E.g. if a Recommendation Model was paused - this would be + // the time the pause was initiated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaModel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaModelServingConfigList: Represents an ordered +// combination of valid serving configs, which can be used for +// `PAGE_OPTIMIZATION` recommendations. +type GoogleCloudRetailV2betaModelServingConfigList struct { + // ServingConfigIds: Optional. A set of valid serving configs that may + // be used for `PAGE_OPTIMIZATION`. + ServingConfigIds []string `json:"servingConfigIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServingConfigIds") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServingConfigIds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaModelServingConfigList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaModelServingConfigList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaOutputResult: Output result. type GoogleCloudRetailV2betaOutputResult struct { // BigqueryResult: Export result in BigQuery. @@ -7560,6 +7786,43 @@ type GoogleCloudRetailV2betaSetInventoryMetadata struct { type GoogleCloudRetailV2betaSetInventoryResponse struct { } +// GoogleCloudRetailV2betaTuneModelMetadata: Metadata associated with a +// tune operation. +type GoogleCloudRetailV2betaTuneModelMetadata struct { + // Model: The resource name of the model that this tune applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_i + // d}/models/{model_id}` + Model string `json:"model,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaTuneModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaTuneModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaTuneModelResponse: Response associated with a +// tune operation. +type GoogleCloudRetailV2betaTuneModelResponse struct { +} + // GoogleCloudRetailV2betaUserEventImportSummary: A summary of import // result. The UserEventImportSummary summarizes the import status for // user events. diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 48e10f8d600..a44d01f4524 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2080,7 +2080,7 @@ } } }, - "revision": "20220909", + "revision": "20220917", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3610,6 +3610,22 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaMerchantCenterFeedFilter": { + "description": "Merchant Center Feed filter criterrion.", + "id": "GoogleCloudRetailV2alphaMerchantCenterFeedFilter", + "properties": { + "primaryFeedId": { + "description": "Merchant Center primary feed id.", + "format": "int64", + "type": "string" + }, + "primaryFeedName": { + "description": "Merchant Center primary feed name. The name is used for the display purposes only.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaMerchantCenterLink": { "description": "Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.", "id": "GoogleCloudRetailV2alphaMerchantCenterLink", @@ -3625,6 +3641,13 @@ }, "type": "array" }, + "feeds": { + "description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", + "items": { + "$ref": "GoogleCloudRetailV2alphaMerchantCenterFeedFilter" + }, + "type": "array" + }, "languageCode": { "description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: `en`.", "type": "string" @@ -3841,7 +3864,7 @@ "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", "properties": { "candidates": { - "description": "Required. The candidates to consider on the panel. Limit = 10.", + "description": "Required. The candidates to consider on the panel.", "items": { "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" }, @@ -3897,7 +3920,7 @@ "id": "GoogleCloudRetailV2alphaPredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return *no* results. If instead you want empty result sets to return generic (unfiltered) popular products, set `strictFiltering` to False in `PredictRequest.params`. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", "type": "string" }, "labels": { @@ -5769,6 +5792,17 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaCreateModelMetadata": { + "description": "Metadata associated with a create operation.", + "id": "GoogleCloudRetailV2betaCreateModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaExportErrorsConfig": { "description": "Configuration of destination for Export related errors.", "id": "GoogleCloudRetailV2betaExportErrorsConfig", @@ -5941,6 +5975,150 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaModel": { + "description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", + "id": "GoogleCloudRetailV2betaModel", + "properties": { + "createTime": { + "description": "Output only. Timestamp the Recommendation Model was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataState": { + "description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The model has sufficient training data.", + "The model does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "filteringOption": { + "description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", + "enum": [ + "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", + "RECOMMENDATIONS_FILTERING_DISABLED", + "RECOMMENDATIONS_FILTERING_ENABLED" + ], + "enumDescriptions": [ + "Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", + "Recommendation filtering is disabled.", + "Recommendation filtering is enabled." + ], + "type": "string" + }, + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", + "type": "string" + }, + "optimizationObjective": { + "description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr` `frequently-bought-together` =\u003e `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", + "type": "string" + }, + "periodicTuningState": { + "description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", + "enum": [ + "PERIODIC_TUNING_STATE_UNSPECIFIED", + "PERIODIC_TUNING_DISABLED", + "ALL_TUNING_DISABLED", + "PERIODIC_TUNING_ENABLED" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", + "The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", + "The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." + ], + "type": "string" + }, + "servingConfigLists": { + "description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", + "items": { + "$ref": "GoogleCloudRetailV2betaModelServingConfigList" + }, + "readOnly": true, + "type": "array" + }, + "servingState": { + "description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The model is not serving.", + "The model is serving and can be queried.", + "The model is trained on tuned hyperparameters and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "trainingState": { + "description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The model training is paused.", + "The model is training." + ], + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaModelServingConfigList": { + "description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", + "id": "GoogleCloudRetailV2betaModelServingConfigList", + "properties": { + "servingConfigIds": { + "description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaOutputResult": { "description": "Output result.", "id": "GoogleCloudRetailV2betaOutputResult", @@ -6027,6 +6205,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2betaTuneModelMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudRetailV2betaTuneModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaTuneModelResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudRetailV2betaTuneModelResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudRetailV2betaUserEventImportSummary": { "description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", "id": "GoogleCloudRetailV2betaUserEventImportSummary", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index cb0e8e62c07..4f9fb79d30a 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -3270,6 +3270,39 @@ func (s *GoogleCloudRetailV2alphaLocalInventory) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaMerchantCenterFeedFilter: Merchant Center +// Feed filter criterrion. +type GoogleCloudRetailV2alphaMerchantCenterFeedFilter struct { + // PrimaryFeedId: Merchant Center primary feed id. + PrimaryFeedId int64 `json:"primaryFeedId,omitempty,string"` + + // PrimaryFeedName: Merchant Center primary feed name. The name is used + // for the display purposes only. + PrimaryFeedName string `json:"primaryFeedName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrimaryFeedId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PrimaryFeedId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaMerchantCenterFeedFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaMerchantCenterFeedFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaMerchantCenterLink: Represents a link between // a Merchant Center account and a branch. Once a link is established, // products from the linked merchant center account will be streamed to @@ -3292,6 +3325,11 @@ type GoogleCloudRetailV2alphaMerchantCenterLink struct { // case sensitive. Destinations []string `json:"destinations,omitempty"` + // Feeds: Criteria for the Merchant Center feeds to be ingested via the + // link. All offers will be ingested if the list is empty. Otherwise the + // offers will be ingested from selected feeds. + Feeds []*GoogleCloudRetailV2alphaMerchantCenterFeedFilter `json:"feeds,omitempty"` + // LanguageCode: Language of the title/description and other string // attributes. Use language tags defined by BCP 47 // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This @@ -3682,8 +3720,7 @@ func (s *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate) MarshalJS // GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel: An // individual panel with a list of ServingConfigs to consider for it. type GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel struct { - // Candidates: Required. The candidates to consider on the panel. Limit - // = 10. + // Candidates: Required. The candidates to consider on the panel. Candidates []*GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"candidates,omitempty"` // DefaultCandidate: Required. The default candidate. If the model fails @@ -3799,16 +3836,16 @@ type GoogleCloudRetailV2alphaPredictRequest struct { // OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" // tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems If your filter blocks all prediction results, - // the API will return generic (unfiltered) popular products. If you - // only want results strictly matching the filters, set - // `strictFiltering` to True in `PredictRequest.params` to receive empty - // results instead. Note that the API will never return items with - // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. - // If `filterSyntaxV2` is set to true under the `params` field, then - // attribute-based expressions are expected instead of the above - // described tag-based syntax. Examples: * (colors: ANY("Red", "Blue")) - // AND NOT (categories: ANY("Phones")) * (availability: ANY("IN_STOCK")) - // AND (colors: ANY("Red") OR categories: ANY("Phones")) + // the API will return *no* results. If instead you want empty result + // sets to return generic (unfiltered) popular products, set + // `strictFiltering` to False in `PredictRequest.params`. Note that the + // API will never return items with storageStatus of "EXPIRED" or + // "DELETED" regardless of filter choices. If `filterSyntaxV2` is set to + // true under the `params` field, then attribute-based expressions are + // expected instead of the above described tag-based syntax. Examples: * + // (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) * + // (availability: ANY("IN_STOCK")) AND (colors: ANY("Red") OR + // categories: ANY("Phones")) Filter string `json:"filter,omitempty"` // Labels: The labels applied to a resource must meet the following @@ -7467,6 +7504,38 @@ func (s *GoogleCloudRetailV2betaBigQueryOutputResult) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaCreateModelMetadata: Metadata associated with +// a create operation. +type GoogleCloudRetailV2betaCreateModelMetadata struct { + // Model: The resource name of the model that this create applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_i + // d}/models/{model_id}` + Model string `json:"model,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaCreateModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCreateModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaExportErrorsConfig: Configuration of // destination for Export related errors. type GoogleCloudRetailV2betaExportErrorsConfig struct { @@ -7806,6 +7875,201 @@ func (s *GoogleCloudRetailV2betaImportUserEventsResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaModel: Metadata that describes the training +// and serving parameters of a Model. A Model can be associated with a +// ServingConfig and then queried through the Predict API. +type GoogleCloudRetailV2betaModel struct { + // CreateTime: Output only. Timestamp the Recommendation Model was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataState: Output only. The state of data requirements for this + // model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be + // trained if the data is in `DATA_ERROR` state. Recommendation model + // can have `DATA_ERROR` state even if serving state is `ACTIVE`: models + // were trained successfully before, but cannot be refreshed because + // model no longer has sufficient data for training. + // + // Possible values: + // "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never + // be explicitly set. + // "DATA_OK" - The model has sufficient training data. + // "DATA_ERROR" - The model does not have sufficient training data. + // Error messages can be queried via Stackdriver. + DataState string `json:"dataState,omitempty"` + + // DisplayName: Required. The display name of the model. Should be human + // readable, used to display Recommendation Models in the Retail Cloud + // Console Dashboard. UTF-8 encoded string with limit of 1024 + // characters. + DisplayName string `json:"displayName,omitempty"` + + // FilteringOption: Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, + // recommendation filtering by attributes is enabled for the model. + // + // Possible values: + // "RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED" - Value used when + // unset. In this case, server behavior defaults to + // RECOMMENDATIONS_FILTERING_DISABLED. + // "RECOMMENDATIONS_FILTERING_DISABLED" - Recommendation filtering is + // disabled. + // "RECOMMENDATIONS_FILTERING_ENABLED" - Recommendation filtering is + // enabled. + FilteringOption string `json:"filteringOption,omitempty"` + + // LastTuneTime: Output only. The timestamp when the latest successful + // tune finished. + LastTuneTime string `json:"lastTuneTime,omitempty"` + + // Name: Required. The fully qualified resource name of the model. + // Format: + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_i + // d}/models/{model_id}` catalog_id has char limit of 50. + // recommendation_model_id has char limit of 40. + Name string `json:"name,omitempty"` + + // OptimizationObjective: Optional. The optimization objective e.g. + // `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. + // If not specified, we choose default based on model type. Default + // depends on type of recommendation: `recommended-for-you` => `ctr` + // `others-you-may-like` => `ctr` `frequently-bought-together` => + // `revenue_per_order` This field together with optimization_objective + // describe model metadata to use to control model training and serving. + // See https://cloud.google.com/retail/docs/models for more details on + // what the model metadata control and which combination of parameters + // are valid. For invalid combinations of parameters (e.g. type = + // `frequently-bought-together` and optimization_objective = `ctr`), you + // receive an error 400 if you try to create/update a recommendation + // with this set of knobs. + OptimizationObjective string `json:"optimizationObjective,omitempty"` + + // PeriodicTuningState: Optional. The state of periodic tuning. The + // period we use is 3 months - to do a one-off tune earlier use the + // `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`. + // + // Possible values: + // "PERIODIC_TUNING_STATE_UNSPECIFIED" - Unspecified default value, + // should never be explicitly set. + // "PERIODIC_TUNING_DISABLED" - The model has periodic tuning + // disabled. Tuning can be reenabled by calling the + // `EnableModelPeriodicTuning` method or by calling the `TuneModel` + // method. + // "ALL_TUNING_DISABLED" - The model cannot be tuned with periodic + // tuning OR the `TuneModel` method. Hide the options in customer UI and + // reject any requests through the backend self serve API. + // "PERIODIC_TUNING_ENABLED" - The model has periodic tuning enabled. + // Tuning can be disabled by calling the `DisableModelPeriodicTuning` + // method. + PeriodicTuningState string `json:"periodicTuningState,omitempty"` + + // ServingConfigLists: Output only. The list of valid serving configs + // associated with the PageOptimizationConfig. + ServingConfigLists []*GoogleCloudRetailV2betaModelServingConfigList `json:"servingConfigLists,omitempty"` + + // ServingState: Output only. The serving state of the model: `ACTIVE`, + // `NOT_ACTIVE`. + // + // Possible values: + // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. + // "INACTIVE" - The model is not serving. + // "ACTIVE" - The model is serving and can be queried. + // "TUNED" - The model is trained on tuned hyperparameters and can be + // queried. + ServingState string `json:"servingState,omitempty"` + + // TrainingState: Optional. The training state that the model is in + // (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the + // service is frequency of training - this can be used to determine when + // to train model in order to control cost. If not specified: the + // default value for `CreateModel` method is `TRAINING`. The default + // value for `UpdateModel` method is to keep the state the same as + // before. + // + // Possible values: + // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. + // "PAUSED" - The model training is paused. + // "TRAINING" - The model is training. + TrainingState string `json:"trainingState,omitempty"` + + // TuningOperation: Output only. The tune operation associated with the + // model. Can be used to determine if there is an ongoing tune for this + // recommendation. Empty field implies no tune is goig on. + TuningOperation string `json:"tuningOperation,omitempty"` + + // Type: Required. The type of model e.g. `home-page`. Currently + // supported values: `recommended-for-you`, `others-you-may-like`, + // `frequently-bought-together`, `page-optimization`, `similar-items`, + // `buy-it-again`, and `recently-viewed`(readonly value). This field + // together with optimization_objective describe model metadata to use + // to control model training and serving. See + // https://cloud.google.com/retail/docs/models for more details on what + // the model metadata control and which combination of parameters are + // valid. For invalid combinations of parameters (e.g. type = + // `frequently-bought-together` and optimization_objective = `ctr`), you + // receive an error 400 if you try to create/update a recommendation + // with this set of knobs. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Model was last + // updated. E.g. if a Recommendation Model was paused - this would be + // the time the pause was initiated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaModel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaModelServingConfigList: Represents an ordered +// combination of valid serving configs, which can be used for +// `PAGE_OPTIMIZATION` recommendations. +type GoogleCloudRetailV2betaModelServingConfigList struct { + // ServingConfigIds: Optional. A set of valid serving configs that may + // be used for `PAGE_OPTIMIZATION`. + ServingConfigIds []string `json:"servingConfigIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServingConfigIds") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServingConfigIds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaModelServingConfigList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaModelServingConfigList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaOutputResult: Output result. type GoogleCloudRetailV2betaOutputResult struct { // BigqueryResult: Export result in BigQuery. @@ -7952,6 +8216,43 @@ type GoogleCloudRetailV2betaSetInventoryMetadata struct { type GoogleCloudRetailV2betaSetInventoryResponse struct { } +// GoogleCloudRetailV2betaTuneModelMetadata: Metadata associated with a +// tune operation. +type GoogleCloudRetailV2betaTuneModelMetadata struct { + // Model: The resource name of the model that this tune applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_i + // d}/models/{model_id}` + Model string `json:"model,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaTuneModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaTuneModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaTuneModelResponse: Response associated with a +// tune operation. +type GoogleCloudRetailV2betaTuneModelResponse struct { +} + // GoogleCloudRetailV2betaUserEventImportSummary: A summary of import // result. The UserEventImportSummary summarizes the import status for // user events. diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index ab3a16151ba..6769d6025df 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2014,7 +2014,7 @@ } } }, - "revision": "20220909", + "revision": "20220917", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2792,7 +2792,7 @@ "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", "properties": { "candidates": { - "description": "Required. The candidates to consider on the panel. Limit = 10.", + "description": "Required. The candidates to consider on the panel.", "items": { "$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" }, @@ -3649,6 +3649,17 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaCreateModelMetadata": { + "description": "Metadata associated with a create operation.", + "id": "GoogleCloudRetailV2betaCreateModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaCustomAttribute": { "description": "A custom attribute that is not explicitly modeled in Product.", "id": "GoogleCloudRetailV2betaCustomAttribute", @@ -4146,6 +4157,22 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaMerchantCenterFeedFilter": { + "description": "Merchant Center Feed filter criterrion.", + "id": "GoogleCloudRetailV2betaMerchantCenterFeedFilter", + "properties": { + "primaryFeedId": { + "description": "Merchant Center primary feed id.", + "format": "int64", + "type": "string" + }, + "primaryFeedName": { + "description": "Merchant Center primary feed name. The name is used for the display purposes only.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaMerchantCenterLink": { "description": "Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.", "id": "GoogleCloudRetailV2betaMerchantCenterLink", @@ -4161,6 +4188,13 @@ }, "type": "array" }, + "feeds": { + "description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", + "items": { + "$ref": "GoogleCloudRetailV2betaMerchantCenterFeedFilter" + }, + "type": "array" + }, "languageCode": { "description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: `en`.", "type": "string" @@ -4360,7 +4394,7 @@ "id": "GoogleCloudRetailV2betaPredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return *no* results. If instead you want empty result sets to return generic (unfiltered) popular products, set `strictFiltering` to False in `PredictRequest.params`. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\"))", "type": "string" }, "labels": { @@ -5900,12 +5934,29 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2betaTuneModelMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudRetailV2betaTuneModelMetadata", + "properties": { + "model": { + "description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaTuneModelRequest": { "description": "Request to manually start a tuning process now (instead of waiting for the periodically scheduled tuning to happen).", "id": "GoogleCloudRetailV2betaTuneModelRequest", "properties": {}, "type": "object" }, + "GoogleCloudRetailV2betaTuneModelResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudRetailV2betaTuneModelResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudRetailV2betaUserEvent": { "description": "UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.", "id": "GoogleCloudRetailV2betaUserEvent", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 3d67be33705..ed1fae7c4d1 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -1739,8 +1739,7 @@ func (s *GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate) MarshalJS // GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel: An // individual panel with a list of ServingConfigs to consider for it. type GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel struct { - // Candidates: Required. The candidates to consider on the panel. Limit - // = 10. + // Candidates: Required. The candidates to consider on the panel. Candidates []*GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate `json:"candidates,omitempty"` // DefaultCandidate: Required. The default candidate. If the model fails @@ -3327,6 +3326,38 @@ func (s *GoogleCloudRetailV2betaControl) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaCreateModelMetadata: Metadata associated with +// a create operation. +type GoogleCloudRetailV2betaCreateModelMetadata struct { + // Model: The resource name of the model that this create applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_i + // d}/models/{model_id}` + Model string `json:"model,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaCreateModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCreateModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaCustomAttribute: A custom attribute that is // not explicitly modeled in Product. type GoogleCloudRetailV2betaCustomAttribute struct { @@ -4341,6 +4372,39 @@ func (s *GoogleCloudRetailV2betaLocalInventory) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaMerchantCenterFeedFilter: Merchant Center Feed +// filter criterrion. +type GoogleCloudRetailV2betaMerchantCenterFeedFilter struct { + // PrimaryFeedId: Merchant Center primary feed id. + PrimaryFeedId int64 `json:"primaryFeedId,omitempty,string"` + + // PrimaryFeedName: Merchant Center primary feed name. The name is used + // for the display purposes only. + PrimaryFeedName string `json:"primaryFeedName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PrimaryFeedId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PrimaryFeedId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaMerchantCenterFeedFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaMerchantCenterFeedFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaMerchantCenterLink: Represents a link between // a Merchant Center account and a branch. Once a link is established, // products from the linked merchant center account will be streamed to @@ -4363,6 +4427,11 @@ type GoogleCloudRetailV2betaMerchantCenterLink struct { // case sensitive. Destinations []string `json:"destinations,omitempty"` + // Feeds: Criteria for the Merchant Center feeds to be ingested via the + // link. All offers will be ingested if the list is empty. Otherwise the + // offers will be ingested from selected feeds. + Feeds []*GoogleCloudRetailV2betaMerchantCenterFeedFilter `json:"feeds,omitempty"` + // LanguageCode: Language of the title/description and other string // attributes. Use language tags defined by BCP 47 // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This @@ -4687,16 +4756,16 @@ type GoogleCloudRetailV2betaPredictRequest struct { // OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" // tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems If your filter blocks all prediction results, - // the API will return generic (unfiltered) popular products. If you - // only want results strictly matching the filters, set - // `strictFiltering` to True in `PredictRequest.params` to receive empty - // results instead. Note that the API will never return items with - // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. - // If `filterSyntaxV2` is set to true under the `params` field, then - // attribute-based expressions are expected instead of the above - // described tag-based syntax. Examples: * (colors: ANY("Red", "Blue")) - // AND NOT (categories: ANY("Phones")) * (availability: ANY("IN_STOCK")) - // AND (colors: ANY("Red") OR categories: ANY("Phones")) + // the API will return *no* results. If instead you want empty result + // sets to return generic (unfiltered) popular products, set + // `strictFiltering` to False in `PredictRequest.params`. Note that the + // API will never return items with storageStatus of "EXPIRED" or + // "DELETED" regardless of filter choices. If `filterSyntaxV2` is set to + // true under the `params` field, then attribute-based expressions are + // expected instead of the above described tag-based syntax. Examples: * + // (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) * + // (availability: ANY("IN_STOCK")) AND (colors: ANY("Red") OR + // categories: ANY("Phones")) Filter string `json:"filter,omitempty"` // Labels: The labels applied to a resource must meet the following @@ -7703,12 +7772,49 @@ func (s *GoogleCloudRetailV2betaSetInventoryRequest) MarshalJSON() ([]byte, erro type GoogleCloudRetailV2betaSetInventoryResponse struct { } +// GoogleCloudRetailV2betaTuneModelMetadata: Metadata associated with a +// tune operation. +type GoogleCloudRetailV2betaTuneModelMetadata struct { + // Model: The resource name of the model that this tune applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_i + // d}/models/{model_id}` + Model string `json:"model,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaTuneModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaTuneModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaTuneModelRequest: Request to manually start a // tuning process now (instead of waiting for the periodically scheduled // tuning to happen). type GoogleCloudRetailV2betaTuneModelRequest struct { } +// GoogleCloudRetailV2betaTuneModelResponse: Response associated with a +// tune operation. +type GoogleCloudRetailV2betaTuneModelResponse struct { +} + // GoogleCloudRetailV2betaUserEvent: UserEvent captures all metadata // information Retail API needs to know about how end users interact // with customers' website. diff --git a/run/v2/run-api.json b/run/v2/run-api.json index 835af6b9601..653e2009fab 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1064,7 +1064,7 @@ } } }, - "revision": "20220828", + "revision": "20220918", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -1265,6 +1265,10 @@ "description": "Required. URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images", "type": "string" }, + "livenessProbe": { + "$ref": "GoogleCloudRunV2Probe", + "description": "Not Supported By Cloud Run. Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" + }, "name": { "description": "Name of the container specified as a DNS_LABEL.", "type": "string" @@ -1280,6 +1284,10 @@ "$ref": "GoogleCloudRunV2ResourceRequirements", "description": "Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" }, + "startupProbe": { + "$ref": "GoogleCloudRunV2Probe", + "description": "Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" + }, "volumeMounts": { "description": "Volume to mount into the container's filesystem.", "items": { @@ -1557,6 +1565,63 @@ }, "type": "object" }, + "GoogleCloudRunV2GRPCAction": { + "description": "GRPCAction describes an action involving a GRPC port.", + "id": "GoogleCloudRunV2GRPCAction", + "properties": { + "port": { + "description": "Port number of the gRPC service. Number must be in the range 1 to 65535.", + "format": "int32", + "type": "integer" + }, + "service": { + "description": "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRunV2HTTPGetAction": { + "description": "HTTPGetAction describes an action based on HTTP Get requests.", + "id": "GoogleCloudRunV2HTTPGetAction", + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + "type": "string" + }, + "httpHeaders": { + "description": "Custom headers to set in the request. HTTP allows repeated headers.", + "items": { + "$ref": "GoogleCloudRunV2HTTPHeader" + }, + "type": "array" + }, + "path": { + "description": "Path to access on the HTTP server. Defaults to '/'.", + "type": "string" + }, + "scheme": { + "description": "Scheme to use for connecting to the host. Defaults to HTTP.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRunV2HTTPHeader": { + "description": "HTTPHeader describes a custom header to be used in HTTP probes", + "id": "GoogleCloudRunV2HTTPHeader", + "properties": { + "name": { + "description": "Required. The header field name", + "type": "string" + }, + "value": { + "description": "Required. The header field value", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRunV2Job": { "description": "Job represents the configuration of a single job. A job an immutable resource that references a container image which is run to completion.", "id": "GoogleCloudRunV2Job", @@ -1797,6 +1862,45 @@ }, "type": "object" }, + "GoogleCloudRunV2Probe": { + "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + "id": "GoogleCloudRunV2Probe", + "properties": { + "failureThreshold": { + "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + "format": "int32", + "type": "integer" + }, + "grpc": { + "$ref": "GoogleCloudRunV2GRPCAction", + "description": "GRPC specifies an action involving a GRPC port. Exactly one of HTTPGet, TCPSocket, or GRPC must be specified." + }, + "httpGet": { + "$ref": "GoogleCloudRunV2HTTPGetAction", + "description": "HTTPGet specifies the http request to perform. Exactly one of HTTPGet, TCPSocket, or gRPC must be specified." + }, + "initialDelaySeconds": { + "description": "Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "format": "int32", + "type": "integer" + }, + "periodSeconds": { + "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.", + "format": "int32", + "type": "integer" + }, + "tcpSocket": { + "$ref": "GoogleCloudRunV2TCPSocketAction", + "description": "TCPSocket specifies an action involving a TCP port. Exactly one of HTTPGet, TCPSocket, or gRPC must be specified. TCP hooks not yet supported" + }, + "timeoutSeconds": { + "description": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudRunV2ResourceRequirements": { "description": "ResourceRequirements describes the compute resource requirements.", "id": "GoogleCloudRunV2ResourceRequirements", @@ -2326,6 +2430,22 @@ }, "type": "object" }, + "GoogleCloudRunV2TCPSocketAction": { + "description": "TCPSocketAction describes an action based on opening a socket", + "id": "GoogleCloudRunV2TCPSocketAction", + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP.", + "type": "string" + }, + "port": { + "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. This field is currently limited to integer types only because of proto's inability to properly support the IntOrString golang type.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudRunV2Task": { "description": "Task represents a single run of a container to completion.", "id": "GoogleCloudRunV2Task", diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 28c6df81215..d1bcd3b26b0 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -468,6 +468,12 @@ type GoogleCloudRunV2Container struct { // https://kubernetes.io/docs/concepts/containers/images Image string `json:"image,omitempty"` + // LivenessProbe: Not Supported By Cloud Run. Periodic probe of + // container liveness. Container will be restarted if the probe fails. + // More info: + // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + LivenessProbe *GoogleCloudRunV2Probe `json:"livenessProbe,omitempty"` + // Name: Name of the container specified as a DNS_LABEL. Name string `json:"name,omitempty"` @@ -483,6 +489,13 @@ type GoogleCloudRunV2Container struct { // https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Resources *GoogleCloudRunV2ResourceRequirements `json:"resources,omitempty"` + // StartupProbe: Startup probe of application within the container. All + // other probes are disabled if a startup probe is provided, until it + // succeeds. Container will not be added to service endpoints if the + // probe fails. More info: + // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + StartupProbe *GoogleCloudRunV2Probe `json:"startupProbe,omitempty"` + // VolumeMounts: Volume to mount into the container's filesystem. VolumeMounts []*GoogleCloudRunV2VolumeMount `json:"volumeMounts,omitempty"` @@ -888,6 +901,114 @@ func (s *GoogleCloudRunV2ExecutionTemplate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRunV2GRPCAction: GRPCAction describes an action involving +// a GRPC port. +type GoogleCloudRunV2GRPCAction struct { + // Port: Port number of the gRPC service. Number must be in the range 1 + // to 65535. + Port int64 `json:"port,omitempty"` + + // Service: Service is the name of the service to place in the gRPC + // HealthCheckRequest (see + // https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If + // this is not specified, the default behavior is defined by gRPC. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Port") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Port") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRunV2GRPCAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2GRPCAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRunV2HTTPGetAction: HTTPGetAction describes an action +// based on HTTP Get requests. +type GoogleCloudRunV2HTTPGetAction struct { + // Host: Host name to connect to, defaults to the pod IP. You probably + // want to set "Host" in httpHeaders instead. + Host string `json:"host,omitempty"` + + // HttpHeaders: Custom headers to set in the request. HTTP allows + // repeated headers. + HttpHeaders []*GoogleCloudRunV2HTTPHeader `json:"httpHeaders,omitempty"` + + // Path: Path to access on the HTTP server. Defaults to '/'. + Path string `json:"path,omitempty"` + + // Scheme: Scheme to use for connecting to the host. Defaults to HTTP. + Scheme string `json:"scheme,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Host") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Host") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRunV2HTTPGetAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2HTTPGetAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRunV2HTTPHeader: HTTPHeader describes a custom header to +// be used in HTTP probes +type GoogleCloudRunV2HTTPHeader struct { + // Name: Required. The header field name + Name string `json:"name,omitempty"` + + // Value: Required. The header field value + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRunV2HTTPHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2HTTPHeader + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRunV2Job: Job represents the configuration of a single // job. A job an immutable resource that references a container image // which is run to completion. @@ -1261,6 +1382,71 @@ func (s *GoogleCloudRunV2ListTasksResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRunV2Probe: Probe describes a health check to be performed +// against a container to determine whether it is alive or ready to +// receive traffic. +type GoogleCloudRunV2Probe struct { + // FailureThreshold: Minimum consecutive failures for the probe to be + // considered failed after having succeeded. Defaults to 3. Minimum + // value is 1. + FailureThreshold int64 `json:"failureThreshold,omitempty"` + + // Grpc: GRPC specifies an action involving a GRPC port. Exactly one of + // HTTPGet, TCPSocket, or GRPC must be specified. + Grpc *GoogleCloudRunV2GRPCAction `json:"grpc,omitempty"` + + // HttpGet: HTTPGet specifies the http request to perform. Exactly one + // of HTTPGet, TCPSocket, or gRPC must be specified. + HttpGet *GoogleCloudRunV2HTTPGetAction `json:"httpGet,omitempty"` + + // InitialDelaySeconds: Number of seconds after the container has + // started before the probe is initiated. Defaults to 0 seconds. Minimum + // value is 0. Maximum value for liveness probe is 3600. Maximum value + // for startup probe is 240. More info: + // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + InitialDelaySeconds int64 `json:"initialDelaySeconds,omitempty"` + + // PeriodSeconds: How often (in seconds) to perform the probe. Default + // to 10 seconds. Minimum value is 1. Maximum value for liveness probe + // is 3600. Maximum value for startup probe is 240. Must be greater or + // equal than timeout_seconds. + PeriodSeconds int64 `json:"periodSeconds,omitempty"` + + // TcpSocket: TCPSocket specifies an action involving a TCP port. + // Exactly one of HTTPGet, TCPSocket, or gRPC must be specified. TCP + // hooks not yet supported + TcpSocket *GoogleCloudRunV2TCPSocketAction `json:"tcpSocket,omitempty"` + + // TimeoutSeconds: Number of seconds after which the probe times out. + // Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must + // be smaller than period_seconds. More info: + // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FailureThreshold") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FailureThreshold") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRunV2Probe) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2Probe + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRunV2ResourceRequirements: ResourceRequirements describes // the compute resource requirements. type GoogleCloudRunV2ResourceRequirements struct { @@ -1954,6 +2140,41 @@ func (s *GoogleCloudRunV2Service) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRunV2TCPSocketAction: TCPSocketAction describes an action +// based on opening a socket +type GoogleCloudRunV2TCPSocketAction struct { + // Host: Host name to connect to, defaults to the pod IP. + Host string `json:"host,omitempty"` + + // Port: Number or name of the port to access on the container. Number + // must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. This + // field is currently limited to integer types only because of proto's + // inability to properly support the IntOrString golang type. + Port int64 `json:"port,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Host") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Host") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRunV2TCPSocketAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2TCPSocketAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRunV2Task: Task represents a single run of a container to // completion. type GoogleCloudRunV2Task struct { diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 782c6f17a3d..178ce3fbbba 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -3058,7 +3058,7 @@ } } }, - "revision": "20220909", + "revision": "20220921", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -3103,6 +3103,10 @@ "userAgentFamily": { "description": "What kind of user agent is associated, e.g. operating system shells, embedded or stand-alone applications, etc.", "type": "string" + }, + "username": { + "description": "A string representing a username. This is likely not an IAM principal. For instance, this may be the system user name if the finding is VM-related, or this may be some type of application login user name, depending on the type of finding.", + "type": "string" } }, "type": "object" @@ -3782,7 +3786,7 @@ "additionalProperties": { "$ref": "ContactDetails" }, - "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", + "description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", "readOnly": true, "type": "object" }, @@ -3905,7 +3909,7 @@ "type": "string" }, "parentDisplayName": { - "description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\"", + "description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", "readOnly": true, "type": "string" }, @@ -4097,6 +4101,18 @@ "properties": {}, "type": "object" }, + "GoogleCloudSecuritycenterV1ExposedResource": { + "description": "A resource that is exposed as a result of a finding.", + "id": "GoogleCloudSecuritycenterV1ExposedResource", + "properties": {}, + "type": "object" + }, + "GoogleCloudSecuritycenterV1ExposurePath": { + "description": "A path that an attacker could take to reach an exposed resource.", + "id": "GoogleCloudSecuritycenterV1ExposurePath", + "properties": {}, + "type": "object" + }, "GoogleCloudSecuritycenterV1ExternalSystem": { "description": "Representation of third party SIEM/SOAR fields within SCC.", "id": "GoogleCloudSecuritycenterV1ExternalSystem", diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index 6c19d4060b6..2757a714728 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -502,6 +502,12 @@ type Access struct { // operating system shells, embedded or stand-alone applications, etc. UserAgentFamily string `json:"userAgentFamily,omitempty"` + // Username: A string representing a username. This is likely not an IAM + // principal. For instance, this may be the system user name if the + // finding is VM-related, or this may be some type of application login + // user name, depending on the type of finding. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "CallerIp") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1650,7 +1656,7 @@ type Finding struct { // with the finding. Connections []*Connection `json:"connections,omitempty"` - // Contacts: Output only. Map containing the point of contacts for the + // Contacts: Output only. Map containing the points of contact for the // given finding. The key represents the type of contact, while the // value contains a list of all the contacts that pertain. Please refer // to: @@ -1769,7 +1775,7 @@ type Finding struct { // ParentDisplayName: Output only. The human readable display name of // the finding source such as "Event Threat Detection" or "Security - // Health Analytics" + // Health Analytics". ParentDisplayName string `json:"parentDisplayName,omitempty"` // Processes: Represents operating system processes associated with the @@ -2139,6 +2145,16 @@ func (s *GoogleCloudSecuritycenterV1Binding) MarshalJSON() ([]byte, error) { type GoogleCloudSecuritycenterV1BulkMuteFindingsResponse struct { } +// GoogleCloudSecuritycenterV1ExposedResource: A resource that is +// exposed as a result of a finding. +type GoogleCloudSecuritycenterV1ExposedResource struct { +} + +// GoogleCloudSecuritycenterV1ExposurePath: A path that an attacker +// could take to reach an exposed resource. +type GoogleCloudSecuritycenterV1ExposurePath struct { +} + // GoogleCloudSecuritycenterV1ExternalSystem: Representation of third // party SIEM/SOAR fields within SCC. type GoogleCloudSecuritycenterV1ExternalSystem struct { diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index 92c947756c0..5c5f0c72a27 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20220909", + "revision": "20220921", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -941,6 +941,10 @@ "userAgentFamily": { "description": "What kind of user agent is associated, e.g. operating system shells, embedded or stand-alone applications, etc.", "type": "string" + }, + "username": { + "description": "A string representing a username. This is likely not an IAM principal. For instance, this may be the system user name if the finding is VM-related, or this may be some type of application login user name, depending on the type of finding.", + "type": "string" } }, "type": "object" @@ -1596,7 +1600,7 @@ "additionalProperties": { "$ref": "ContactDetails" }, - "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", + "description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", "readOnly": true, "type": "object" }, @@ -1719,7 +1723,7 @@ "type": "string" }, "parentDisplayName": { - "description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\"", + "description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", "readOnly": true, "type": "string" }, @@ -1911,6 +1915,18 @@ "properties": {}, "type": "object" }, + "GoogleCloudSecuritycenterV1ExposedResource": { + "description": "A resource that is exposed as a result of a finding.", + "id": "GoogleCloudSecuritycenterV1ExposedResource", + "properties": {}, + "type": "object" + }, + "GoogleCloudSecuritycenterV1ExposurePath": { + "description": "A path that an attacker could take to reach an exposed resource.", + "id": "GoogleCloudSecuritycenterV1ExposurePath", + "properties": {}, + "type": "object" + }, "GoogleCloudSecuritycenterV1ExternalSystem": { "description": "Representation of third party SIEM/SOAR fields within SCC.", "id": "GoogleCloudSecuritycenterV1ExternalSystem", diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 44922a88345..f176aa6a60e 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -250,6 +250,12 @@ type Access struct { // operating system shells, embedded or stand-alone applications, etc. UserAgentFamily string `json:"userAgentFamily,omitempty"` + // Username: A string representing a username. This is likely not an IAM + // principal. For instance, this may be the system user name if the + // finding is VM-related, or this may be some type of application login + // user name, depending on the type of finding. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "CallerIp") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1341,7 +1347,7 @@ type Finding struct { // with the finding. Connections []*Connection `json:"connections,omitempty"` - // Contacts: Output only. Map containing the point of contacts for the + // Contacts: Output only. Map containing the points of contact for the // given finding. The key represents the type of contact, while the // value contains a list of all the contacts that pertain. Please refer // to: @@ -1460,7 +1466,7 @@ type Finding struct { // ParentDisplayName: Output only. The human readable display name of // the finding source such as "Event Threat Detection" or "Security - // Health Analytics" + // Health Analytics". ParentDisplayName string `json:"parentDisplayName,omitempty"` // Processes: Represents operating system processes associated with the @@ -1822,6 +1828,16 @@ func (s *GoogleCloudSecuritycenterV1Binding) MarshalJSON() ([]byte, error) { type GoogleCloudSecuritycenterV1BulkMuteFindingsResponse struct { } +// GoogleCloudSecuritycenterV1ExposedResource: A resource that is +// exposed as a result of a finding. +type GoogleCloudSecuritycenterV1ExposedResource struct { +} + +// GoogleCloudSecuritycenterV1ExposurePath: A path that an attacker +// could take to reach an exposed resource. +type GoogleCloudSecuritycenterV1ExposurePath struct { +} + // GoogleCloudSecuritycenterV1ExternalSystem: Representation of third // party SIEM/SOAR fields within SCC. type GoogleCloudSecuritycenterV1ExternalSystem struct { diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index 917d93becc2..b7575e09673 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1981,7 +1981,7 @@ } } }, - "revision": "20220909", + "revision": "20220921", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2026,6 +2026,10 @@ "userAgentFamily": { "description": "What kind of user agent is associated, e.g. operating system shells, embedded or stand-alone applications, etc.", "type": "string" + }, + "username": { + "description": "A string representing a username. This is likely not an IAM principal. For instance, this may be the system user name if the finding is VM-related, or this may be some type of application login user name, depending on the type of finding.", + "type": "string" } }, "type": "object" @@ -2663,7 +2667,7 @@ "additionalProperties": { "$ref": "ContactDetails" }, - "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", + "description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", "readOnly": true, "type": "object" }, @@ -2786,7 +2790,7 @@ "type": "string" }, "parentDisplayName": { - "description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\"", + "description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", "readOnly": true, "type": "string" }, @@ -2955,6 +2959,18 @@ "properties": {}, "type": "object" }, + "GoogleCloudSecuritycenterV1ExposedResource": { + "description": "A resource that is exposed as a result of a finding.", + "id": "GoogleCloudSecuritycenterV1ExposedResource", + "properties": {}, + "type": "object" + }, + "GoogleCloudSecuritycenterV1ExposurePath": { + "description": "A path that an attacker could take to reach an exposed resource.", + "id": "GoogleCloudSecuritycenterV1ExposurePath", + "properties": {}, + "type": "object" + }, "GoogleCloudSecuritycenterV1ExternalSystem": { "description": "Representation of third party SIEM/SOAR fields within SCC.", "id": "GoogleCloudSecuritycenterV1ExternalSystem", diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 0ea1ffa09c3..b81e561856f 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -478,6 +478,12 @@ type Access struct { // operating system shells, embedded or stand-alone applications, etc. UserAgentFamily string `json:"userAgentFamily,omitempty"` + // Username: A string representing a username. This is likely not an IAM + // principal. For instance, this may be the system user name if the + // finding is VM-related, or this may be some type of application login + // user name, depending on the type of finding. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "CallerIp") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1424,7 +1430,7 @@ type Finding struct { // with the finding. Connections []*Connection `json:"connections,omitempty"` - // Contacts: Output only. Map containing the point of contacts for the + // Contacts: Output only. Map containing the points of contact for the // given finding. The key represents the type of contact, while the // value contains a list of all the contacts that pertain. Please refer // to: @@ -1543,7 +1549,7 @@ type Finding struct { // ParentDisplayName: Output only. The human readable display name of // the finding source such as "Event Threat Detection" or "Security - // Health Analytics" + // Health Analytics". ParentDisplayName string `json:"parentDisplayName,omitempty"` // Processes: Represents operating system processes associated with the @@ -1835,6 +1841,16 @@ func (s *GoogleCloudSecuritycenterV1Binding) MarshalJSON() ([]byte, error) { type GoogleCloudSecuritycenterV1BulkMuteFindingsResponse struct { } +// GoogleCloudSecuritycenterV1ExposedResource: A resource that is +// exposed as a result of a finding. +type GoogleCloudSecuritycenterV1ExposedResource struct { +} + +// GoogleCloudSecuritycenterV1ExposurePath: A path that an attacker +// could take to reach an exposed resource. +type GoogleCloudSecuritycenterV1ExposurePath struct { +} + // GoogleCloudSecuritycenterV1ExternalSystem: Representation of third // party SIEM/SOAR fields within SCC. type GoogleCloudSecuritycenterV1ExternalSystem struct { diff --git a/servicecontrol/v1/servicecontrol-api.json b/servicecontrol/v1/servicecontrol-api.json index f66e60f2085..84cf8d6b70b 100644 --- a/servicecontrol/v1/servicecontrol-api.json +++ b/servicecontrol/v1/servicecontrol-api.json @@ -197,7 +197,7 @@ } } }, - "revision": "20220506", + "revision": "20220915", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "AllocateInfo": { @@ -531,7 +531,8 @@ "LOAS_PROJECT_LOOKUP_UNAVAILABLE", "CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE", "SECURITY_POLICY_BACKEND_UNAVAILABLE", - "LOCATION_POLICY_BACKEND_UNAVAILABLE" + "LOCATION_POLICY_BACKEND_UNAVAILABLE", + "INJECTED_ERROR" ], "enumDescriptions": [ "This is never used in `CheckResponse`.", @@ -569,7 +570,8 @@ "The Spanner for looking up LOAS project is unavailable.", "Cloud Resource Manager backend server is unavailable.", "NOTE: for customers in the scope of Beta/GA of https://cloud.google.com/vpc-service-controls, this error is no longer returned. If the security backend is unavailable, rpc UNAVAILABLE status will be returned instead. It should be ignored and should not be used to reject client requests.", - "Backend server for evaluating location policy is unavailable." + "Backend server for evaluating location policy is unavailable.", + "Part of the project of fault injection: go/chemist-slo-validation. To distinguish between artificially injected errors and organic ones, this value will be exported for the per_service_check_error_count streamz. http://google3/apiserving/servicecontrol/server/controller_service.cc;l=196 Rpcinjectz2 works by injecting errors early in the rpc life cycle, before any of the chemist business logic runs." ], "type": "string" }, @@ -1299,7 +1301,7 @@ "type": "string" }, "principal": { - "description": "The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the idenity associated with a load balancer that forwared the request.", + "description": "The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.", "type": "string" }, "regionCode": { diff --git a/servicecontrol/v1/servicecontrol-gen.go b/servicecontrol/v1/servicecontrol-gen.go index 114cb639d7b..7ed5d5ae05e 100644 --- a/servicecontrol/v1/servicecontrol-gen.go +++ b/servicecontrol/v1/servicecontrol-gen.go @@ -712,6 +712,13 @@ type CheckError struct { // should be ignored and should not be used to reject client requests. // "LOCATION_POLICY_BACKEND_UNAVAILABLE" - Backend server for // evaluating location policy is unavailable. + // "INJECTED_ERROR" - Part of the project of fault injection: + // go/chemist-slo-validation. To distinguish between artificially + // injected errors and organic ones, this value will be exported for the + // per_service_check_error_count streamz. + // http://google3/apiserving/servicecontrol/server/controller_service.cc;l=196 + // Rpcinjectz2 works by injecting errors early in the rpc life cycle, + // before any of the chemist business logic runs. Code string `json:"code,omitempty"` // Detail: Free-form text providing details on the error cause of the @@ -1875,8 +1882,8 @@ type Peer struct { // Principal: The identity of this peer. Similar to // `Request.auth.principal`, but relative to the peer instead of the - // request. For example, the idenity associated with a load balancer - // that forwared the request. + // request. For example, the identity associated with a load balancer + // that forwarded the request. Principal string `json:"principal,omitempty"` // RegionCode: The CLDR country/region code associated with the above IP diff --git a/servicecontrol/v2/servicecontrol-api.json b/servicecontrol/v2/servicecontrol-api.json index 8000c8b2c96..7c47b020286 100644 --- a/servicecontrol/v2/servicecontrol-api.json +++ b/servicecontrol/v2/servicecontrol-api.json @@ -169,7 +169,7 @@ } } }, - "revision": "20220325", + "revision": "20220915", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "Api": { @@ -547,7 +547,7 @@ "type": "string" }, "principal": { - "description": "The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the idenity associated with a load balancer that forwared the request.", + "description": "The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.", "type": "string" }, "regionCode": { diff --git a/servicecontrol/v2/servicecontrol-gen.go b/servicecontrol/v2/servicecontrol-gen.go index df627883dde..c6415f752f9 100644 --- a/servicecontrol/v2/servicecontrol-gen.go +++ b/servicecontrol/v2/servicecontrol-gen.go @@ -738,8 +738,8 @@ type Peer struct { // Principal: The identity of this peer. Similar to // `Request.auth.principal`, but relative to the peer instead of the - // request. For example, the idenity associated with a load balancer - // that forwared the request. + // request. For example, the identity associated with a load balancer + // that forwarded the request. Principal string `json:"principal,omitempty"` // RegionCode: The CLDR country/region code associated with the above IP diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index 83550f2fe87..5e938cbff22 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -446,7 +446,7 @@ ] }, "run": { - "description": "Attempts to start a new TransferOperation for the current TransferJob. A TransferJob has a maximum of one active TransferOperation. If this method is called while a TransferOperation is active, an error will be returned.", + "description": "Starts a new operation for the specified transfer job. A `TransferJob` has a maximum of one active `TransferOperation`. If this method is called while a `TransferOperation` is active, an error is returned.", "flatPath": "v1/transferJobs/{transferJobsId}:run", "httpMethod": "POST", "id": "storagetransfer.transferJobs.run", @@ -632,7 +632,7 @@ } } }, - "revision": "20220901", + "revision": "20220921", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -860,7 +860,7 @@ "DATA_LOSS" ], "enumDescriptions": [ - "Not an error; returned on success HTTP Mapping: 200 OK", + "Not an error; returned on success. HTTP Mapping: 200 OK", "The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request", "Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error", "The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request", diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index 0709f4aeeb4..9fe07603b06 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -596,7 +596,7 @@ type ErrorSummary struct { // ErrorCode: Required. // // Possible values: - // "OK" - Not an error; returned on success HTTP Mapping: 200 OK + // "OK" - Not an error; returned on success. HTTP Mapping: 200 OK // "CANCELLED" - The operation was cancelled, typically by the caller. // HTTP Mapping: 499 Client Closed Request // "UNKNOWN" - Unknown error. For example, this error may be returned @@ -3940,10 +3940,10 @@ type TransferJobsRunCall struct { header_ http.Header } -// Run: Attempts to start a new TransferOperation for the current -// TransferJob. A TransferJob has a maximum of one active -// TransferOperation. If this method is called while a TransferOperation -// is active, an error will be returned. +// Run: Starts a new operation for the specified transfer job. A +// `TransferJob` has a maximum of one active `TransferOperation`. If +// this method is called while a `TransferOperation` is active, an error +// is returned. // // - jobName: The name of the transfer job. func (r *TransferJobsService) Run(jobName string, runtransferjobrequest *RunTransferJobRequest) *TransferJobsRunCall { @@ -4044,7 +4044,7 @@ func (c *TransferJobsRunCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Attempts to start a new TransferOperation for the current TransferJob. A TransferJob has a maximum of one active TransferOperation. If this method is called while a TransferOperation is active, an error will be returned.", + // "description": "Starts a new operation for the specified transfer job. A `TransferJob` has a maximum of one active `TransferOperation`. If this method is called while a `TransferOperation` is active, an error is returned.", // "flatPath": "v1/transferJobs/{transferJobsId}:run", // "httpMethod": "POST", // "id": "storagetransfer.transferJobs.run", diff --git a/streetviewpublish/v1/streetviewpublish-api.json b/streetviewpublish/v1/streetviewpublish-api.json index 8c485f82b10..40977f68796 100644 --- a/streetviewpublish/v1/streetviewpublish-api.json +++ b/streetviewpublish/v1/streetviewpublish-api.json @@ -533,7 +533,7 @@ } } }, - "revision": "20220722", + "revision": "20220926", "rootUrl": "https://streetviewpublish.googleapis.com/", "schemas": { "BatchDeletePhotosRequest": { @@ -1031,7 +1031,8 @@ "IMU_DATA_GAP", "UNSUPPORTED_CAMERA", "NOT_OUTDOORS", - "INSUFFICIENT_VIDEO_FRAMES" + "INSUFFICIENT_VIDEO_FRAMES", + "INSUFFICIENT_MOVEMENT" ], "enumDescriptions": [ "The failure reason is unspecified, this is the default value.", @@ -1055,7 +1056,8 @@ "IMU (Accelerometer, Gyroscope, etc.) data contain gaps greater than 0.1 seconds in duration.", "The camera is not supported.", "Some frames were indoors, which is unsupported.", - "Not enough video frames." + "Not enough video frames.", + "Not enough moving data." ], "readOnly": true, "type": "string" diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go index 1d2a461fd97..2a76d3ddd13 100644 --- a/streetviewpublish/v1/streetviewpublish-gen.go +++ b/streetviewpublish/v1/streetviewpublish-gen.go @@ -1101,6 +1101,7 @@ type PhotoSequence struct { // "UNSUPPORTED_CAMERA" - The camera is not supported. // "NOT_OUTDOORS" - Some frames were indoors, which is unsupported. // "INSUFFICIENT_VIDEO_FRAMES" - Not enough video frames. + // "INSUFFICIENT_MOVEMENT" - Not enough moving data. FailureReason string `json:"failureReason,omitempty"` // Filename: Output only. The filename of the upload. Does not include diff --git a/sts/v1/sts-api.json b/sts/v1/sts-api.json index 28af9a90e62..55be3a7e0c7 100644 --- a/sts/v1/sts-api.json +++ b/sts/v1/sts-api.json @@ -114,7 +114,7 @@ } }, "token": { - "description": "Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within an identity pool, or it applies a Credential Access Boundary to a Google access token. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.", + "description": "Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within an identity pool, or it applies a Credential Access Boundary to a Google access token. Note that workforce pools do not support Credential Access Boundary at the moment. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.", "flatPath": "v1/token", "httpMethod": "POST", "id": "sts.token", @@ -131,7 +131,7 @@ } } }, - "revision": "20220826", + "revision": "20220916", "rootUrl": "https://sts.googleapis.com/", "schemas": { "GoogleIamV1Binding": { @@ -197,7 +197,7 @@ "id": "GoogleIdentityStsV1ExchangeTokenRequest", "properties": { "audience": { - "description": "The full resource name of the identity provider; for example: `//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/`. Required when exchanging an external credential for a Google access token.", + "description": "The full resource name of the identity provider; for example: `//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/` for workload identity pool providers, or `//iam.googleapis.com/locations/global/workforcePools//providers/` for workforce pool providers. Required when exchanging an external credential for a Google access token.", "type": "string" }, "grantType": { @@ -217,7 +217,7 @@ "type": "string" }, "subjectToken": { - "description": "Required. The input token. This token is either an external credential issued by a workload identity pool provider, or a short-lived access token issued by Google. If the token is an OIDC JWT, it must use the JWT format defined in [RFC 7523](https://tools.ietf.org/html/rfc7523), and the `subject_token_type` must be either `urn:ietf:params:oauth:token-type:jwt` or `urn:ietf:params:oauth:token-type:id_token`. The following headers are required: - `kid`: The identifier of the signing key securing the JWT. - `alg`: The cryptographic algorithm securing the JWT. Must be `RS256` or `ES256`. The following payload fields are required. For more information, see [RFC 7523, Section 3](https://tools.ietf.org/html/rfc7523#section-3): - `iss`: The issuer of the token. The issuer must provide a discovery document at the URL `/.well-known/openid-configuration`, where `` is the value of this field. The document must be formatted according to section 4.2 of the [OIDC 1.0 Discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse). - `iat`: The issue time, in seconds, since the Unix epoch. Must be in the past. - `exp`: The expiration time, in seconds, since the Unix epoch. Must be less than 48 hours after `iat`. Shorter expiration times are more secure. If possible, we recommend setting an expiration time less than 6 hours. - `sub`: The identity asserted in the JWT. - `aud`: For workload identity pools, this must be a value specified in the allowed audiences for the workload identity pool provider, or one of the audiences allowed by default if no audiences were specified. See https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#oidc Example header: ``` { \"alg\": \"RS256\", \"kid\": \"us-east-11\" } ``` Example payload: ``` { \"iss\": \"https://accounts.google.com\", \"iat\": 1517963104, \"exp\": 1517966704, \"aud\": \"//iam.googleapis.com/projects/1234567890123/locations/global/workloadIdentityPools/my-pool/providers/my-provider\", \"sub\": \"113475438248934895348\", \"my_claims\": { \"additional_claim\": \"value\" } } ``` If `subject_token` is for AWS, it must be a serialized `GetCallerIdentity` token. This token contains the same information as a request to the AWS [`GetCallerIdentity()`](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity) method, as well as the AWS [signature](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) for the request information. Use Signature Version 4. Format the request as URL-encoded JSON, and set the `subject_token_type` parameter to `urn:ietf:params:aws:token-type:aws4_request`. The following parameters are required: - `url`: The URL of the AWS STS endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?Action=GetCallerIdentity\u0026Version=2011-06-15`. Regional endpoints are also supported. - `method`: The HTTP request method: `POST`. - `headers`: The HTTP request headers, which must include: - `Authorization`: The request signature. - `x-amz-date`: The time you will send the request, formatted as an [ISO8601 Basic](https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#sigv4_elements_date) string. This value is typically set to the current time and is used to help prevent replay attacks. - `host`: The hostname of the `url` field; for example, `sts.amazonaws.com`. - `x-goog-cloud-target-resource`: The full, canonical resource name of the workload identity pool provider, with or without an `https:` prefix. To help ensure data integrity, we recommend including this header in the `SignedHeaders` field of the signed request. For example: //iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ If you are using temporary security credentials provided by AWS, you must also include the header `x-amz-security-token`, with the value set to the session token. The following example shows a `GetCallerIdentity` token: ``` { \"headers\": [ {\"key\": \"x-amz-date\", \"value\": \"20200815T015049Z\"}, {\"key\": \"Authorization\", \"value\": \"AWS4-HMAC-SHA256+Credential=$credential,+SignedHeaders=host;x-amz-date;x-goog-cloud-target-resource,+Signature=$signature\"}, {\"key\": \"x-goog-cloud-target-resource\", \"value\": \"//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/\"}, {\"key\": \"host\", \"value\": \"sts.amazonaws.com\"} . ], \"method\": \"POST\", \"url\": \"https://sts.amazonaws.com?Action=GetCallerIdentity\u0026Version=2011-06-15\" } ``` If the token is a SAML 2.0 assertion, it must use the format defined in [the SAML 2.0 spec](https://www.oasis-open.org/committees/download.php/56776/sstc-saml-core-errata-2.0-wd-07.pdf), and the `subject_token_type` must be `urn:ietf:params:oauth:token-type:saml2`. See [Verification of external credentials](https://cloud.google.com/iam/docs/using-workload-identity-federation#verification_of_external_credentials) for details on how SAML 2.0 assertions are validated during token exchanges. You can also use a Google-issued OAuth 2.0 access token with this field to obtain an access token with new security attributes applied, such as a Credential Access Boundary. In this case, set `subject_token_type` to `urn:ietf:params:oauth:token-type:access_token`. If an access token already contains security attributes, you cannot apply additional security attributes.", + "description": "Required. The input token. This token is either an external credential issued by a workload identity pool provider, or a short-lived access token issued by Google. If the token is an OIDC JWT, it must use the JWT format defined in [RFC 7523](https://tools.ietf.org/html/rfc7523), and the `subject_token_type` must be either `urn:ietf:params:oauth:token-type:jwt` or `urn:ietf:params:oauth:token-type:id_token`. The following headers are required: - `kid`: The identifier of the signing key securing the JWT. - `alg`: The cryptographic algorithm securing the JWT. Must be `RS256` or `ES256`. The following payload fields are required. For more information, see [RFC 7523, Section 3](https://tools.ietf.org/html/rfc7523#section-3): - `iss`: The issuer of the token. The issuer must provide a discovery document at the URL `/.well-known/openid-configuration`, where `` is the value of this field. The document must be formatted according to section 4.2 of the [OIDC 1.0 Discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse). - `iat`: The issue time, in seconds, since the Unix epoch. Must be in the past. - `exp`: The expiration time, in seconds, since the Unix epoch. Must be less than 48 hours after `iat`. Shorter expiration times are more secure. If possible, we recommend setting an expiration time less than 6 hours. - `sub`: The identity asserted in the JWT. - `aud`: For workload identity pools, this must be a value specified in the allowed audiences for the workload identity pool provider, or one of the audiences allowed by default if no audiences were specified. See https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#oidc. For workforce pools, this must match the client ID specified in the provider configuration. See https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools.providers#oidc. Example header: ``` { \"alg\": \"RS256\", \"kid\": \"us-east-11\" } ``` Example payload: ``` { \"iss\": \"https://accounts.google.com\", \"iat\": 1517963104, \"exp\": 1517966704, \"aud\": \"//iam.googleapis.com/projects/1234567890123/locations/global/workloadIdentityPools/my-pool/providers/my-provider\", \"sub\": \"113475438248934895348\", \"my_claims\": { \"additional_claim\": \"value\" } } ``` If `subject_token` is for AWS, it must be a serialized `GetCallerIdentity` token. This token contains the same information as a request to the AWS [`GetCallerIdentity()`](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity) method, as well as the AWS [signature](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) for the request information. Use Signature Version 4. Format the request as URL-encoded JSON, and set the `subject_token_type` parameter to `urn:ietf:params:aws:token-type:aws4_request`. The following parameters are required: - `url`: The URL of the AWS STS endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?Action=GetCallerIdentity\u0026Version=2011-06-15`. Regional endpoints are also supported. - `method`: The HTTP request method: `POST`. - `headers`: The HTTP request headers, which must include: - `Authorization`: The request signature. - `x-amz-date`: The time you will send the request, formatted as an [ISO8601 Basic](https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#sigv4_elements_date) string. This value is typically set to the current time and is used to help prevent replay attacks. - `host`: The hostname of the `url` field; for example, `sts.amazonaws.com`. - `x-goog-cloud-target-resource`: The full, canonical resource name of the workload identity pool provider, with or without an `https:` prefix. To help ensure data integrity, we recommend including this header in the `SignedHeaders` field of the signed request. For example: //iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ If you are using temporary security credentials provided by AWS, you must also include the header `x-amz-security-token`, with the value set to the session token. The following example shows a `GetCallerIdentity` token: ``` { \"headers\": [ {\"key\": \"x-amz-date\", \"value\": \"20200815T015049Z\"}, {\"key\": \"Authorization\", \"value\": \"AWS4-HMAC-SHA256+Credential=$credential,+SignedHeaders=host;x-amz-date;x-goog-cloud-target-resource,+Signature=$signature\"}, {\"key\": \"x-goog-cloud-target-resource\", \"value\": \"//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/\"}, {\"key\": \"host\", \"value\": \"sts.amazonaws.com\"} . ], \"method\": \"POST\", \"url\": \"https://sts.amazonaws.com?Action=GetCallerIdentity\u0026Version=2011-06-15\" } ``` If the token is a SAML 2.0 assertion, it must use the format defined in [the SAML 2.0 spec](https://www.oasis-open.org/committees/download.php/56776/sstc-saml-core-errata-2.0-wd-07.pdf), and the `subject_token_type` must be `urn:ietf:params:oauth:token-type:saml2`. See [Verification of external credentials](https://cloud.google.com/iam/docs/using-workload-identity-federation#verification_of_external_credentials) for details on how SAML 2.0 assertions are validated during token exchanges. You can also use a Google-issued OAuth 2.0 access token with this field to obtain an access token with new security attributes applied, such as a Credential Access Boundary. In this case, set `subject_token_type` to `urn:ietf:params:oauth:token-type:access_token`. If an access token already contains security attributes, you cannot apply additional security attributes.", "type": "string" }, "subjectTokenType": { @@ -301,7 +301,7 @@ "type": "string" }, "username": { - "description": "The human-readable identifier for the token principal subject. For example, if the provided token is associated with a workload identity pool, this field contains a value in the following format: `principal://iam.googleapis.com/projects//locations/global/workloadIdentityPools//subject/`", + "description": "The human-readable identifier for the token principal subject. For example, if the provided token is associated with a workload identity pool, this field contains a value in the following format: `principal://iam.googleapis.com/projects//locations/global/workloadIdentityPools//subject/`. If the provided token is associated with a workforce pool, this field contains a value in the following format: `principal://iam.googleapis.com/locations/global/workforcePools//subject/`.", "type": "string" } }, diff --git a/sts/v1/sts-gen.go b/sts/v1/sts-gen.go index 1149434904d..ab0c58c70c3 100644 --- a/sts/v1/sts-gen.go +++ b/sts/v1/sts-gen.go @@ -312,8 +312,10 @@ type GoogleIdentityStsV1ExchangeTokenRequest struct { // Audience: The full resource name of the identity provider; for // example: // `//iam.googleapis.com/projects//locations/global/workloadIdentityPools - // //providers/`. Required when exchanging an external credential for a - // Google access token. + // //providers/` for workload identity pool providers, or + // `//iam.googleapis.com/locations/global/workforcePools//providers/` + // for workforce pool providers. Required when exchanging an external + // credential for a Google access token. Audience string `json:"audience,omitempty"` // GrantType: Required. The grant type. Must be @@ -364,7 +366,10 @@ type GoogleIdentityStsV1ExchangeTokenRequest struct { // specified in the allowed audiences for the workload identity pool // provider, or one of the audiences allowed by default if no audiences // were specified. See - // https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#oidc + // https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#oidc. + // For workforce pools, this must match the client ID specified in the + // provider configuration. See + // https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools.providers#oidc. // Example header: ``` { "alg": "RS256", "kid": "us-east-11" } ``` // Example payload: ``` { "iss": "https://accounts.google.com", "iat": // 1517963104, "exp": 1517966704, "aud": @@ -583,7 +588,10 @@ type GoogleIdentityStsV1IntrospectTokenResponse struct { // workload identity pool, this field contains a value in the following // format: // `principal://iam.googleapis.com/projects//locations/global/workloadIde - // ntityPools//subject/` + // ntityPools//subject/`. If the provided token is associated with a + // workforce pool, this field contains a value in the following format: + // `principal://iam.googleapis.com/locations/global/workforcePools//subje + // ct/`. Username string `json:"username,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1006,10 +1014,12 @@ type V1TokenCall struct { // Token: Exchanges a credential for a Google OAuth 2.0 access token. // The token asserts an external identity within an identity pool, or it -// applies a Credential Access Boundary to a Google access token. When -// you call this method, do not send the `Authorization` HTTP header in -// the request. This method does not require the `Authorization` header, -// and using the header can cause the request to fail. +// applies a Credential Access Boundary to a Google access token. Note +// that workforce pools do not support Credential Access Boundary at the +// moment. When you call this method, do not send the `Authorization` +// HTTP header in the request. This method does not require the +// `Authorization` header, and using the header can cause the request to +// fail. func (r *V1Service) Token(googleidentitystsv1exchangetokenrequest *GoogleIdentityStsV1ExchangeTokenRequest) *V1TokenCall { c := &V1TokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.googleidentitystsv1exchangetokenrequest = googleidentitystsv1exchangetokenrequest @@ -1106,7 +1116,7 @@ func (c *V1TokenCall) Do(opts ...googleapi.CallOption) (*GoogleIdentityStsV1Exch } return ret, nil // { - // "description": "Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within an identity pool, or it applies a Credential Access Boundary to a Google access token. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.", + // "description": "Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within an identity pool, or it applies a Credential Access Boundary to a Google access token. Note that workforce pools do not support Credential Access Boundary at the moment. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.", // "flatPath": "v1/token", // "httpMethod": "POST", // "id": "sts.token", diff --git a/tagmanager/v2/tagmanager-api.json b/tagmanager/v2/tagmanager-api.json index 9edd9062697..0e2137a8fd6 100644 --- a/tagmanager/v2/tagmanager-api.json +++ b/tagmanager/v2/tagmanager-api.json @@ -189,7 +189,7 @@ "type": "string" }, "path": { - "description": "GTM Accounts's API relative path. Example: accounts/{account_id}", + "description": "GTM Account's API relative path. Example: accounts/{account_id}", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -302,7 +302,7 @@ "type": "string" }, "parent": { - "description": "GTM Accounts's API relative path. Example: accounts/{account_id}.", + "description": "GTM Account's API relative path. Example: accounts/{account_id}.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -3269,7 +3269,7 @@ "type": "string" }, "parent": { - "description": "GTM Accounts's API relative path. Example: accounts/{account_id}", + "description": "GTM Account's API relative path. Example: accounts/{account_id}", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -3317,7 +3317,7 @@ } } }, - "revision": "20220907", + "revision": "20220922", "rootUrl": "https://tagmanager.googleapis.com/", "schemas": { "Account": { diff --git a/tagmanager/v2/tagmanager-gen.go b/tagmanager/v2/tagmanager-gen.go index 0f0f37545a2..448012e519f 100644 --- a/tagmanager/v2/tagmanager-gen.go +++ b/tagmanager/v2/tagmanager-gen.go @@ -3877,7 +3877,7 @@ type AccountsUpdateCall struct { // Update: Updates a GTM Account. // -// - path: GTM Accounts's API relative path. Example: +// - path: GTM Account's API relative path. Example: // accounts/{account_id}. func (r *AccountsService) Update(path string, account *Account) *AccountsUpdateCall { c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -3999,7 +3999,7 @@ func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) // "type": "string" // }, // "path": { - // "description": "GTM Accounts's API relative path. Example: accounts/{account_id}", + // "description": "GTM Account's API relative path. Example: accounts/{account_id}", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, @@ -4429,7 +4429,7 @@ type AccountsContainersListCall struct { // List: Lists all Containers that belongs to a GTM Account. // -// - parent: GTM Accounts's API relative path. Example: +// - parent: GTM Account's API relative path. Example: // accounts/{account_id}. func (r *AccountsContainersService) List(parent string) *AccountsContainersListCall { c := &AccountsContainersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -4557,7 +4557,7 @@ func (c *AccountsContainersListCall) Do(opts ...googleapi.CallOption) (*ListCont // "type": "string" // }, // "parent": { - // "description": "GTM Accounts's API relative path. Example: accounts/{account_id}.", + // "description": "GTM Account's API relative path. Example: accounts/{account_id}.", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, @@ -16952,7 +16952,7 @@ type AccountsUserPermissionsListCall struct { // List: List all users that have access to the account along with // Account and Container user access granted to each of them. // -// - parent: GTM Accounts's API relative path. Example: +// - parent: GTM Account's API relative path. Example: // accounts/{account_id}. func (r *AccountsUserPermissionsService) List(parent string) *AccountsUserPermissionsListCall { c := &AccountsUserPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -17080,7 +17080,7 @@ func (c *AccountsUserPermissionsListCall) Do(opts ...googleapi.CallOption) (*Lis // "type": "string" // }, // "parent": { - // "description": "GTM Accounts's API relative path. Example: accounts/{account_id}", + // "description": "GTM Account's API relative path. Example: accounts/{account_id}", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, diff --git a/vision/v1/vision-api.json b/vision/v1/vision-api.json index 5e7dbb87015..10618501d29 100644 --- a/vision/v1/vision-api.json +++ b/vision/v1/vision-api.json @@ -1282,7 +1282,7 @@ } } }, - "revision": "20220805", + "revision": "20220926", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AddProductToProductSetRequest": { @@ -2145,7 +2145,7 @@ "type": "integer" }, "model": { - "description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", + "description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support \"builtin/weekly\" for the bleeding edge release updated weekly.", "type": "string" }, "type": { diff --git a/vision/v1/vision-gen.go b/vision/v1/vision-gen.go index 554a86e5571..e08aaffaaac 100644 --- a/vision/v1/vision-gen.go +++ b/vision/v1/vision-gen.go @@ -1777,6 +1777,8 @@ type Feature struct { // Model: Model to use for the feature. Supported values: // "builtin/stable" (the default if unset) and "builtin/latest". + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support + // "builtin/weekly" for the bleeding edge release updated weekly. Model string `json:"model,omitempty"` // Type: The feature type. diff --git a/vision/v1p1beta1/vision-api.json b/vision/v1p1beta1/vision-api.json index 0b1bca8c352..764e0c80d43 100644 --- a/vision/v1p1beta1/vision-api.json +++ b/vision/v1p1beta1/vision-api.json @@ -449,7 +449,7 @@ } } }, - "revision": "20220805", + "revision": "20220926", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AnnotateFileResponse": { @@ -1928,7 +1928,7 @@ "type": "integer" }, "model": { - "description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", + "description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support \"builtin/weekly\" for the bleeding edge release updated weekly.", "type": "string" }, "type": { diff --git a/vision/v1p1beta1/vision-gen.go b/vision/v1p1beta1/vision-gen.go index d6b93f0c094..7cf5cac127f 100644 --- a/vision/v1p1beta1/vision-gen.go +++ b/vision/v1p1beta1/vision-gen.go @@ -2513,6 +2513,8 @@ type GoogleCloudVisionV1p1beta1Feature struct { // Model: Model to use for the feature. Supported values: // "builtin/stable" (the default if unset) and "builtin/latest". + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support + // "builtin/weekly" for the bleeding edge release updated weekly. Model string `json:"model,omitempty"` // Type: The feature type. diff --git a/vision/v1p2beta1/vision-api.json b/vision/v1p2beta1/vision-api.json index 92c48896d87..55ea4d28b88 100644 --- a/vision/v1p2beta1/vision-api.json +++ b/vision/v1p2beta1/vision-api.json @@ -449,7 +449,7 @@ } } }, - "revision": "20220805", + "revision": "20220926", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AnnotateFileResponse": { @@ -3341,7 +3341,7 @@ "type": "integer" }, "model": { - "description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", + "description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support \"builtin/weekly\" for the bleeding edge release updated weekly.", "type": "string" }, "type": { diff --git a/vision/v1p2beta1/vision-gen.go b/vision/v1p2beta1/vision-gen.go index dc9c4160045..546477d3e1f 100644 --- a/vision/v1p2beta1/vision-gen.go +++ b/vision/v1p2beta1/vision-gen.go @@ -4813,6 +4813,8 @@ type GoogleCloudVisionV1p2beta1Feature struct { // Model: Model to use for the feature. Supported values: // "builtin/stable" (the default if unset) and "builtin/latest". + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support + // "builtin/weekly" for the bleeding edge release updated weekly. Model string `json:"model,omitempty"` // Type: The feature type. diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index 0919d461a6d..2e9eeaa3677 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -3829,7 +3829,7 @@ } } }, - "revision": "20220719", + "revision": "20220926", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -8046,6 +8046,11 @@ "description": "Statistics about the live broadcast. These represent a snapshot of the values at the time of the request. Statistics are only returned for live broadcasts.", "id": "LiveBroadcastStatistics", "properties": { + "concurrentViewers": { + "description": "The number of viewers currently watching the broadcast. The property and its value will be present if the broadcast has current viewers and the broadcast owner has not hidden the viewcount for the video. Note that YouTube stops tracking the number of concurrent viewers for a broadcast when the broadcast ends. So, this property would not identify the number of viewers watching an archived video of a live broadcast that already ended.", + "format": "uint64", + "type": "string" + }, "totalChatCount": { "description": "The total number of live chat messages currently on the broadcast. The property and its value will be present if the broadcast is public, has the live chat feature enabled, and has at least one message. Note that this field will not be filled after the broadcast ends. So this property would not identify the number of chat messages for an archived video of a completed live broadcast.", "format": "uint64", diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 056f67305bd..ad3a24095f9 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -5163,6 +5163,15 @@ func (s *LiveBroadcastSnippet) MarshalJSON() ([]byte, error) { // represent a snapshot of the values at the time of the request. // Statistics are only returned for live broadcasts. type LiveBroadcastStatistics struct { + // ConcurrentViewers: The number of viewers currently watching the + // broadcast. The property and its value will be present if the + // broadcast has current viewers and the broadcast owner has not hidden + // the viewcount for the video. Note that YouTube stops tracking the + // number of concurrent viewers for a broadcast when the broadcast ends. + // So, this property would not identify the number of viewers watching + // an archived video of a live broadcast that already ended. + ConcurrentViewers uint64 `json:"concurrentViewers,omitempty,string"` + // TotalChatCount: The total number of live chat messages currently on // the broadcast. The property and its value will be present if the // broadcast is public, has the live chat feature enabled, and has at @@ -5171,15 +5180,15 @@ type LiveBroadcastStatistics struct { // chat messages for an archived video of a completed live broadcast. TotalChatCount uint64 `json:"totalChatCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "TotalChatCount") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ConcurrentViewers") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalChatCount") to + // NullFields is a list of field names (e.g. "ConcurrentViewers") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the