From 077683eab86ee8e4a83da8318b0ae7b4b83d0980 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Mar 2024 08:11:35 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- admin/directory/v1/admin-api.json | 34 +- admin/directory/v1/admin-gen.go | 40 + adsense/v2/adsense-api.json | 3 +- apigee/v1/apigee-api.json | 4 +- apigee/v1/apigee-gen.go | 8 +- artifactregistry/v1/artifactregistry-api.json | 175 +- artifactregistry/v1/artifactregistry-gen.go | 588 +++++- .../v1beta2/artifactregistry-api.json | 81 +- .../v1beta2/artifactregistry-gen.go | 355 +++- cloudbilling/v1beta/cloudbilling-api.json | 305 ++- cloudbilling/v1beta/cloudbilling-gen.go | 1716 +++++++++++++---- cloudfunctions/v2/cloudfunctions-api.json | 7 +- cloudfunctions/v2/cloudfunctions-gen.go | 17 + .../v2alpha/cloudfunctions-api.json | 7 +- cloudfunctions/v2alpha/cloudfunctions-gen.go | 17 + cloudfunctions/v2beta/cloudfunctions-api.json | 7 +- cloudfunctions/v2beta/cloudfunctions-gen.go | 17 + .../v1alpha/discoveryengine-api.json | 104 +- .../v1alpha/discoveryengine-gen.go | 199 +- .../v1beta/discoveryengine-api.json | 37 +- discoveryengine/v1beta/discoveryengine-gen.go | 94 +- monitoring/v3/monitoring-api.json | 10 +- monitoring/v3/monitoring-gen.go | 14 +- retail/v2alpha/retail-api.json | 122 +- retail/v2alpha/retail-gen.go | 415 ++++ storagetransfer/v1/storagetransfer-api.json | 10 +- storagetransfer/v1/storagetransfer-gen.go | 29 +- 27 files changed, 3949 insertions(+), 466 deletions(-) diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index a40758604fa..fc2e6aa7ea8 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -4671,7 +4671,7 @@ } } }, - "revision": "20240227", + "revision": "20240304", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -4810,6 +4810,30 @@ }, "type": "object" }, + "BacklightInfo": { + "description": "Information about the device's backlights.", + "id": "BacklightInfo", + "properties": { + "brightness": { + "description": "Output only. Current brightness of the backlight, between 0 and max_brightness.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "maxBrightness": { + "description": "Output only. Maximum brightness for the backlight.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "path": { + "description": "Output only. Path to this backlight on the system. Useful if the caller needs to correlate with other information.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "BatchChangeChromeOsDeviceStatusRequest": { "description": "A request for changing the status of a batch of ChromeOS devices.", "id": "BatchChangeChromeOsDeviceStatusRequest", @@ -5383,6 +5407,14 @@ "format": "int64", "type": "string" }, + "backlightInfo": { + "description": "Output only. Contains backlight information for the device.", + "items": { + "$ref": "BacklightInfo" + }, + "readOnly": true, + "type": "array" + }, "bootMode": { "description": "The boot mode for the device. The possible values are: * `Verified`: The device is running a valid version of the Chrome OS. * `Dev`: The devices's developer hardware switch is enabled. When booted, the device has a command line shell. For an example of a developer switch, see the [Chromebook developer information](https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/samsung-series-5-chromebook#TOC-Developer-switch).", "type": "string" diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 78d0ec03780..5cb2e9d5782 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -871,6 +871,42 @@ func (s *AuxiliaryMessage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BacklightInfo: Information about the device's backlights. +type BacklightInfo struct { + // Brightness: Output only. Current brightness of the backlight, between + // 0 and max_brightness. + Brightness int64 `json:"brightness,omitempty"` + + // MaxBrightness: Output only. Maximum brightness for the backlight. + MaxBrightness int64 `json:"maxBrightness,omitempty"` + + // Path: Output only. Path to this backlight on the system. Useful if + // the caller needs to correlate with other information. + Path string `json:"path,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Brightness") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Brightness") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BacklightInfo) MarshalJSON() ([]byte, error) { + type NoMethod BacklightInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BatchChangeChromeOsDeviceStatusRequest: A request for changing the // status of a batch of ChromeOS devices. type BatchChangeChromeOsDeviceStatusRequest struct { @@ -1737,6 +1773,10 @@ type ChromeOsDevice struct { // device will stop receiving Chrome updates or support AutoUpdateExpiration int64 `json:"autoUpdateExpiration,omitempty,string"` + // BacklightInfo: Output only. Contains backlight information for the + // device. + BacklightInfo []*BacklightInfo `json:"backlightInfo,omitempty"` + // BootMode: The boot mode for the device. The possible values are: * // `Verified`: The device is running a valid version of the Chrome OS. * // `Dev`: The devices's developer hardware switch is enabled. When diff --git a/adsense/v2/adsense-api.json b/adsense/v2/adsense-api.json index d2c3ff61587..2bf793f7ff4 100644 --- a/adsense/v2/adsense-api.json +++ b/adsense/v2/adsense-api.json @@ -17,6 +17,7 @@ "description": "The AdSense Management API allows publishers to access their inventory and run earnings and performance reports.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/adsense/management/", + "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" @@ -1844,7 +1845,7 @@ } } }, - "revision": "20231016", + "revision": "20240306", "rootUrl": "https://adsense.googleapis.com/", "schemas": { "Account": { diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index ede2c800457..63a207f341e 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -10013,7 +10013,7 @@ } } }, - "revision": "20240222", + "revision": "20240305", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -10353,7 +10353,7 @@ "type": "object" }, "GoogleCloudApigeeV1ApiDoc": { - "description": "`ApiDoc` represents an API catalog item. Catalog items are used in two ways in a portal: - Users can browse and interact with a visual representation of the API documentation - The `api_product_name` field provides a link to a backing API product. Through this link, portal users can create and manage developer apps linked to one or more API products.", + "description": "`ApiDoc` represents an API catalog item. Catalog items are used in two ways in a portal: - Users can browse and interact with a visual representation of the API documentation - The `api_product_name` field provides a link to a backing [API product] (/apigee/docs/reference/apis/apigee/rest/v1/organizations.apiproducts). Through this link, portal users can create and manage developer apps linked to one or more API products.", "id": "GoogleCloudApigeeV1ApiDoc", "properties": { "anonAllowed": { diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index c20c7f1faa1..8c290564b05 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -1837,9 +1837,11 @@ func (s *GoogleCloudApigeeV1ApiCategoryResponse) MarshalJSON() ([]byte, error) { // GoogleCloudApigeeV1ApiDoc: `ApiDoc` represents an API catalog item. // Catalog items are used in two ways in a portal: - Users can browse // and interact with a visual representation of the API documentation - -// The `api_product_name` field provides a link to a backing API -// product. Through this link, portal users can create and manage -// developer apps linked to one or more API products. +// The `api_product_name` field provides a link to a backing [API +// product] +// (/apigee/docs/reference/apis/apigee/rest/v1/organizations.apiproducts) +// . Through this link, portal users can create and manage developer +// apps linked to one or more API products. type GoogleCloudApigeeV1ApiDoc struct { // AnonAllowed: Optional. Boolean flag that manages user access to the // catalog item. When true, the catalog item can be viewed anonymously; diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 0055e4ec6c0..6d2759b7459 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -115,6 +115,38 @@ }, "protocol": "rest", "resources": { + "media": { + "methods": { + "download": { + "description": "Download a file.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/files/{filesId}:download", + "httpMethod": "GET", + "id": "artifactregistry.media.download", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the file to download.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:download", + "response": { + "$ref": "DownloadFileResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "supportsMediaDownload": true, + "useMediaDownloadService": true + } + } + }, "projects": { "methods": { "getProjectSettings": { @@ -1193,6 +1225,40 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ] + }, + "patch": { + "description": "Updates a package.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/packages/{packagesId}", + "httpMethod": "PATCH", + "id": "artifactregistry.projects.locations.repositories.packages.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the package, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the package ID part contains slashes, the slashes are escaped.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Package" + }, + "response": { + "$ref": "Package" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1668,7 +1734,7 @@ } } }, - "revision": "20240223", + "revision": "20240305", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -1723,6 +1789,10 @@ "description": "Configuration for an Apt remote repository.", "id": "AptRepository", "properties": { + "customRepository": { + "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository", + "description": "Customer-specified remote repository." + }, "publicRepository": { "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository", "description": "One of the publicly available Apt repositories supported by Artifact Registry." @@ -1941,6 +2011,10 @@ "description": "Configuration for a Docker remote repository.", "id": "DockerRepository", "properties": { + "customRepository": { + "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository", + "description": "Customer-specified remote repository." + }, "publicRepository": { "description": "One of the publicly available Docker repositories supported by Artifact Registry.", "enum": [ @@ -1967,6 +2041,12 @@ }, "type": "object" }, + "DownloadFileResponse": { + "description": "The response to download a file.", + "id": "DownloadFileResponse", + "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", @@ -2090,6 +2170,17 @@ }, "type": "object" }, + "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository": { + "description": "Customer-specified publicly available remote repository.", + "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository", + "properties": { + "uri": { + "description": "An http/https uri reference to the upstream remote repository, for ex: \"https://my.apt.registry/\".", + "type": "string" + } + }, + "type": "object" + }, "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository": { "description": "Publicly available Apt repositories constructed from a common repository base and a custom repository path.", "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository", @@ -2117,6 +2208,61 @@ }, "type": "object" }, + "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository": { + "description": "Customer-specified publicly available remote repository.", + "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository", + "properties": { + "uri": { + "description": "An http/https uri reference to the custom remote repository, for ex: \"https://registry-1.docker.io\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository": { + "description": "Customer-specified publicly available remote repository.", + "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository", + "properties": { + "uri": { + "description": "An http/https uri reference to the upstream remote repository, for ex: \"https://my.maven.registry/\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository": { + "description": "Customer-specified publicly available remote repository.", + "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository", + "properties": { + "uri": { + "description": "An http/https uri reference to the upstream remote repository, for ex: \"https://my.npm.registry/\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository": { + "description": "Customer-specified publicly available remote repository.", + "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository", + "properties": { + "uri": { + "description": "An http/https uri reference to the upstream remote repository, for ex: \"https://my.python.registry/\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository": { + "description": "Customer-specified publicly available remote repository.", + "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository", + "properties": { + "uri": { + "description": "An http/https uri reference to the upstream remote repository, for ex: \"https://my.yum.registry/\".", + "type": "string" + } + }, + "type": "object" + }, "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository": { "description": "Publicly available Yum repositories constructed from a common repository base and a custom repository path.", "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository", @@ -2662,6 +2808,10 @@ "description": "Configuration for a Maven remote repository.", "id": "MavenRepository", "properties": { + "customRepository": { + "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository", + "description": "Customer-specified remote repository." + }, "publicRepository": { "description": "One of the publicly available Maven repositories supported by Artifact Registry.", "enum": [ @@ -2744,6 +2894,10 @@ "description": "Configuration for a Npm remote repository.", "id": "NpmRepository", "properties": { + "customRepository": { + "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository", + "description": "Customer-specified remote repository." + }, "publicRepository": { "description": "One of the publicly available Npm repositories supported by Artifact Registry.", "enum": [ @@ -2804,6 +2958,13 @@ "description": "Packages are named collections of versions.", "id": "Package", "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Client specified annotations.", + "type": "object" + }, "createTime": { "description": "The time when the package was created.", "format": "google-datetime", @@ -2924,6 +3085,10 @@ "description": "Configuration for a Python remote repository.", "id": "PythonRepository", "properties": { + "customRepository": { + "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository", + "description": "Customer-specified remote repository." + }, "publicRepository": { "description": "One of the publicly available Python repositories supported by Artifact Registry.", "enum": [ @@ -2951,6 +3116,10 @@ "description": "The description of the remote source.", "type": "string" }, + "disableUpstreamValidation": { + "description": "Input only. A create/update remote repo option to avoid making a HEAD/GET request to validate a remote repo and any supplied upstream credentials.", + "type": "boolean" + }, "dockerRepository": { "$ref": "DockerRepository", "description": "Specific settings for a Docker remote repository." @@ -3519,6 +3688,10 @@ "description": "Configuration for a Yum remote repository.", "id": "YumRepository", "properties": { + "customRepository": { + "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository", + "description": "Customer-specified remote repository." + }, "publicRepository": { "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository", "description": "One of the publicly available Yum repositories supported by Artifact Registry." diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 7edfc956e30..e038e5641f1 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -146,6 +146,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Media = NewMediaService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -155,6 +156,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Media *MediaService + Projects *ProjectsService } @@ -165,6 +168,15 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewMediaService(s *Service) *MediaService { + rs := &MediaService{s: s} + return rs +} + +type MediaService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -421,11 +433,14 @@ func (s *AptArtifact) MarshalJSON() ([]byte, error) { // AptRepository: Configuration for an Apt remote repository. type AptRepository struct { + // CustomRepository: Customer-specified remote repository. + CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository `json:"customRepository,omitempty"` + // PublicRepository: One of the publicly available Apt repositories // supported by Artifact Registry. PublicRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository `json:"publicRepository,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicRepository") to + // ForceSendFields is a list of field names (e.g. "CustomRepository") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -433,7 +448,7 @@ type AptRepository struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicRepository") to + // NullFields is a list of field names (e.g. "CustomRepository") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -831,6 +846,9 @@ func (s *DockerImage) MarshalJSON() ([]byte, error) { // DockerRepository: Configuration for a Docker remote repository. type DockerRepository struct { + // CustomRepository: Customer-specified remote repository. + CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository `json:"customRepository,omitempty"` + // PublicRepository: One of the publicly available Docker repositories // supported by Artifact Registry. // @@ -839,7 +857,7 @@ type DockerRepository struct { // "DOCKER_HUB" - Docker Hub. PublicRepository string `json:"publicRepository,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicRepository") to + // ForceSendFields is a list of field names (e.g. "CustomRepository") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -847,7 +865,7 @@ type DockerRepository struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicRepository") to + // NullFields is a list of field names (e.g. "CustomRepository") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -895,6 +913,13 @@ func (s *DockerRepositoryConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DownloadFileResponse: The response to download a file. +type DownloadFileResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // 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 @@ -1095,6 +1120,37 @@ func (s *GoogleDevtoolsArtifactregistryV1File) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCus +// tomRepository: Customer-specified publicly available remote +// repository. +type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository struct { + // Uri: An http/https uri reference to the upstream remote repository, + // for ex: "https://my.apt.registry/". + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPub // licRepository: Publicly available Apt repositories constructed from a // common repository base and a custom repository path. @@ -1136,6 +1192,161 @@ func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPubl return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepository +// CustomRepository: Customer-specified publicly available remote +// repository. +type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository struct { + // Uri: An http/https uri reference to the custom remote repository, for + // ex: "https://registry-1.docker.io". + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryC +// ustomRepository: Customer-specified publicly available remote +// repository. +type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository struct { + // Uri: An http/https uri reference to the upstream remote repository, + // for ex: "https://my.maven.registry/". + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCus +// tomRepository: Customer-specified publicly available remote +// repository. +type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository struct { + // Uri: An http/https uri reference to the upstream remote repository, + // for ex: "https://my.npm.registry/". + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepository +// CustomRepository: Customer-specified publicly available remote +// repository. +type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository struct { + // Uri: An http/https uri reference to the upstream remote repository, + // for ex: "https://my.python.registry/". + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCus +// tomRepository: Customer-specified publicly available remote +// repository. +type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository struct { + // Uri: An http/https uri reference to the upstream remote repository, + // for ex: "https://my.yum.registry/". + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPub // licRepository: Publicly available Yum repositories constructed from a // common repository base and a custom repository path. @@ -2121,6 +2332,9 @@ func (s *MavenArtifact) MarshalJSON() ([]byte, error) { // MavenRepository: Configuration for a Maven remote repository. type MavenRepository struct { + // CustomRepository: Customer-specified remote repository. + CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository `json:"customRepository,omitempty"` + // PublicRepository: One of the publicly available Maven repositories // supported by Artifact Registry. // @@ -2129,7 +2343,7 @@ type MavenRepository struct { // "MAVEN_CENTRAL" - Maven Central. PublicRepository string `json:"publicRepository,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicRepository") to + // ForceSendFields is a list of field names (e.g. "CustomRepository") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2137,7 +2351,7 @@ type MavenRepository struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicRepository") to + // NullFields is a list of field names (e.g. "CustomRepository") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2252,6 +2466,9 @@ func (s *NpmPackage) MarshalJSON() ([]byte, error) { // NpmRepository: Configuration for a Npm remote repository. type NpmRepository struct { + // CustomRepository: Customer-specified remote repository. + CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository `json:"customRepository,omitempty"` + // PublicRepository: One of the publicly available Npm repositories // supported by Artifact Registry. // @@ -2260,7 +2477,7 @@ type NpmRepository struct { // "NPMJS" - npmjs. PublicRepository string `json:"publicRepository,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicRepository") to + // ForceSendFields is a list of field names (e.g. "CustomRepository") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2268,7 +2485,7 @@ type NpmRepository struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicRepository") to + // NullFields is a list of field names (e.g. "CustomRepository") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2353,6 +2570,9 @@ type OperationMetadata struct { // Package: Packages are named collections of versions. type Package struct { + // Annotations: Optional. Client specified annotations. + Annotations map[string]string `json:"annotations,omitempty"` + // CreateTime: The time when the package was created. CreateTime string `json:"createTime,omitempty"` @@ -2372,7 +2592,7 @@ type Package struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Annotations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2380,10 +2600,10 @@ type Package struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -2609,6 +2829,9 @@ func (s *PythonPackage) MarshalJSON() ([]byte, error) { // PythonRepository: Configuration for a Python remote repository. type PythonRepository struct { + // CustomRepository: Customer-specified remote repository. + CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository `json:"customRepository,omitempty"` + // PublicRepository: One of the publicly available Python repositories // supported by Artifact Registry. // @@ -2617,7 +2840,7 @@ type PythonRepository struct { // "PYPI" - PyPI. PublicRepository string `json:"publicRepository,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicRepository") to + // ForceSendFields is a list of field names (e.g. "CustomRepository") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2625,7 +2848,7 @@ type PythonRepository struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicRepository") to + // NullFields is a list of field names (e.g. "CustomRepository") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2649,6 +2872,11 @@ type RemoteRepositoryConfig struct { // Description: The description of the remote source. Description string `json:"description,omitempty"` + // DisableUpstreamValidation: Input only. A create/update remote repo + // option to avoid making a HEAD/GET request to validate a remote repo + // and any supplied upstream credentials. + DisableUpstreamValidation bool `json:"disableUpstreamValidation,omitempty"` + // DockerRepository: Specific settings for a Docker remote repository. DockerRepository *DockerRepository `json:"dockerRepository,omitempty"` @@ -3615,11 +3843,14 @@ func (s *YumArtifact) MarshalJSON() ([]byte, error) { // YumRepository: Configuration for a Yum remote repository. type YumRepository struct { + // CustomRepository: Customer-specified remote repository. + CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository `json:"customRepository,omitempty"` + // PublicRepository: One of the publicly available Yum repositories // supported by Artifact Registry. PublicRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository `json:"publicRepository,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicRepository") to + // ForceSendFields is a list of field names (e.g. "CustomRepository") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3627,7 +3858,7 @@ type YumRepository struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicRepository") to + // NullFields is a list of field names (e.g. "CustomRepository") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -3643,6 +3874,171 @@ func (s *YumRepository) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "artifactregistry.media.download": + +type MediaDownloadCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Download: Download a file. +// +// - name: The name of the file to download. +func (r *MediaService) Download(name string) *MediaDownloadCall { + c := &MediaDownloadCall{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 *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall { + 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 *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do and Download +// methods. Any pending HTTP request will be aborted if the provided +// context is canceled. +func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MediaDownloadCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MediaDownloadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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}:download") + 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) +} + +// Download fetches the API endpoint's "media" value, instead of the normal +// API response value. If the returned error is nil, the Response is guaranteed to +// have a 2xx status code. Callers must close the Response.Body as usual. +func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("media") + if err != nil { + return nil, err + } + if err := googleapi.CheckResponse(res); err != nil { + res.Body.Close() + return nil, gensupport.WrapError(err) + } + return res, nil +} + +// Do executes the "artifactregistry.media.download" call. +// Exactly one of *DownloadFileResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DownloadFileResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*DownloadFileResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DownloadFileResponse{ + ServerResponse: 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": "Download a file.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/files/{filesId}:download", + // "httpMethod": "GET", + // "id": "artifactregistry.media.download", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the file to download.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:download", + // "response": { + // "$ref": "DownloadFileResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ], + // "supportsMediaDownload": true, + // "useMediaDownloadService": true + // } + +} + // method id "artifactregistry.projects.getProjectSettings": type ProjectsGetProjectSettingsCall struct { @@ -9091,6 +9487,164 @@ func (c *ProjectsLocationsRepositoriesPackagesListCall) Pages(ctx context.Contex } } +// method id "artifactregistry.projects.locations.repositories.packages.patch": + +type ProjectsLocationsRepositoriesPackagesPatchCall struct { + s *Service + name string + package_ *Package + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a package. +// +// - name: The name of the package, for example: +// `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1` +// . If the package ID part contains slashes, the slashes are escaped. +func (r *ProjectsLocationsRepositoriesPackagesService) Patch(name string, package_ *Package) *ProjectsLocationsRepositoriesPackagesPatchCall { + c := &ProjectsLocationsRepositoriesPackagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.package_ = package_ + return c +} + +// UpdateMask sets the optional parameter "updateMask": The update mask +// applies to the resource. For the `FieldMask` definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask +func (c *ProjectsLocationsRepositoriesPackagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPackagesPatchCall { + 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 *ProjectsLocationsRepositoriesPackagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesPatchCall { + 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 *ProjectsLocationsRepositoriesPackagesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPackagesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.package_) + 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 "artifactregistry.projects.locations.repositories.packages.patch" call. +// Exactly one of *Package or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Package.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Do(opts ...googleapi.CallOption) (*Package, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Package{ + ServerResponse: 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 package.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/packages/{packagesId}", + // "httpMethod": "PATCH", + // "id": "artifactregistry.projects.locations.repositories.packages.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the package, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the package ID part contains slashes, the slashes are escaped.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Package" + // }, + // "response": { + // "$ref": "Package" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "artifactregistry.projects.locations.repositories.packages.tags.create": type ProjectsLocationsRepositoriesPackagesTagsCreateCall struct { diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index d56389b36fe..7c041665e24 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -115,6 +115,38 @@ }, "protocol": "rest", "resources": { + "media": { + "methods": { + "download": { + "description": "Download a file.", + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/files/{filesId}:download", + "httpMethod": "GET", + "id": "artifactregistry.media.download", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the file to download.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta2/{+name}:download", + "response": { + "$ref": "DownloadFileResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "supportsMediaDownload": true, + "useMediaDownloadService": true + } + } + }, "projects": { "methods": { "getProjectSettings": { @@ -762,6 +794,40 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ] + }, + "patch": { + "description": "Updates a package.", + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/packages/{packagesId}", + "httpMethod": "PATCH", + "id": "artifactregistry.projects.locations.repositories.packages.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the package, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the package ID part contains slashes, the slashes are escaped.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta2/{+name}", + "request": { + "$ref": "Package" + }, + "response": { + "$ref": "Package" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1142,7 +1208,7 @@ } } }, - "revision": "20240223", + "revision": "20240305", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -1215,6 +1281,12 @@ }, "type": "object" }, + "DownloadFileResponse": { + "description": "The response to download a file.", + "id": "DownloadFileResponse", + "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", @@ -1663,6 +1735,13 @@ "description": "Packages are named collections of versions.", "id": "Package", "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Client specified annotations.", + "type": "object" + }, "createTime": { "description": "The time when the package was created.", "format": "google-datetime", diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index 9aba6fed651..41b7c0cd0f7 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -146,6 +146,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Media = NewMediaService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -155,6 +156,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Media *MediaService + Projects *ProjectsService } @@ -165,6 +168,15 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewMediaService(s *Service) *MediaService { + rs := &MediaService{s: s} + return rs +} + +type MediaService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -445,6 +457,13 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DownloadFileResponse: The response to download a file. +type DownloadFileResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // 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 @@ -1246,6 +1265,9 @@ type OperationMetadata struct { // Package: Packages are named collections of versions. type Package struct { + // Annotations: Optional. Client specified annotations. + Annotations map[string]string `json:"annotations,omitempty"` + // CreateTime: The time when the package was created. CreateTime string `json:"createTime,omitempty"` @@ -1265,7 +1287,7 @@ type Package struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Annotations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1273,10 +1295,10 @@ type Package struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -1958,6 +1980,171 @@ func (s *YumArtifact) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "artifactregistry.media.download": + +type MediaDownloadCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Download: Download a file. +// +// - name: The name of the file to download. +func (r *MediaService) Download(name string) *MediaDownloadCall { + c := &MediaDownloadCall{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 *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall { + 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 *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do and Download +// methods. Any pending HTTP request will be aborted if the provided +// context is canceled. +func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MediaDownloadCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MediaDownloadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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, "v1beta2/{+name}:download") + 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) +} + +// Download fetches the API endpoint's "media" value, instead of the normal +// API response value. If the returned error is nil, the Response is guaranteed to +// have a 2xx status code. Callers must close the Response.Body as usual. +func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("media") + if err != nil { + return nil, err + } + if err := googleapi.CheckResponse(res); err != nil { + res.Body.Close() + return nil, gensupport.WrapError(err) + } + return res, nil +} + +// Do executes the "artifactregistry.media.download" call. +// Exactly one of *DownloadFileResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DownloadFileResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*DownloadFileResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DownloadFileResponse{ + ServerResponse: 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": "Download a file.", + // "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/files/{filesId}:download", + // "httpMethod": "GET", + // "id": "artifactregistry.media.download", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the file to download.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/files/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}:download", + // "response": { + // "$ref": "DownloadFileResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ], + // "supportsMediaDownload": true, + // "useMediaDownloadService": true + // } + +} + // method id "artifactregistry.projects.getProjectSettings": type ProjectsGetProjectSettingsCall struct { @@ -5232,6 +5419,164 @@ func (c *ProjectsLocationsRepositoriesPackagesListCall) Pages(ctx context.Contex } } +// method id "artifactregistry.projects.locations.repositories.packages.patch": + +type ProjectsLocationsRepositoriesPackagesPatchCall struct { + s *Service + name string + package_ *Package + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a package. +// +// - name: The name of the package, for example: +// `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1` +// . If the package ID part contains slashes, the slashes are escaped. +func (r *ProjectsLocationsRepositoriesPackagesService) Patch(name string, package_ *Package) *ProjectsLocationsRepositoriesPackagesPatchCall { + c := &ProjectsLocationsRepositoriesPackagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.package_ = package_ + return c +} + +// UpdateMask sets the optional parameter "updateMask": The update mask +// applies to the resource. For the `FieldMask` definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask +func (c *ProjectsLocationsRepositoriesPackagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPackagesPatchCall { + 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 *ProjectsLocationsRepositoriesPackagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesPatchCall { + 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 *ProjectsLocationsRepositoriesPackagesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRepositoriesPackagesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.package_) + 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, "v1beta2/{+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 "artifactregistry.projects.locations.repositories.packages.patch" call. +// Exactly one of *Package or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Package.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Do(opts ...googleapi.CallOption) (*Package, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Package{ + ServerResponse: 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 package.", + // "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/packages/{packagesId}", + // "httpMethod": "PATCH", + // "id": "artifactregistry.projects.locations.repositories.packages.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the package, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the package ID part contains slashes, the slashes are escaped.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+/packages/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}", + // "request": { + // "$ref": "Package" + // }, + // "response": { + // "$ref": "Package" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "artifactregistry.projects.locations.repositories.packages.tags.create": type ProjectsLocationsRepositoriesPackagesTagsCreateCall struct { diff --git a/cloudbilling/v1beta/cloudbilling-api.json b/cloudbilling/v1beta/cloudbilling-api.json index 5db82b2dc83..d86e396c213 100644 --- a/cloudbilling/v1beta/cloudbilling-api.json +++ b/cloudbilling/v1beta/cloudbilling-api.json @@ -145,6 +145,80 @@ } }, "resources": { + "anomalies": { + "methods": { + "get": { + "description": "Gets an anomaly for a billing account or a project.", + "flatPath": "v1beta/billingAccounts/{billingAccountsId}/anomalies/{anomaliesId}", + "httpMethod": "GET", + "id": "cloudbilling.billingAccounts.anomalies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format for project: projects/{project}/anomalies/{anomalies}. Format for billing account: billingAccounts/{billing_account}/anomalies/{anomalies}.", + "location": "path", + "pattern": "^billingAccounts/[^/]+/anomalies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudBillingAnomaliesV1betaAnomaly" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-billing", + "https://www.googleapis.com/auth/cloud-billing.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists anomalies for a billing account or a project.", + "flatPath": "v1beta/billingAccounts/{billingAccountsId}/anomalies", + "httpMethod": "GET", + "id": "cloudbilling.billingAccounts.anomalies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Options for how to filter the anomalies. Currently, only filter on `start_time` and `end_time` is supported. Only =, AND operators are supported. If start_time and/or end_time empty, we only retrieve the most recent 30 days' anomalies. Examples: - start_time = \"20231201\" AND end_time = \"20240120\" .", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of anomalies to return. Results may return fewer than this value. Default value is 50 and maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token received from a previous ListAnomalies call to retrieve the next page of results. If this field is empty, the first page is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list Anomaly for the project. Format for project: projects/{project}. Format for billing account: billingAccounts/{billing_account}.", + "location": "path", + "pattern": "^billingAccounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/anomalies", + "response": { + "$ref": "GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-billing", + "https://www.googleapis.com/auth/cloud-billing.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "services": { "methods": { "get": { @@ -515,6 +589,84 @@ } } }, + "projects": { + "resources": { + "anomalies": { + "methods": { + "get": { + "description": "Gets an anomaly for a billing account or a project.", + "flatPath": "v1beta/projects/{projectsId}/anomalies/{anomaliesId}", + "httpMethod": "GET", + "id": "cloudbilling.projects.anomalies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format for project: projects/{project}/anomalies/{anomalies}. Format for billing account: billingAccounts/{billing_account}/anomalies/{anomalies}.", + "location": "path", + "pattern": "^projects/[^/]+/anomalies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudBillingAnomaliesV1betaAnomaly" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-billing", + "https://www.googleapis.com/auth/cloud-billing.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists anomalies for a billing account or a project.", + "flatPath": "v1beta/projects/{projectsId}/anomalies", + "httpMethod": "GET", + "id": "cloudbilling.projects.anomalies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Options for how to filter the anomalies. Currently, only filter on `start_time` and `end_time` is supported. Only =, AND operators are supported. If start_time and/or end_time empty, we only retrieve the most recent 30 days' anomalies. Examples: - start_time = \"20231201\" AND end_time = \"20240120\" .", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of anomalies to return. Results may return fewer than this value. Default value is 50 and maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token received from a previous ListAnomalies call to retrieve the next page of results. If this field is empty, the first page is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list Anomaly for the project. Format for project: projects/{project}. Format for billing account: billingAccounts/{billing_account}.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/anomalies", + "response": { + "$ref": "GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-billing", + "https://www.googleapis.com/auth/cloud-billing.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "skuGroups": { "methods": { "get": { @@ -758,7 +910,7 @@ } } }, - "revision": "20231215", + "revision": "20240301", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "CacheFillRegions": { @@ -1319,6 +1471,157 @@ }, "type": "object" }, + "GoogleCloudBillingAnomaliesV1betaAnomaly": { + "description": "Encapsulates an anomaly.", + "id": "GoogleCloudBillingAnomaliesV1betaAnomaly", + "properties": { + "detectionTime": { + "description": "Time that the anomaly was detected. Will be set to 00:00 google time of the detected date.", + "format": "google-datetime", + "type": "string" + }, + "deviation": { + "$ref": "GoogleCloudBillingAnomaliesV1betaAnomalyDeviation", + "description": "Deviation information of the anomaly." + }, + "name": { + "description": "Identifier. Resource name for the anomaly.", + "type": "string" + }, + "resourceDisplayName": { + "description": "The display name of the resource that the anomaly occurred in/belongs to.", + "type": "string" + }, + "rootCauses": { + "description": "A list of causes which contribute to the anomaly.", + "items": { + "$ref": "GoogleCloudBillingAnomaliesV1betaCause" + }, + "type": "array" + }, + "scope": { + "description": "Indicate the scope of the anomaly.", + "enum": [ + "SCOPE_UNSPECIFIED", + "SCOPE_BILLING_ACCOUNT", + "SCOPE_PROJECT" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Indicates the anomaly is for a billing account.", + "Indicates the anomaly is for a project." + ], + "type": "string" + }, + "severity": { + "description": "Severity of the anomaly. Unspecified if severity is not met/assigned.", + "enum": [ + "ANOMALY_SEVERITY_UNSPECIFIED", + "ANOMALY_SEVERITY_LOW", + "ANOMALY_SEVERITY_MEDIUM", + "ANOMALY_SEVERITY_HIGH" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Indicates the anomaly's severity is low.", + "Indicates the anomaly's severity is medium.", + "Indicates the anomaly's severity is high." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The most recent anomaly's last updated time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBillingAnomaliesV1betaAnomalyDeviation": { + "description": "Encapsulates the deviation information.", + "id": "GoogleCloudBillingAnomaliesV1betaAnomalyDeviation", + "properties": { + "actualSpend": { + "$ref": "Money", + "description": "The actual spend for the anomaly." + }, + "deviationAmount": { + "$ref": "Money", + "description": "The difference between the actual spend and expected spend's upper bound. Calculation formula: deviation_amount = actual_spend - expected_spend." + }, + "deviationPercentage": { + "description": "The percentage of devition amount from expected spend's upper bound. Calculation formula: deviation_percentage = divation_amount / expected_spend * 100.", + "format": "double", + "type": "number" + }, + "expectedSpend": { + "$ref": "Money", + "description": "The expected spend for the anomaly." + } + }, + "type": "object" + }, + "GoogleCloudBillingAnomaliesV1betaCause": { + "description": "Encapsulates the information of the reason which caused the anomaly.", + "id": "GoogleCloudBillingAnomaliesV1betaCause", + "properties": { + "causeType": { + "description": "The cause type.", + "enum": [ + "CAUSE_TYPE_UNSPECIFIED", + "CAUSE_TYPE_PROJECT", + "CAUSE_TYPE_SERVICE", + "CAUSE_TYPE_SKU" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Caused by a project.", + "Caused by a service.", + "Caused by a SKU." + ], + "type": "string" + }, + "deviation": { + "$ref": "GoogleCloudBillingAnomaliesV1betaAnomalyDeviation", + "description": "The deviation information for the cause." + }, + "displayName": { + "description": "The display name of the cause.", + "type": "string" + }, + "resource": { + "description": "The resource name of the cause. project: projects/{project}. service: services/{service}. sku: services/{service}/skus/{sku}.", + "type": "string" + }, + "subCauses": { + "description": "The sub causes.", + "items": { + "$ref": "GoogleCloudBillingAnomaliesV1betaCause" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse": { + "description": "Response message for ListAnomalies.", + "id": "GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse", + "properties": { + "anomalies": { + "description": "The returned anomalies.", + "items": { + "$ref": "GoogleCloudBillingAnomaliesV1betaAnomaly" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token that can be sent as `page_token` in the subsequent request to retrieve the next page. If this field is empty, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudBillingBillingaccountpricesV1betaAggregationInfo": { "description": "Encapsulates the aggregation information such as aggregation level and interval for a billing account price.", "id": "GoogleCloudBillingBillingaccountpricesV1betaAggregationInfo", diff --git a/cloudbilling/v1beta/cloudbilling-gen.go b/cloudbilling/v1beta/cloudbilling-gen.go index cfdca2547a0..5d38970f6b1 100644 --- a/cloudbilling/v1beta/cloudbilling-gen.go +++ b/cloudbilling/v1beta/cloudbilling-gen.go @@ -150,6 +150,7 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.BillingAccounts = NewBillingAccountsService(s) + s.Projects = NewProjectsService(s) s.SkuGroups = NewSkuGroupsService(s) s.Skus = NewSkusService(s) s.V1beta = NewV1betaService(s) @@ -163,6 +164,8 @@ type Service struct { BillingAccounts *BillingAccountsService + Projects *ProjectsService + SkuGroups *SkuGroupsService Skus *SkusService @@ -179,6 +182,7 @@ func (s *Service) userAgent() string { func NewBillingAccountsService(s *Service) *BillingAccountsService { rs := &BillingAccountsService{s: s} + rs.Anomalies = NewBillingAccountsAnomaliesService(s) rs.Services = NewBillingAccountsServicesService(s) rs.SkuGroups = NewBillingAccountsSkuGroupsService(s) rs.Skus = NewBillingAccountsSkusService(s) @@ -188,6 +192,8 @@ func NewBillingAccountsService(s *Service) *BillingAccountsService { type BillingAccountsService struct { s *Service + Anomalies *BillingAccountsAnomaliesService + Services *BillingAccountsServicesService SkuGroups *BillingAccountsSkuGroupsService @@ -195,6 +201,15 @@ type BillingAccountsService struct { Skus *BillingAccountsSkusService } +func NewBillingAccountsAnomaliesService(s *Service) *BillingAccountsAnomaliesService { + rs := &BillingAccountsAnomaliesService{s: s} + return rs +} + +type BillingAccountsAnomaliesService struct { + s *Service +} + func NewBillingAccountsServicesService(s *Service) *BillingAccountsServicesService { rs := &BillingAccountsServicesService{s: s} return rs @@ -258,6 +273,27 @@ type BillingAccountsSkusPricesService struct { s *Service } +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Anomalies = NewProjectsAnomaliesService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Anomalies *ProjectsAnomaliesService +} + +func NewProjectsAnomaliesService(s *Service) *ProjectsAnomaliesService { + rs := &ProjectsAnomaliesService{s: s} + return rs +} + +type ProjectsAnomaliesService struct { + s *Service +} + func NewSkuGroupsService(s *Service) *SkuGroupsService { rs := &SkuGroupsService{s: s} rs.Skus = NewSkuGroupsSkusService(s) @@ -1292,6 +1328,218 @@ func (s *EstimationTimePoint) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBillingAnomaliesV1betaAnomaly: Encapsulates an anomaly. +type GoogleCloudBillingAnomaliesV1betaAnomaly struct { + // DetectionTime: Time that the anomaly was detected. Will be set to + // 00:00 google time of the detected date. + DetectionTime string `json:"detectionTime,omitempty"` + + // Deviation: Deviation information of the anomaly. + Deviation *GoogleCloudBillingAnomaliesV1betaAnomalyDeviation `json:"deviation,omitempty"` + + // Name: Identifier. Resource name for the anomaly. + Name string `json:"name,omitempty"` + + // ResourceDisplayName: The display name of the resource that the + // anomaly occurred in/belongs to. + ResourceDisplayName string `json:"resourceDisplayName,omitempty"` + + // RootCauses: A list of causes which contribute to the anomaly. + RootCauses []*GoogleCloudBillingAnomaliesV1betaCause `json:"rootCauses,omitempty"` + + // Scope: Indicate the scope of the anomaly. + // + // Possible values: + // "SCOPE_UNSPECIFIED" - Default unspecified value. + // "SCOPE_BILLING_ACCOUNT" - Indicates the anomaly is for a billing + // account. + // "SCOPE_PROJECT" - Indicates the anomaly is for a project. + Scope string `json:"scope,omitempty"` + + // Severity: Severity of the anomaly. Unspecified if severity is not + // met/assigned. + // + // Possible values: + // "ANOMALY_SEVERITY_UNSPECIFIED" - Default unspecified value. + // "ANOMALY_SEVERITY_LOW" - Indicates the anomaly's severity is low. + // "ANOMALY_SEVERITY_MEDIUM" - Indicates the anomaly's severity is + // medium. + // "ANOMALY_SEVERITY_HIGH" - Indicates the anomaly's severity is high. + Severity string `json:"severity,omitempty"` + + // UpdateTime: Output only. The most recent anomaly's last updated time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DetectionTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectionTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBillingAnomaliesV1betaAnomaly) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBillingAnomaliesV1betaAnomaly + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBillingAnomaliesV1betaAnomalyDeviation: Encapsulates the +// deviation information. +type GoogleCloudBillingAnomaliesV1betaAnomalyDeviation struct { + // ActualSpend: The actual spend for the anomaly. + ActualSpend *Money `json:"actualSpend,omitempty"` + + // DeviationAmount: The difference between the actual spend and expected + // spend's upper bound. Calculation formula: deviation_amount = + // actual_spend - expected_spend. + DeviationAmount *Money `json:"deviationAmount,omitempty"` + + // DeviationPercentage: The percentage of devition amount from expected + // spend's upper bound. Calculation formula: deviation_percentage = + // divation_amount / expected_spend * 100. + DeviationPercentage float64 `json:"deviationPercentage,omitempty"` + + // ExpectedSpend: The expected spend for the anomaly. + ExpectedSpend *Money `json:"expectedSpend,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActualSpend") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActualSpend") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBillingAnomaliesV1betaAnomalyDeviation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBillingAnomaliesV1betaAnomalyDeviation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudBillingAnomaliesV1betaAnomalyDeviation) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudBillingAnomaliesV1betaAnomalyDeviation + var s1 struct { + DeviationPercentage gensupport.JSONFloat64 `json:"deviationPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DeviationPercentage = float64(s1.DeviationPercentage) + return nil +} + +// GoogleCloudBillingAnomaliesV1betaCause: Encapsulates the information +// of the reason which caused the anomaly. +type GoogleCloudBillingAnomaliesV1betaCause struct { + // CauseType: The cause type. + // + // Possible values: + // "CAUSE_TYPE_UNSPECIFIED" - Default unspecified value. + // "CAUSE_TYPE_PROJECT" - Caused by a project. + // "CAUSE_TYPE_SERVICE" - Caused by a service. + // "CAUSE_TYPE_SKU" - Caused by a SKU. + CauseType string `json:"causeType,omitempty"` + + // Deviation: The deviation information for the cause. + Deviation *GoogleCloudBillingAnomaliesV1betaAnomalyDeviation `json:"deviation,omitempty"` + + // DisplayName: The display name of the cause. + DisplayName string `json:"displayName,omitempty"` + + // Resource: The resource name of the cause. project: + // projects/{project}. service: services/{service}. sku: + // services/{service}/skus/{sku}. + Resource string `json:"resource,omitempty"` + + // SubCauses: The sub causes. + SubCauses []*GoogleCloudBillingAnomaliesV1betaCause `json:"subCauses,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CauseType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CauseType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBillingAnomaliesV1betaCause) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBillingAnomaliesV1betaCause + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse: Response +// message for ListAnomalies. +type GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse struct { + // Anomalies: The returned anomalies. + Anomalies []*GoogleCloudBillingAnomaliesV1betaAnomaly `json:"anomalies,omitempty"` + + // NextPageToken: Token that can be sent as `page_token` in the + // subsequent request to retrieve the next page. If this field is empty, + // 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. "Anomalies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Anomalies") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudBillingBillingaccountpricesV1betaAggregationInfo: // Encapsulates the aggregation information such as aggregation level // and interval for a billing account price. @@ -4404,9 +4652,9 @@ func (c *BillingAccountsEstimateCostScenarioCall) Do(opts ...googleapi.CallOptio } -// method id "cloudbilling.billingAccounts.services.get": +// method id "cloudbilling.billingAccounts.anomalies.get": -type BillingAccountsServicesGetCall struct { +type BillingAccountsAnomaliesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4415,12 +4663,13 @@ type BillingAccountsServicesGetCall struct { header_ http.Header } -// Get: Gets a Google Cloud service visible to a billing account. +// Get: Gets an anomaly for a billing account or a project. // -// - name: The name of the billing account service to retrieve. Format: -// billingAccounts/{billing_account}/services/{service}. -func (r *BillingAccountsServicesService) Get(name string) *BillingAccountsServicesGetCall { - c := &BillingAccountsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Format for project: projects/{project}/anomalies/{anomalies}. +// Format for billing account: +// billingAccounts/{billing_account}/anomalies/{anomalies}. +func (r *BillingAccountsAnomaliesService) Get(name string) *BillingAccountsAnomaliesGetCall { + c := &BillingAccountsAnomaliesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4428,7 +4677,7 @@ func (r *BillingAccountsServicesService) Get(name string) *BillingAccountsServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsServicesGetCall) Fields(s ...googleapi.Field) *BillingAccountsServicesGetCall { +func (c *BillingAccountsAnomaliesGetCall) Fields(s ...googleapi.Field) *BillingAccountsAnomaliesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4438,7 +4687,7 @@ func (c *BillingAccountsServicesGetCall) Fields(s ...googleapi.Field) *BillingAc // 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 *BillingAccountsServicesGetCall) IfNoneMatch(entityTag string) *BillingAccountsServicesGetCall { +func (c *BillingAccountsAnomaliesGetCall) IfNoneMatch(entityTag string) *BillingAccountsAnomaliesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -4446,21 +4695,21 @@ func (c *BillingAccountsServicesGetCall) IfNoneMatch(entityTag string) *BillingA // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsServicesGetCall) Context(ctx context.Context) *BillingAccountsServicesGetCall { +func (c *BillingAccountsAnomaliesGetCall) Context(ctx context.Context) *BillingAccountsAnomaliesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsServicesGetCall) Header() http.Header { +func (c *BillingAccountsAnomaliesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsAnomaliesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4486,17 +4735,16 @@ func (c *BillingAccountsServicesGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.services.get" call. -// Exactly one of -// *GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService.S -// erverResponse.Header or (if a response was returned at all) in +// Do executes the "cloudbilling.billingAccounts.anomalies.get" call. +// Exactly one of *GoogleCloudBillingAnomaliesV1betaAnomaly or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudBillingAnomaliesV1betaAnomaly.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *BillingAccountsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService, error) { +func (c *BillingAccountsAnomaliesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingAnomaliesV1betaAnomaly, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4515,7 +4763,7 @@ func (c *BillingAccountsServicesGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService{ + ret := &GoogleCloudBillingAnomaliesV1betaAnomaly{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4527,25 +4775,25 @@ func (c *BillingAccountsServicesGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Gets a Google Cloud service visible to a billing account.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/services/{servicesId}", + // "description": "Gets an anomaly for a billing account or a project.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/anomalies/{anomaliesId}", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.services.get", + // "id": "cloudbilling.billingAccounts.anomalies.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the billing account service to retrieve. Format: billingAccounts/{billing_account}/services/{service}", + // "description": "Required. Format for project: projects/{project}/anomalies/{anomalies}. Format for billing account: billingAccounts/{billing_account}/anomalies/{anomalies}.", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/services/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/anomalies/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService" + // "$ref": "GoogleCloudBillingAnomaliesV1betaAnomaly" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -4556,9 +4804,9 @@ func (c *BillingAccountsServicesGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "cloudbilling.billingAccounts.services.list": +// method id "cloudbilling.billingAccounts.anomalies.list": -type BillingAccountsServicesListCall struct { +type BillingAccountsAnomaliesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -4567,29 +4815,40 @@ type BillingAccountsServicesListCall struct { header_ http.Header } -// List: Lists services visible to a billing account. +// List: Lists anomalies for a billing account or a project. // -// - parent: The billing account to list billing account service from. -// Format: billingAccounts/{billing_account}. -func (r *BillingAccountsServicesService) List(parent string) *BillingAccountsServicesListCall { - c := &BillingAccountsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The project to list Anomaly for the project. Format for +// project: projects/{project}. Format for billing account: +// billingAccounts/{billing_account}. +func (r *BillingAccountsAnomaliesService) List(parent string) *BillingAccountsAnomaliesListCall { + c := &BillingAccountsAnomaliesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": Options for how to +// filter the anomalies. Currently, only filter on `start_time` and +// `end_time` is supported. Only =, AND operators are supported. If +// start_time and/or end_time empty, we only retrieve the most recent 30 +// days' anomalies. Examples: - start_time = "20231201" AND end_time = +// "20240120" . +func (c *BillingAccountsAnomaliesListCall) Filter(filter string) *BillingAccountsAnomaliesListCall { + c.urlParams_.Set("filter", filter) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum number of -// billing account service to return. Results may return fewer than this -// value. Default value is 50 and maximum value is 5000. -func (c *BillingAccountsServicesListCall) PageSize(pageSize int64) *BillingAccountsServicesListCall { +// anomalies to return. Results may return fewer than this value. +// Default value is 50 and maximum value is 1000. +func (c *BillingAccountsAnomaliesListCall) PageSize(pageSize int64) *BillingAccountsAnomaliesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListBillingAccountServices call to retrieve -// the next page of results. If this field is empty, the first page is -// returned. -func (c *BillingAccountsServicesListCall) PageToken(pageToken string) *BillingAccountsServicesListCall { +// received from a previous ListAnomalies call to retrieve the next page +// of results. If this field is empty, the first page is returned. +func (c *BillingAccountsAnomaliesListCall) PageToken(pageToken string) *BillingAccountsAnomaliesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4597,7 +4856,7 @@ func (c *BillingAccountsServicesListCall) PageToken(pageToken string) *BillingAc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsServicesListCall) Fields(s ...googleapi.Field) *BillingAccountsServicesListCall { +func (c *BillingAccountsAnomaliesListCall) Fields(s ...googleapi.Field) *BillingAccountsAnomaliesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4607,7 +4866,7 @@ func (c *BillingAccountsServicesListCall) Fields(s ...googleapi.Field) *BillingA // 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 *BillingAccountsServicesListCall) IfNoneMatch(entityTag string) *BillingAccountsServicesListCall { +func (c *BillingAccountsAnomaliesListCall) IfNoneMatch(entityTag string) *BillingAccountsAnomaliesListCall { c.ifNoneMatch_ = entityTag return c } @@ -4615,21 +4874,21 @@ func (c *BillingAccountsServicesListCall) IfNoneMatch(entityTag string) *Billing // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsServicesListCall) Context(ctx context.Context) *BillingAccountsServicesListCall { +func (c *BillingAccountsAnomaliesListCall) Context(ctx context.Context) *BillingAccountsAnomaliesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsServicesListCall) Header() http.Header { +func (c *BillingAccountsAnomaliesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsServicesListCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsAnomaliesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4642,7 +4901,7 @@ func (c *BillingAccountsServicesListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/services") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/anomalies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4655,17 +4914,17 @@ func (c *BillingAccountsServicesListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.services.list" call. +// Do executes the "cloudbilling.billingAccounts.anomalies.list" call. // Exactly one of -// *GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServi -// cesResponse or error will be non-nil. Any non-2xx status code is an -// error. Response headers are in either -// *GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServi -// cesResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BillingAccountsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServicesResponse, error) { +// *GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsAnomaliesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4684,7 +4943,7 @@ func (c *BillingAccountsServicesListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServicesResponse{ + ret := &GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4696,36 +4955,41 @@ func (c *BillingAccountsServicesListCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Lists services visible to a billing account.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/services", + // "description": "Lists anomalies for a billing account or a project.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/anomalies", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.services.list", + // "id": "cloudbilling.billingAccounts.anomalies.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. Options for how to filter the anomalies. Currently, only filter on `start_time` and `end_time` is supported. Only =, AND operators are supported. If start_time and/or end_time empty, we only retrieve the most recent 30 days' anomalies. Examples: - start_time = \"20231201\" AND end_time = \"20240120\" .", + // "location": "query", + // "type": "string" + // }, // "pageSize": { - // "description": "Maximum number of billing account service to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", + // "description": "Optional. Maximum number of anomalies to return. Results may return fewer than this value. Default value is 50 and maximum value is 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token received from a previous ListBillingAccountServices call to retrieve the next page of results. If this field is empty, the first page is returned.", + // "description": "Optional. Page token received from a previous ListAnomalies call to retrieve the next page of results. If this field is empty, the first page is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The billing account to list billing account service from. Format: billingAccounts/{billing_account}", + // "description": "Required. The project to list Anomaly for the project. Format for project: projects/{project}. Format for billing account: billingAccounts/{billing_account}.", // "location": "path", // "pattern": "^billingAccounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/services", + // "path": "v1beta/{+parent}/anomalies", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServicesResponse" + // "$ref": "GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -4739,7 +5003,7 @@ func (c *BillingAccountsServicesListCall) Do(opts ...googleapi.CallOption) (*Goo // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *BillingAccountsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServicesResponse) error) error { +func (c *BillingAccountsAnomaliesListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -4757,9 +5021,9 @@ func (c *BillingAccountsServicesListCall) Pages(ctx context.Context, f func(*Goo } } -// method id "cloudbilling.billingAccounts.skuGroups.get": +// method id "cloudbilling.billingAccounts.services.get": -type BillingAccountsSkuGroupsGetCall struct { +type BillingAccountsServicesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4768,12 +5032,12 @@ type BillingAccountsSkuGroupsGetCall struct { header_ http.Header } -// Get: Gets a SKU group visible to a billing account. +// Get: Gets a Google Cloud service visible to a billing account. // -// - name: The name of the BillingAccountSkuGroup to retrieve. Format: -// billingAccounts/{billing_account}/skuGroups/{sku_group}. -func (r *BillingAccountsSkuGroupsService) Get(name string) *BillingAccountsSkuGroupsGetCall { - c := &BillingAccountsSkuGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the billing account service to retrieve. Format: +// billingAccounts/{billing_account}/services/{service}. +func (r *BillingAccountsServicesService) Get(name string) *BillingAccountsServicesGetCall { + c := &BillingAccountsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4781,7 +5045,7 @@ func (r *BillingAccountsSkuGroupsService) Get(name string) *BillingAccountsSkuGr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsSkuGroupsGetCall) Fields(s ...googleapi.Field) *BillingAccountsSkuGroupsGetCall { +func (c *BillingAccountsServicesGetCall) Fields(s ...googleapi.Field) *BillingAccountsServicesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4791,7 +5055,7 @@ func (c *BillingAccountsSkuGroupsGetCall) Fields(s ...googleapi.Field) *BillingA // 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 *BillingAccountsSkuGroupsGetCall) IfNoneMatch(entityTag string) *BillingAccountsSkuGroupsGetCall { +func (c *BillingAccountsServicesGetCall) IfNoneMatch(entityTag string) *BillingAccountsServicesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -4799,21 +5063,21 @@ func (c *BillingAccountsSkuGroupsGetCall) IfNoneMatch(entityTag string) *Billing // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsSkuGroupsGetCall) Context(ctx context.Context) *BillingAccountsSkuGroupsGetCall { +func (c *BillingAccountsServicesGetCall) Context(ctx context.Context) *BillingAccountsServicesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsSkuGroupsGetCall) Header() http.Header { +func (c *BillingAccountsServicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsSkuGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4839,19 +5103,17 @@ func (c *BillingAccountsSkuGroupsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.skuGroups.get" call. +// Do executes the "cloudbilling.billingAccounts.services.get" call. // Exactly one of -// *GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup -// -// or error will be non-nil. Any non-2xx status code is an error. -// +// *GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService +// or error will be non-nil. Any non-2xx status code is an error. // Response headers are in either -// *GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup -// .ServerResponse.Header or (if a response was returned at all) in +// *GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService.S +// erverResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *BillingAccountsSkuGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup, error) { +func (c *BillingAccountsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4870,7 +5132,7 @@ func (c *BillingAccountsSkuGroupsGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup{ + ret := &GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4882,25 +5144,25 @@ func (c *BillingAccountsSkuGroupsGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets a SKU group visible to a billing account.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skuGroups/{skuGroupsId}", + // "description": "Gets a Google Cloud service visible to a billing account.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/services/{servicesId}", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.skuGroups.get", + // "id": "cloudbilling.billingAccounts.services.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the BillingAccountSkuGroup to retrieve. Format: billingAccounts/{billing_account}/skuGroups/{sku_group}", + // "description": "Required. The name of the billing account service to retrieve. Format: billingAccounts/{billing_account}/services/{service}", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/skuGroups/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/services/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup" + // "$ref": "GoogleCloudBillingBillingaccountservicesV1betaBillingAccountService" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -4911,9 +5173,9 @@ func (c *BillingAccountsSkuGroupsGetCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "cloudbilling.billingAccounts.skuGroups.list": +// method id "cloudbilling.billingAccounts.services.list": -type BillingAccountsSkuGroupsListCall struct { +type BillingAccountsServicesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -4922,29 +5184,29 @@ type BillingAccountsSkuGroupsListCall struct { header_ http.Header } -// List: Lists SKU groups visible to a billing account. +// List: Lists services visible to a billing account. // -// - parent: The billing account to list billing account SKU groups -// from. Format: billingAccounts/{billing_account}. -func (r *BillingAccountsSkuGroupsService) List(parent string) *BillingAccountsSkuGroupsListCall { - c := &BillingAccountsSkuGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The billing account to list billing account service from. +// Format: billingAccounts/{billing_account}. +func (r *BillingAccountsServicesService) List(parent string) *BillingAccountsServicesListCall { + c := &BillingAccountsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// billing account SKU groups to return. Results may return fewer than -// this value. Default value is 50 and maximum value is 5000. -func (c *BillingAccountsSkuGroupsListCall) PageSize(pageSize int64) *BillingAccountsSkuGroupsListCall { +// billing account service to return. Results may return fewer than this +// value. Default value is 50 and maximum value is 5000. +func (c *BillingAccountsServicesListCall) PageSize(pageSize int64) *BillingAccountsServicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListBillingAccountSkuGroups call to retrieve +// received from a previous ListBillingAccountServices call to retrieve // the next page of results. If this field is empty, the first page is // returned. -func (c *BillingAccountsSkuGroupsListCall) PageToken(pageToken string) *BillingAccountsSkuGroupsListCall { +func (c *BillingAccountsServicesListCall) PageToken(pageToken string) *BillingAccountsServicesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4952,7 +5214,7 @@ func (c *BillingAccountsSkuGroupsListCall) PageToken(pageToken string) *BillingA // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsSkuGroupsListCall) Fields(s ...googleapi.Field) *BillingAccountsSkuGroupsListCall { +func (c *BillingAccountsServicesListCall) Fields(s ...googleapi.Field) *BillingAccountsServicesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4962,7 +5224,7 @@ func (c *BillingAccountsSkuGroupsListCall) Fields(s ...googleapi.Field) *Billing // 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 *BillingAccountsSkuGroupsListCall) IfNoneMatch(entityTag string) *BillingAccountsSkuGroupsListCall { +func (c *BillingAccountsServicesListCall) IfNoneMatch(entityTag string) *BillingAccountsServicesListCall { c.ifNoneMatch_ = entityTag return c } @@ -4970,21 +5232,21 @@ func (c *BillingAccountsSkuGroupsListCall) IfNoneMatch(entityTag string) *Billin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsSkuGroupsListCall) Context(ctx context.Context) *BillingAccountsSkuGroupsListCall { +func (c *BillingAccountsServicesListCall) Context(ctx context.Context) *BillingAccountsServicesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsSkuGroupsListCall) Header() http.Header { +func (c *BillingAccountsServicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsSkuGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4997,7 +5259,7 @@ func (c *BillingAccountsSkuGroupsListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/skuGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/services") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5010,17 +5272,17 @@ func (c *BillingAccountsSkuGroupsListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.skuGroups.list" call. +// Do executes the "cloudbilling.billingAccounts.services.list" call. // Exactly one of -// *GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuG -// roupsResponse or error will be non-nil. Any non-2xx status code is an +// *GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServi +// cesResponse or error will be non-nil. Any non-2xx status code is an // error. Response headers are in either -// *GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuG -// roupsResponse.ServerResponse.Header or (if a response was returned at +// *GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServi +// cesResponse.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BillingAccountsSkuGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuGroupsResponse, error) { +func (c *BillingAccountsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServicesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5039,7 +5301,7 @@ func (c *BillingAccountsSkuGroupsListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuGroupsResponse{ + ret := &GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServicesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5051,36 +5313,36 @@ func (c *BillingAccountsSkuGroupsListCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Lists SKU groups visible to a billing account.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skuGroups", + // "description": "Lists services visible to a billing account.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/services", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.skuGroups.list", + // "id": "cloudbilling.billingAccounts.services.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of billing account SKU groups to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", + // "description": "Maximum number of billing account service to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token received from a previous ListBillingAccountSkuGroups call to retrieve the next page of results. If this field is empty, the first page is returned.", + // "description": "Page token received from a previous ListBillingAccountServices call to retrieve the next page of results. If this field is empty, the first page is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The billing account to list billing account SKU groups from. Format: billingAccounts/{billing_account}", + // "description": "Required. The billing account to list billing account service from. Format: billingAccounts/{billing_account}", // "location": "path", // "pattern": "^billingAccounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/skuGroups", + // "path": "v1beta/{+parent}/services", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuGroupsResponse" + // "$ref": "GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServicesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -5094,7 +5356,7 @@ func (c *BillingAccountsSkuGroupsListCall) Do(opts ...googleapi.CallOption) (*Go // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *BillingAccountsSkuGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuGroupsResponse) error) error { +func (c *BillingAccountsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountservicesV1betaListBillingAccountServicesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -5112,9 +5374,9 @@ func (c *BillingAccountsSkuGroupsListCall) Pages(ctx context.Context, f func(*Go } } -// method id "cloudbilling.billingAccounts.skuGroups.skus.get": +// method id "cloudbilling.billingAccounts.skuGroups.get": -type BillingAccountsSkuGroupsSkusGetCall struct { +type BillingAccountsSkuGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -5123,13 +5385,12 @@ type BillingAccountsSkuGroupsSkusGetCall struct { header_ http.Header } -// Get: Gets a SKU that is part of a billing account SKU group. +// Get: Gets a SKU group visible to a billing account. // -// - name: The name of the billing account SKU group SKU to retrieve. -// Format: -// billingAccounts/{billing_account}/skuGroups/{sku_group}/skus/{sku}. -func (r *BillingAccountsSkuGroupsSkusService) Get(name string) *BillingAccountsSkuGroupsSkusGetCall { - c := &BillingAccountsSkuGroupsSkusGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the BillingAccountSkuGroup to retrieve. Format: +// billingAccounts/{billing_account}/skuGroups/{sku_group}. +func (r *BillingAccountsSkuGroupsService) Get(name string) *BillingAccountsSkuGroupsGetCall { + c := &BillingAccountsSkuGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -5137,7 +5398,7 @@ func (r *BillingAccountsSkuGroupsSkusService) Get(name string) *BillingAccountsS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsSkuGroupsSkusGetCall) Fields(s ...googleapi.Field) *BillingAccountsSkuGroupsSkusGetCall { +func (c *BillingAccountsSkuGroupsGetCall) Fields(s ...googleapi.Field) *BillingAccountsSkuGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5147,7 +5408,7 @@ func (c *BillingAccountsSkuGroupsSkusGetCall) Fields(s ...googleapi.Field) *Bill // 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 *BillingAccountsSkuGroupsSkusGetCall) IfNoneMatch(entityTag string) *BillingAccountsSkuGroupsSkusGetCall { +func (c *BillingAccountsSkuGroupsGetCall) IfNoneMatch(entityTag string) *BillingAccountsSkuGroupsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5155,21 +5416,21 @@ func (c *BillingAccountsSkuGroupsSkusGetCall) IfNoneMatch(entityTag string) *Bil // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsSkuGroupsSkusGetCall) Context(ctx context.Context) *BillingAccountsSkuGroupsSkusGetCall { +func (c *BillingAccountsSkuGroupsGetCall) Context(ctx context.Context) *BillingAccountsSkuGroupsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsSkuGroupsSkusGetCall) Header() http.Header { +func (c *BillingAccountsSkuGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsSkuGroupsSkusGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsSkuGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5195,17 +5456,19 @@ func (c *BillingAccountsSkuGroupsSkusGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.skuGroups.skus.get" call. +// Do executes the "cloudbilling.billingAccounts.skuGroups.get" call. // Exactly one of -// *GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGr -// oupSku or error will be non-nil. Any non-2xx status code is an error. +// *GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup +// +// or error will be non-nil. Any non-2xx status code is an error. +// // Response headers are in either -// *GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGr -// oupSku.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BillingAccountsSkuGroupsSkusGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGroupSku, error) { +// *GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup +// .ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsSkuGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5224,7 +5487,7 @@ func (c *BillingAccountsSkuGroupsSkusGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGroupSku{ + ret := &GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5236,25 +5499,25 @@ func (c *BillingAccountsSkuGroupsSkusGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Gets a SKU that is part of a billing account SKU group.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skuGroups/{skuGroupsId}/skus/{skusId}", + // "description": "Gets a SKU group visible to a billing account.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skuGroups/{skuGroupsId}", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.skuGroups.skus.get", + // "id": "cloudbilling.billingAccounts.skuGroups.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the billing account SKU group SKU to retrieve. Format: billingAccounts/{billing_account}/skuGroups/{sku_group}/skus/{sku}", + // "description": "Required. The name of the BillingAccountSkuGroup to retrieve. Format: billingAccounts/{billing_account}/skuGroups/{sku_group}", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/skuGroups/[^/]+/skus/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/skuGroups/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGroupSku" + // "$ref": "GoogleCloudBillingBillingaccountskugroupsV1betaBillingAccountSkuGroup" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -5265,9 +5528,9 @@ func (c *BillingAccountsSkuGroupsSkusGetCall) Do(opts ...googleapi.CallOption) ( } -// method id "cloudbilling.billingAccounts.skuGroups.skus.list": +// method id "cloudbilling.billingAccounts.skuGroups.list": -type BillingAccountsSkuGroupsSkusListCall struct { +type BillingAccountsSkuGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -5276,30 +5539,29 @@ type BillingAccountsSkuGroupsSkusListCall struct { header_ http.Header } -// List: Lists SKUs that is part of billing account SKU groups. +// List: Lists SKU groups visible to a billing account. // -// - parent: The billing account SKU group to list billing account SKU -// group SKUs from. Format: -// billingAccounts/{billing_account}/skuGroups/{sku_group}. -func (r *BillingAccountsSkuGroupsSkusService) List(parent string) *BillingAccountsSkuGroupsSkusListCall { - c := &BillingAccountsSkuGroupsSkusListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The billing account to list billing account SKU groups +// from. Format: billingAccounts/{billing_account}. +func (r *BillingAccountsSkuGroupsService) List(parent string) *BillingAccountsSkuGroupsListCall { + c := &BillingAccountsSkuGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// billing account SKU group SKUs to return. Results may return fewer -// than this value. Default value is 50 and maximum value is 5000. -func (c *BillingAccountsSkuGroupsSkusListCall) PageSize(pageSize int64) *BillingAccountsSkuGroupsSkusListCall { +// billing account SKU groups to return. Results may return fewer than +// this value. Default value is 50 and maximum value is 5000. +func (c *BillingAccountsSkuGroupsListCall) PageSize(pageSize int64) *BillingAccountsSkuGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListBillingAccountSkuGroupSkus call to -// retrieve the next page of results. If this field is empty, the first -// page is returned. -func (c *BillingAccountsSkuGroupsSkusListCall) PageToken(pageToken string) *BillingAccountsSkuGroupsSkusListCall { +// received from a previous ListBillingAccountSkuGroups call to retrieve +// the next page of results. If this field is empty, the first page is +// returned. +func (c *BillingAccountsSkuGroupsListCall) PageToken(pageToken string) *BillingAccountsSkuGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -5307,7 +5569,7 @@ func (c *BillingAccountsSkuGroupsSkusListCall) PageToken(pageToken string) *Bill // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsSkuGroupsSkusListCall) Fields(s ...googleapi.Field) *BillingAccountsSkuGroupsSkusListCall { +func (c *BillingAccountsSkuGroupsListCall) Fields(s ...googleapi.Field) *BillingAccountsSkuGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5317,7 +5579,7 @@ func (c *BillingAccountsSkuGroupsSkusListCall) Fields(s ...googleapi.Field) *Bil // 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 *BillingAccountsSkuGroupsSkusListCall) IfNoneMatch(entityTag string) *BillingAccountsSkuGroupsSkusListCall { +func (c *BillingAccountsSkuGroupsListCall) IfNoneMatch(entityTag string) *BillingAccountsSkuGroupsListCall { c.ifNoneMatch_ = entityTag return c } @@ -5325,21 +5587,21 @@ func (c *BillingAccountsSkuGroupsSkusListCall) IfNoneMatch(entityTag string) *Bi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsSkuGroupsSkusListCall) Context(ctx context.Context) *BillingAccountsSkuGroupsSkusListCall { +func (c *BillingAccountsSkuGroupsListCall) Context(ctx context.Context) *BillingAccountsSkuGroupsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsSkuGroupsSkusListCall) Header() http.Header { +func (c *BillingAccountsSkuGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsSkuGroupsSkusListCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsSkuGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5352,7 +5614,7 @@ func (c *BillingAccountsSkuGroupsSkusListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/skus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/skuGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5365,17 +5627,17 @@ func (c *BillingAccountsSkuGroupsSkusListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.skuGroups.skus.list" call. +// Do executes the "cloudbilling.billingAccounts.skuGroups.list" call. // Exactly one of -// *GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountS -// kuGroupSkusResponse or error will be non-nil. Any non-2xx status code -// is an error. Response headers are in either -// *GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountS -// kuGroupSkusResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BillingAccountsSkuGroupsSkusListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountSkuGroupSkusResponse, error) { +// *GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuG +// roupsResponse or error will be non-nil. Any non-2xx status code is an +// error. Response headers are in either +// *GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuG +// roupsResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BillingAccountsSkuGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5394,7 +5656,7 @@ func (c *BillingAccountsSkuGroupsSkusListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountSkuGroupSkusResponse{ + ret := &GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5406,36 +5668,36 @@ func (c *BillingAccountsSkuGroupsSkusListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists SKUs that is part of billing account SKU groups.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skuGroups/{skuGroupsId}/skus", + // "description": "Lists SKU groups visible to a billing account.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skuGroups", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.skuGroups.skus.list", + // "id": "cloudbilling.billingAccounts.skuGroups.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of billing account SKU group SKUs to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", + // "description": "Maximum number of billing account SKU groups to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token received from a previous ListBillingAccountSkuGroupSkus call to retrieve the next page of results. If this field is empty, the first page is returned.", + // "description": "Page token received from a previous ListBillingAccountSkuGroups call to retrieve the next page of results. If this field is empty, the first page is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The billing account SKU group to list billing account SKU group SKUs from. Format: billingAccounts/{billing_account}/skuGroups/{sku_group}", + // "description": "Required. The billing account to list billing account SKU groups from. Format: billingAccounts/{billing_account}", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/skuGroups/[^/]+$", + // "pattern": "^billingAccounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/skus", + // "path": "v1beta/{+parent}/skuGroups", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountSkuGroupSkusResponse" + // "$ref": "GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuGroupsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -5449,7 +5711,7 @@ func (c *BillingAccountsSkuGroupsSkusListCall) 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 *BillingAccountsSkuGroupsSkusListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountSkuGroupSkusResponse) error) error { +func (c *BillingAccountsSkuGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountskugroupsV1betaListBillingAccountSkuGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -5467,9 +5729,9 @@ func (c *BillingAccountsSkuGroupsSkusListCall) Pages(ctx context.Context, f func } } -// method id "cloudbilling.billingAccounts.skus.get": +// method id "cloudbilling.billingAccounts.skuGroups.skus.get": -type BillingAccountsSkusGetCall struct { +type BillingAccountsSkuGroupsSkusGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -5478,20 +5740,752 @@ type BillingAccountsSkusGetCall struct { header_ http.Header } -// Get: Gets a SKU visible to a billing account. -// -// - name: The name of the billing account SKU to retrieve. Format: -// billingAccounts/{billing_account}/skus/{sku}. -func (r *BillingAccountsSkusService) Get(name string) *BillingAccountsSkusGetCall { - c := &BillingAccountsSkusGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// Get: Gets a SKU that is part of a billing account SKU group. +// +// - name: The name of the billing account SKU group SKU to retrieve. +// Format: +// billingAccounts/{billing_account}/skuGroups/{sku_group}/skus/{sku}. +func (r *BillingAccountsSkuGroupsSkusService) Get(name string) *BillingAccountsSkuGroupsSkusGetCall { + c := &BillingAccountsSkuGroupsSkusGetCall{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 *BillingAccountsSkuGroupsSkusGetCall) Fields(s ...googleapi.Field) *BillingAccountsSkuGroupsSkusGetCall { + 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 *BillingAccountsSkuGroupsSkusGetCall) IfNoneMatch(entityTag string) *BillingAccountsSkuGroupsSkusGetCall { + 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 *BillingAccountsSkuGroupsSkusGetCall) Context(ctx context.Context) *BillingAccountsSkuGroupsSkusGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsSkuGroupsSkusGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsSkuGroupsSkusGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbilling.billingAccounts.skuGroups.skus.get" call. +// Exactly one of +// *GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGr +// oupSku or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGr +// oupSku.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BillingAccountsSkuGroupsSkusGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGroupSku, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGroupSku{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a SKU that is part of a billing account SKU group.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skuGroups/{skuGroupsId}/skus/{skusId}", + // "httpMethod": "GET", + // "id": "cloudbilling.billingAccounts.skuGroups.skus.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the billing account SKU group SKU to retrieve. Format: billingAccounts/{billing_account}/skuGroups/{sku_group}/skus/{sku}", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/skuGroups/[^/]+/skus/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudBillingBillingaccountskugroupskusV1betaBillingAccountSkuGroupSku" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-billing", + // "https://www.googleapis.com/auth/cloud-billing.readonly", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbilling.billingAccounts.skuGroups.skus.list": + +type BillingAccountsSkuGroupsSkusListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SKUs that is part of billing account SKU groups. +// +// - parent: The billing account SKU group to list billing account SKU +// group SKUs from. Format: +// billingAccounts/{billing_account}/skuGroups/{sku_group}. +func (r *BillingAccountsSkuGroupsSkusService) List(parent string) *BillingAccountsSkuGroupsSkusListCall { + c := &BillingAccountsSkuGroupsSkusListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// billing account SKU group SKUs to return. Results may return fewer +// than this value. Default value is 50 and maximum value is 5000. +func (c *BillingAccountsSkuGroupsSkusListCall) PageSize(pageSize int64) *BillingAccountsSkuGroupsSkusListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListBillingAccountSkuGroupSkus call to +// retrieve the next page of results. If this field is empty, the first +// page is returned. +func (c *BillingAccountsSkuGroupsSkusListCall) PageToken(pageToken string) *BillingAccountsSkuGroupsSkusListCall { + 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 *BillingAccountsSkuGroupsSkusListCall) Fields(s ...googleapi.Field) *BillingAccountsSkuGroupsSkusListCall { + 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 *BillingAccountsSkuGroupsSkusListCall) IfNoneMatch(entityTag string) *BillingAccountsSkuGroupsSkusListCall { + 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 *BillingAccountsSkuGroupsSkusListCall) Context(ctx context.Context) *BillingAccountsSkuGroupsSkusListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsSkuGroupsSkusListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsSkuGroupsSkusListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/skus") + 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 "cloudbilling.billingAccounts.skuGroups.skus.list" call. +// Exactly one of +// *GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountS +// kuGroupSkusResponse or error will be non-nil. Any non-2xx status code +// is an error. Response headers are in either +// *GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountS +// kuGroupSkusResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BillingAccountsSkuGroupsSkusListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountSkuGroupSkusResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountSkuGroupSkusResponse{ + ServerResponse: 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 SKUs that is part of billing account SKU groups.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skuGroups/{skuGroupsId}/skus", + // "httpMethod": "GET", + // "id": "cloudbilling.billingAccounts.skuGroups.skus.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of billing account SKU group SKUs to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token received from a previous ListBillingAccountSkuGroupSkus call to retrieve the next page of results. If this field is empty, the first page is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The billing account SKU group to list billing account SKU group SKUs from. Format: billingAccounts/{billing_account}/skuGroups/{sku_group}", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/skuGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/skus", + // "response": { + // "$ref": "GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountSkuGroupSkusResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-billing", + // "https://www.googleapis.com/auth/cloud-billing.readonly", + // "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 *BillingAccountsSkuGroupsSkusListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountskugroupskusV1betaListBillingAccountSkuGroupSkusResponse) 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 "cloudbilling.billingAccounts.skus.get": + +type BillingAccountsSkusGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a SKU visible to a billing account. +// +// - name: The name of the billing account SKU to retrieve. Format: +// billingAccounts/{billing_account}/skus/{sku}. +func (r *BillingAccountsSkusService) Get(name string) *BillingAccountsSkusGetCall { + c := &BillingAccountsSkusGetCall{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 *BillingAccountsSkusGetCall) Fields(s ...googleapi.Field) *BillingAccountsSkusGetCall { + 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 *BillingAccountsSkusGetCall) IfNoneMatch(entityTag string) *BillingAccountsSkusGetCall { + 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 *BillingAccountsSkusGetCall) Context(ctx context.Context) *BillingAccountsSkusGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsSkusGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsSkusGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbilling.billingAccounts.skus.get" call. +// Exactly one of +// *GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsSkusGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a SKU visible to a billing account.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skus/{skusId}", + // "httpMethod": "GET", + // "id": "cloudbilling.billingAccounts.skus.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the billing account SKU to retrieve. Format: billingAccounts/{billing_account}/skus/{sku}", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+/skus/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-billing", + // "https://www.googleapis.com/auth/cloud-billing.readonly", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbilling.billingAccounts.skus.list": + +type BillingAccountsSkusListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SKUs visible to a billing account. +// +// - parent: The billing account to list billing account SKU from. +// Format: billingAccounts/{billing_account}. +func (r *BillingAccountsSkusService) List(parent string) *BillingAccountsSkusListCall { + c := &BillingAccountsSkusListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Options for how to +// filter the billing account SKUs. Currently, only filter on +// `billing_account_service` is supported. Only !=, = operators are +// supported. Examples: - billing_account_service = +// "billingAccounts/012345-567890-ABCDEF/services/DA34-426B-A397" +func (c *BillingAccountsSkusListCall) Filter(filter string) *BillingAccountsSkusListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// billing account SKUs to return. Results may return fewer than this +// value. Default value is 50 and maximum value is 5000. +func (c *BillingAccountsSkusListCall) PageSize(pageSize int64) *BillingAccountsSkusListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListBillingAccountSkus call to retrieve the +// next page of results. If this field is empty, the first page is +// returned. +func (c *BillingAccountsSkusListCall) PageToken(pageToken string) *BillingAccountsSkusListCall { + 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 *BillingAccountsSkusListCall) Fields(s ...googleapi.Field) *BillingAccountsSkusListCall { + 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 *BillingAccountsSkusListCall) IfNoneMatch(entityTag string) *BillingAccountsSkusListCall { + 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 *BillingAccountsSkusListCall) Context(ctx context.Context) *BillingAccountsSkusListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BillingAccountsSkusListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BillingAccountsSkusListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/skus") + 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 "cloudbilling.billingAccounts.skus.list" call. +// Exactly one of +// *GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusRespo +// nse or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusRespo +// nse.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *BillingAccountsSkusListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusResponse{ + ServerResponse: 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 SKUs visible to a billing account.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skus", + // "httpMethod": "GET", + // "id": "cloudbilling.billingAccounts.skus.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Options for how to filter the billing account SKUs. Currently, only filter on `billing_account_service` is supported. Only !=, = operators are supported. Examples: - billing_account_service = \"billingAccounts/012345-567890-ABCDEF/services/DA34-426B-A397\"", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of billing account SKUs to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token received from a previous ListBillingAccountSkus call to retrieve the next page of results. If this field is empty, the first page is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The billing account to list billing account SKU from. Format: billingAccounts/{billing_account}", + // "location": "path", + // "pattern": "^billingAccounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/skus", + // "response": { + // "$ref": "GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-billing", + // "https://www.googleapis.com/auth/cloud-billing.readonly", + // "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 *BillingAccountsSkusListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusResponse) 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 "cloudbilling.billingAccounts.skus.price.get": + +type BillingAccountsSkusPriceGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest price for SKUs available to your Cloud Billing +// account. +// +// - name: Name of the billing account price to retrieve. Format: +// billingAccounts/{billing_account}/skus/{sku}/price. +func (r *BillingAccountsSkusPriceService) Get(name string) *BillingAccountsSkusPriceGetCall { + c := &BillingAccountsSkusPriceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// CurrencyCode sets the optional parameter "currencyCode": ISO-4217 +// currency code for the price. If not specified, the currency of the +// billing account is used. +func (c *BillingAccountsSkusPriceGetCall) CurrencyCode(currencyCode string) *BillingAccountsSkusPriceGetCall { + c.urlParams_.Set("currencyCode", currencyCode) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsSkusGetCall) Fields(s ...googleapi.Field) *BillingAccountsSkusGetCall { +func (c *BillingAccountsSkusPriceGetCall) Fields(s ...googleapi.Field) *BillingAccountsSkusPriceGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5501,7 +6495,7 @@ func (c *BillingAccountsSkusGetCall) Fields(s ...googleapi.Field) *BillingAccoun // 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 *BillingAccountsSkusGetCall) IfNoneMatch(entityTag string) *BillingAccountsSkusGetCall { +func (c *BillingAccountsSkusPriceGetCall) IfNoneMatch(entityTag string) *BillingAccountsSkusPriceGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5509,21 +6503,21 @@ func (c *BillingAccountsSkusGetCall) IfNoneMatch(entityTag string) *BillingAccou // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsSkusGetCall) Context(ctx context.Context) *BillingAccountsSkusGetCall { +func (c *BillingAccountsSkusPriceGetCall) Context(ctx context.Context) *BillingAccountsSkusPriceGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsSkusGetCall) Header() http.Header { +func (c *BillingAccountsSkusPriceGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsSkusGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsSkusPriceGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5549,17 +6543,17 @@ func (c *BillingAccountsSkusGetCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.skus.get" call. +// Do executes the "cloudbilling.billingAccounts.skus.price.get" call. // Exactly one of -// *GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku or error -// will be non-nil. Any non-2xx status code is an error. Response +// *GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku.ServerRes -// ponse.Header or (if a response was returned at all) in +// *GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice.Serve +// rResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *BillingAccountsSkusGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku, error) { +func (c *BillingAccountsSkusPriceGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5578,7 +6572,7 @@ func (c *BillingAccountsSkusGetCall) Do(opts ...googleapi.CallOption) (*GoogleCl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku{ + ret := &GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5590,25 +6584,30 @@ func (c *BillingAccountsSkusGetCall) Do(opts ...googleapi.CallOption) (*GoogleCl } return ret, nil // { - // "description": "Gets a SKU visible to a billing account.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skus/{skusId}", + // "description": "Gets the latest price for SKUs available to your Cloud Billing account.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skus/{skusId}/price", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.skus.get", + // "id": "cloudbilling.billingAccounts.skus.price.get", // "parameterOrder": [ // "name" // ], // "parameters": { + // "currencyCode": { + // "description": "Optional. ISO-4217 currency code for the price. If not specified, the currency of the billing account is used.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The name of the billing account SKU to retrieve. Format: billingAccounts/{billing_account}/skus/{sku}", + // "description": "Required. Name of the billing account price to retrieve. Format: billingAccounts/{billing_account}/skus/{sku}/price", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/skus/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/skus/[^/]+/price$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountskusV1betaBillingAccountSku" + // "$ref": "GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -5619,9 +6618,9 @@ func (c *BillingAccountsSkusGetCall) Do(opts ...googleapi.CallOption) (*GoogleCl } -// method id "cloudbilling.billingAccounts.skus.list": +// method id "cloudbilling.billingAccounts.skus.prices.list": -type BillingAccountsSkusListCall struct { +type BillingAccountsSkusPricesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -5630,39 +6629,40 @@ type BillingAccountsSkusListCall struct { header_ http.Header } -// List: Lists SKUs visible to a billing account. +// List: Lists the latest prices for SKUs available to your Cloud +// Billing account. // -// - parent: The billing account to list billing account SKU from. -// Format: billingAccounts/{billing_account}. -func (r *BillingAccountsSkusService) List(parent string) *BillingAccountsSkusListCall { - c := &BillingAccountsSkusListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: To list all Billing Account SKUs, use `-` as the SKU ID. +// Format: `billingAccounts/{billing_account}/skus/-` Note: Specifying +// an actual SKU resource id will return a collection of one Billing +// Account Price. +func (r *BillingAccountsSkusPricesService) List(parent string) *BillingAccountsSkusPricesListCall { + c := &BillingAccountsSkusPricesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Options for how to -// filter the billing account SKUs. Currently, only filter on -// `billing_account_service` is supported. Only !=, = operators are -// supported. Examples: - billing_account_service = -// "billingAccounts/012345-567890-ABCDEF/services/DA34-426B-A397" -func (c *BillingAccountsSkusListCall) Filter(filter string) *BillingAccountsSkusListCall { - c.urlParams_.Set("filter", filter) +// CurrencyCode sets the optional parameter "currencyCode": ISO-4217 +// currency code for the price. If not specified, currency of billing +// account will be used. +func (c *BillingAccountsSkusPricesListCall) CurrencyCode(currencyCode string) *BillingAccountsSkusPricesListCall { + c.urlParams_.Set("currencyCode", currencyCode) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// billing account SKUs to return. Results may return fewer than this +// billing account price to return. Results may return fewer than this // value. Default value is 50 and maximum value is 5000. -func (c *BillingAccountsSkusListCall) PageSize(pageSize int64) *BillingAccountsSkusListCall { +func (c *BillingAccountsSkusPricesListCall) PageSize(pageSize int64) *BillingAccountsSkusPricesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListBillingAccountSkus call to retrieve the -// next page of results. If this field is empty, the first page is +// received from a previous ListBillingAccountPrices call to retrieve +// the next page of results. If this field is empty, the first page is // returned. -func (c *BillingAccountsSkusListCall) PageToken(pageToken string) *BillingAccountsSkusListCall { +func (c *BillingAccountsSkusPricesListCall) PageToken(pageToken string) *BillingAccountsSkusPricesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -5670,7 +6670,7 @@ func (c *BillingAccountsSkusListCall) PageToken(pageToken string) *BillingAccoun // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsSkusListCall) Fields(s ...googleapi.Field) *BillingAccountsSkusListCall { +func (c *BillingAccountsSkusPricesListCall) Fields(s ...googleapi.Field) *BillingAccountsSkusPricesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5680,7 +6680,7 @@ func (c *BillingAccountsSkusListCall) Fields(s ...googleapi.Field) *BillingAccou // 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 *BillingAccountsSkusListCall) IfNoneMatch(entityTag string) *BillingAccountsSkusListCall { +func (c *BillingAccountsSkusPricesListCall) IfNoneMatch(entityTag string) *BillingAccountsSkusPricesListCall { c.ifNoneMatch_ = entityTag return c } @@ -5688,21 +6688,21 @@ func (c *BillingAccountsSkusListCall) IfNoneMatch(entityTag string) *BillingAcco // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsSkusListCall) Context(ctx context.Context) *BillingAccountsSkusListCall { +func (c *BillingAccountsSkusPricesListCall) Context(ctx context.Context) *BillingAccountsSkusPricesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsSkusListCall) Header() http.Header { +func (c *BillingAccountsSkusPricesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsSkusListCall) doRequest(alt string) (*http.Response, error) { +func (c *BillingAccountsSkusPricesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5715,7 +6715,7 @@ func (c *BillingAccountsSkusListCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/skus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/prices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5728,17 +6728,17 @@ func (c *BillingAccountsSkusListCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.skus.list" call. +// Do executes the "cloudbilling.billingAccounts.skus.prices.list" call. // Exactly one of -// *GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusRespo -// nse or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusRespo -// nse.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *BillingAccountsSkusListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusResponse, error) { +// *GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesR +// esponse or error will be non-nil. Any non-2xx status code is an +// error. Response headers are in either +// *GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesR +// esponse.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BillingAccountsSkusPricesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5757,7 +6757,7 @@ func (c *BillingAccountsSkusListCall) Do(opts ...googleapi.CallOption) (*GoogleC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusResponse{ + ret := &GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5769,41 +6769,41 @@ func (c *BillingAccountsSkusListCall) Do(opts ...googleapi.CallOption) (*GoogleC } return ret, nil // { - // "description": "Lists SKUs visible to a billing account.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skus", + // "description": "Lists the latest prices for SKUs available to your Cloud Billing account.", + // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skus/{skusId}/prices", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.skus.list", + // "id": "cloudbilling.billingAccounts.skus.prices.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Options for how to filter the billing account SKUs. Currently, only filter on `billing_account_service` is supported. Only !=, = operators are supported. Examples: - billing_account_service = \"billingAccounts/012345-567890-ABCDEF/services/DA34-426B-A397\"", + // "currencyCode": { + // "description": "Optional. ISO-4217 currency code for the price. If not specified, currency of billing account will be used.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Maximum number of billing account SKUs to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", + // "description": "Optional. Maximum number of billing account price to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token received from a previous ListBillingAccountSkus call to retrieve the next page of results. If this field is empty, the first page is returned.", + // "description": "Optional. Page token received from a previous ListBillingAccountPrices call to retrieve the next page of results. If this field is empty, the first page is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The billing account to list billing account SKU from. Format: billingAccounts/{billing_account}", + // "description": "Required. To list all Billing Account SKUs, use `-` as the SKU ID. Format: `billingAccounts/{billing_account}/skus/-` Note: Specifying an actual SKU resource id will return a collection of one Billing Account Price.", // "location": "path", - // "pattern": "^billingAccounts/[^/]+$", + // "pattern": "^billingAccounts/[^/]+/skus/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/skus", + // "path": "v1beta/{+parent}/prices", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusResponse" + // "$ref": "GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -5817,7 +6817,7 @@ func (c *BillingAccountsSkusListCall) Do(opts ...googleapi.CallOption) (*GoogleC // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *BillingAccountsSkusListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountskusV1betaListBillingAccountSkusResponse) error) error { +func (c *BillingAccountsSkusPricesListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -5835,9 +6835,9 @@ func (c *BillingAccountsSkusListCall) Pages(ctx context.Context, f func(*GoogleC } } -// method id "cloudbilling.billingAccounts.skus.price.get": +// method id "cloudbilling.projects.anomalies.get": -type BillingAccountsSkusPriceGetCall struct { +type ProjectsAnomaliesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -5846,29 +6846,21 @@ type BillingAccountsSkusPriceGetCall struct { header_ http.Header } -// Get: Gets the latest price for SKUs available to your Cloud Billing -// account. +// Get: Gets an anomaly for a billing account or a project. // -// - name: Name of the billing account price to retrieve. Format: -// billingAccounts/{billing_account}/skus/{sku}/price. -func (r *BillingAccountsSkusPriceService) Get(name string) *BillingAccountsSkusPriceGetCall { - c := &BillingAccountsSkusPriceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Format for project: projects/{project}/anomalies/{anomalies}. +// Format for billing account: +// billingAccounts/{billing_account}/anomalies/{anomalies}. +func (r *ProjectsAnomaliesService) Get(name string) *ProjectsAnomaliesGetCall { + c := &ProjectsAnomaliesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// CurrencyCode sets the optional parameter "currencyCode": ISO-4217 -// currency code for the price. If not specified, the currency of the -// billing account is used. -func (c *BillingAccountsSkusPriceGetCall) CurrencyCode(currencyCode string) *BillingAccountsSkusPriceGetCall { - c.urlParams_.Set("currencyCode", currencyCode) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsSkusPriceGetCall) Fields(s ...googleapi.Field) *BillingAccountsSkusPriceGetCall { +func (c *ProjectsAnomaliesGetCall) Fields(s ...googleapi.Field) *ProjectsAnomaliesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5878,7 +6870,7 @@ func (c *BillingAccountsSkusPriceGetCall) Fields(s ...googleapi.Field) *BillingA // 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 *BillingAccountsSkusPriceGetCall) IfNoneMatch(entityTag string) *BillingAccountsSkusPriceGetCall { +func (c *ProjectsAnomaliesGetCall) IfNoneMatch(entityTag string) *ProjectsAnomaliesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5886,21 +6878,21 @@ func (c *BillingAccountsSkusPriceGetCall) IfNoneMatch(entityTag string) *Billing // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsSkusPriceGetCall) Context(ctx context.Context) *BillingAccountsSkusPriceGetCall { +func (c *ProjectsAnomaliesGetCall) Context(ctx context.Context) *ProjectsAnomaliesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsSkusPriceGetCall) Header() http.Header { +func (c *ProjectsAnomaliesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsSkusPriceGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsAnomaliesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5926,17 +6918,16 @@ func (c *BillingAccountsSkusPriceGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.skus.price.get" call. -// Exactly one of -// *GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "cloudbilling.projects.anomalies.get" call. +// Exactly one of *GoogleCloudBillingAnomaliesV1betaAnomaly or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice.Serve -// rResponse.Header or (if a response was returned at all) in +// *GoogleCloudBillingAnomaliesV1betaAnomaly.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *BillingAccountsSkusPriceGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice, error) { +func (c *ProjectsAnomaliesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingAnomaliesV1betaAnomaly, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5955,7 +6946,7 @@ func (c *BillingAccountsSkusPriceGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice{ + ret := &GoogleCloudBillingAnomaliesV1betaAnomaly{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5967,30 +6958,25 @@ func (c *BillingAccountsSkusPriceGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets the latest price for SKUs available to your Cloud Billing account.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skus/{skusId}/price", + // "description": "Gets an anomaly for a billing account or a project.", + // "flatPath": "v1beta/projects/{projectsId}/anomalies/{anomaliesId}", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.skus.price.get", + // "id": "cloudbilling.projects.anomalies.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "currencyCode": { - // "description": "Optional. ISO-4217 currency code for the price. If not specified, the currency of the billing account is used.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. Name of the billing account price to retrieve. Format: billingAccounts/{billing_account}/skus/{sku}/price", + // "description": "Required. Format for project: projects/{project}/anomalies/{anomalies}. Format for billing account: billingAccounts/{billing_account}/anomalies/{anomalies}.", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/skus/[^/]+/price$", + // "pattern": "^projects/[^/]+/anomalies/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice" + // "$ref": "GoogleCloudBillingAnomaliesV1betaAnomaly" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -6001,9 +6987,9 @@ func (c *BillingAccountsSkusPriceGetCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "cloudbilling.billingAccounts.skus.prices.list": +// method id "cloudbilling.projects.anomalies.list": -type BillingAccountsSkusPricesListCall struct { +type ProjectsAnomaliesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -6012,40 +6998,40 @@ type BillingAccountsSkusPricesListCall struct { header_ http.Header } -// List: Lists the latest prices for SKUs available to your Cloud -// Billing account. +// List: Lists anomalies for a billing account or a project. // -// - parent: To list all Billing Account SKUs, use `-` as the SKU ID. -// Format: `billingAccounts/{billing_account}/skus/-` Note: Specifying -// an actual SKU resource id will return a collection of one Billing -// Account Price. -func (r *BillingAccountsSkusPricesService) List(parent string) *BillingAccountsSkusPricesListCall { - c := &BillingAccountsSkusPricesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The project to list Anomaly for the project. Format for +// project: projects/{project}. Format for billing account: +// billingAccounts/{billing_account}. +func (r *ProjectsAnomaliesService) List(parent string) *ProjectsAnomaliesListCall { + c := &ProjectsAnomaliesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// CurrencyCode sets the optional parameter "currencyCode": ISO-4217 -// currency code for the price. If not specified, currency of billing -// account will be used. -func (c *BillingAccountsSkusPricesListCall) CurrencyCode(currencyCode string) *BillingAccountsSkusPricesListCall { - c.urlParams_.Set("currencyCode", currencyCode) +// Filter sets the optional parameter "filter": Options for how to +// filter the anomalies. Currently, only filter on `start_time` and +// `end_time` is supported. Only =, AND operators are supported. If +// start_time and/or end_time empty, we only retrieve the most recent 30 +// days' anomalies. Examples: - start_time = "20231201" AND end_time = +// "20240120" . +func (c *ProjectsAnomaliesListCall) Filter(filter string) *ProjectsAnomaliesListCall { + c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// billing account price to return. Results may return fewer than this -// value. Default value is 50 and maximum value is 5000. -func (c *BillingAccountsSkusPricesListCall) PageSize(pageSize int64) *BillingAccountsSkusPricesListCall { +// anomalies to return. Results may return fewer than this value. +// Default value is 50 and maximum value is 1000. +func (c *ProjectsAnomaliesListCall) PageSize(pageSize int64) *ProjectsAnomaliesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListBillingAccountPrices call to retrieve -// the next page of results. If this field is empty, the first page is -// returned. -func (c *BillingAccountsSkusPricesListCall) PageToken(pageToken string) *BillingAccountsSkusPricesListCall { +// received from a previous ListAnomalies call to retrieve the next page +// of results. If this field is empty, the first page is returned. +func (c *ProjectsAnomaliesListCall) PageToken(pageToken string) *ProjectsAnomaliesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -6053,7 +7039,7 @@ func (c *BillingAccountsSkusPricesListCall) PageToken(pageToken string) *Billing // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BillingAccountsSkusPricesListCall) Fields(s ...googleapi.Field) *BillingAccountsSkusPricesListCall { +func (c *ProjectsAnomaliesListCall) Fields(s ...googleapi.Field) *ProjectsAnomaliesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6063,7 +7049,7 @@ func (c *BillingAccountsSkusPricesListCall) Fields(s ...googleapi.Field) *Billin // 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 *BillingAccountsSkusPricesListCall) IfNoneMatch(entityTag string) *BillingAccountsSkusPricesListCall { +func (c *ProjectsAnomaliesListCall) IfNoneMatch(entityTag string) *ProjectsAnomaliesListCall { c.ifNoneMatch_ = entityTag return c } @@ -6071,21 +7057,21 @@ func (c *BillingAccountsSkusPricesListCall) IfNoneMatch(entityTag string) *Billi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BillingAccountsSkusPricesListCall) Context(ctx context.Context) *BillingAccountsSkusPricesListCall { +func (c *ProjectsAnomaliesListCall) Context(ctx context.Context) *ProjectsAnomaliesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BillingAccountsSkusPricesListCall) Header() http.Header { +func (c *ProjectsAnomaliesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BillingAccountsSkusPricesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsAnomaliesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6098,7 +7084,7 @@ func (c *BillingAccountsSkusPricesListCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/prices") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/anomalies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6111,17 +7097,17 @@ func (c *BillingAccountsSkusPricesListCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudbilling.billingAccounts.skus.prices.list" call. +// Do executes the "cloudbilling.projects.anomalies.list" call. // Exactly one of -// *GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesR -// esponse or error will be non-nil. Any non-2xx status code is an -// error. Response headers are in either -// *GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesR -// esponse.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BillingAccountsSkusPricesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesResponse, error) { +// *GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsAnomaliesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6140,7 +7126,7 @@ func (c *BillingAccountsSkusPricesListCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesResponse{ + ret := &GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6152,41 +7138,41 @@ func (c *BillingAccountsSkusPricesListCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Lists the latest prices for SKUs available to your Cloud Billing account.", - // "flatPath": "v1beta/billingAccounts/{billingAccountsId}/skus/{skusId}/prices", + // "description": "Lists anomalies for a billing account or a project.", + // "flatPath": "v1beta/projects/{projectsId}/anomalies", // "httpMethod": "GET", - // "id": "cloudbilling.billingAccounts.skus.prices.list", + // "id": "cloudbilling.projects.anomalies.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "currencyCode": { - // "description": "Optional. ISO-4217 currency code for the price. If not specified, currency of billing account will be used.", + // "filter": { + // "description": "Optional. Options for how to filter the anomalies. Currently, only filter on `start_time` and `end_time` is supported. Only =, AND operators are supported. If start_time and/or end_time empty, we only retrieve the most recent 30 days' anomalies. Examples: - start_time = \"20231201\" AND end_time = \"20240120\" .", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Optional. Maximum number of billing account price to return. Results may return fewer than this value. Default value is 50 and maximum value is 5000.", + // "description": "Optional. Maximum number of anomalies to return. Results may return fewer than this value. Default value is 50 and maximum value is 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. Page token received from a previous ListBillingAccountPrices call to retrieve the next page of results. If this field is empty, the first page is returned.", + // "description": "Optional. Page token received from a previous ListAnomalies call to retrieve the next page of results. If this field is empty, the first page is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. To list all Billing Account SKUs, use `-` as the SKU ID. Format: `billingAccounts/{billing_account}/skus/-` Note: Specifying an actual SKU resource id will return a collection of one Billing Account Price.", + // "description": "Required. The project to list Anomaly for the project. Format for project: projects/{project}. Format for billing account: billingAccounts/{billing_account}.", // "location": "path", - // "pattern": "^billingAccounts/[^/]+/skus/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/prices", + // "path": "v1beta/{+parent}/anomalies", // "response": { - // "$ref": "GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesResponse" + // "$ref": "GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-billing", @@ -6200,7 +7186,7 @@ func (c *BillingAccountsSkusPricesListCall) Do(opts ...googleapi.CallOption) (*G // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *BillingAccountsSkusPricesListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingBillingaccountpricesV1betaListBillingAccountPricesResponse) error) error { +func (c *ProjectsAnomaliesListCall) Pages(ctx context.Context, f func(*GoogleCloudBillingAnomaliesV1betaListAnomaliesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index 3b35e6f2c94..b589605323b 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -339,6 +339,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", "required": true, "type": "string" + }, + "revision": { + "description": "Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function.", + "location": "query", + "type": "string" } }, "path": "v2/{+name}", @@ -711,7 +716,7 @@ } } }, - "revision": "20240207", + "revision": "20240229", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index 4150d91e139..5f29e727d1c 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -3958,6 +3958,18 @@ func (r *ProjectsLocationsFunctionsService) Get(name string) *ProjectsLocationsF return c } +// Revision sets the optional parameter "revision": The optional version +// of the 1st gen function whose details should be obtained. The version +// of a 1st gen function is an integer that starts from 1 and gets +// incremented on redeployments. GCF may keep historical configs for old +// versions of 1st gen function. This field can be specified to fetch +// the historical configs. This field is valid only for GCF 1st gen +// function. +func (c *ProjectsLocationsFunctionsGetCall) Revision(revision string) *ProjectsLocationsFunctionsGetCall { + c.urlParams_.Set("revision", revision) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -4071,6 +4083,11 @@ func (c *ProjectsLocationsFunctionsGetCall) Do(opts ...googleapi.CallOption) (*F // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", // "required": true, // "type": "string" + // }, + // "revision": { + // "description": "Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function.", + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+name}", diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index bcd6b8f9b2e..e22c7460e6d 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -339,6 +339,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", "required": true, "type": "string" + }, + "revision": { + "description": "Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function.", + "location": "query", + "type": "string" } }, "path": "v2alpha/{+name}", @@ -711,7 +716,7 @@ } } }, - "revision": "20240207", + "revision": "20240229", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index c110da1f2d8..01991d126b1 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -3958,6 +3958,18 @@ func (r *ProjectsLocationsFunctionsService) Get(name string) *ProjectsLocationsF return c } +// Revision sets the optional parameter "revision": The optional version +// of the 1st gen function whose details should be obtained. The version +// of a 1st gen function is an integer that starts from 1 and gets +// incremented on redeployments. GCF may keep historical configs for old +// versions of 1st gen function. This field can be specified to fetch +// the historical configs. This field is valid only for GCF 1st gen +// function. +func (c *ProjectsLocationsFunctionsGetCall) Revision(revision string) *ProjectsLocationsFunctionsGetCall { + c.urlParams_.Set("revision", revision) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -4071,6 +4083,11 @@ func (c *ProjectsLocationsFunctionsGetCall) Do(opts ...googleapi.CallOption) (*F // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", // "required": true, // "type": "string" + // }, + // "revision": { + // "description": "Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function.", + // "location": "query", + // "type": "string" // } // }, // "path": "v2alpha/{+name}", diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index 9658beb241e..d95e644848c 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -339,6 +339,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", "required": true, "type": "string" + }, + "revision": { + "description": "Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function.", + "location": "query", + "type": "string" } }, "path": "v2beta/{+name}", @@ -711,7 +716,7 @@ } } }, - "revision": "20240207", + "revision": "20240229", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 7a37a487f22..05feede92ca 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -3958,6 +3958,18 @@ func (r *ProjectsLocationsFunctionsService) Get(name string) *ProjectsLocationsF return c } +// Revision sets the optional parameter "revision": The optional version +// of the 1st gen function whose details should be obtained. The version +// of a 1st gen function is an integer that starts from 1 and gets +// incremented on redeployments. GCF may keep historical configs for old +// versions of 1st gen function. This field can be specified to fetch +// the historical configs. This field is valid only for GCF 1st gen +// function. +func (c *ProjectsLocationsFunctionsGetCall) Revision(revision string) *ProjectsLocationsFunctionsGetCall { + c.urlParams_.Set("revision", revision) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -4071,6 +4083,11 @@ func (c *ProjectsLocationsFunctionsGetCall) Do(opts ...googleapi.CallOption) (*F // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", // "required": true, // "type": "string" + // }, + // "revision": { + // "description": "Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function.", + // "location": "query", + // "type": "string" // } // }, // "path": "v2beta/{+name}", diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index bda296f9b29..141ea0b753b 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -413,7 +413,7 @@ "type": "string" }, "queryModel": { - "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", "location": "query", "type": "string" }, @@ -3142,7 +3142,7 @@ "type": "string" }, "queryModel": { - "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", "location": "query", "type": "string" }, @@ -4946,7 +4946,7 @@ } } }, - "revision": "20240227", + "revision": "20240305", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6158,6 +6158,53 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaChunk": { + "description": "Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.", + "id": "GoogleCloudDiscoveryengineV1alphaChunk", + "properties": { + "content": { + "description": "Content is a string from a document (parsed content).", + "type": "string" + }, + "derivedStructData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.", + "readOnly": true, + "type": "object" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata", + "description": "Metadata of the document from the current chunk." + }, + "id": { + "description": "Unique chunk id of the current chunk.", + "type": "string" + }, + "name": { + "description": "The full resource name of the chunk. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata": { + "description": "Document metadata contains the information of the document of the current chunk.", + "id": "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata", + "properties": { + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "Uri of the document.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest": { "description": "Request message for CompletionService.CompleteQuery method.", "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest", @@ -6175,7 +6222,7 @@ "type": "string" }, "queryModel": { - "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", "type": "string" }, "userPseudoId": { @@ -6850,6 +6897,10 @@ "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", "properties": { + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." + }, "defaultParsingConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." @@ -6873,6 +6924,33 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "properties": { + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "properties": { + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" + }, + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig": { "description": "Related configurations applied to a specific type of document parser.", "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", @@ -8797,6 +8875,20 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" + }, "snippetSpec": { "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", "description": "If `snippetSpec` is not specified, snippets are not included in the search response." @@ -9259,6 +9351,10 @@ "description": "Represents the search results.", "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult", "properties": { + "chunk": { + "$ref": "GoogleCloudDiscoveryengineV1alphaChunk", + "description": "The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS." + }, "document": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocument", "description": "The document data snippet in the search response. Only fields that are marked as retrievable are populated." diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 509dcf000ad..04c022581a4 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -2871,6 +2871,86 @@ func (s *GoogleCloudDiscoveryengineV1alphaBigQuerySource) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaChunk: Chunk captures all raw +// metadata information of items to be recommended or searched in the +// chunk mode. +type GoogleCloudDiscoveryengineV1alphaChunk struct { + // Content: Content is a string from a document (parsed content). + Content string `json:"content,omitempty"` + + // DerivedStructData: Output only. This field is OUTPUT_ONLY. It + // contains derived data that are not in the original input document. + DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` + + // DocumentMetadata: Metadata of the document from the current chunk. + DocumentMetadata *GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata `json:"documentMetadata,omitempty"` + + // Id: Unique chunk id of the current chunk. + Id string `json:"id,omitempty"` + + // Name: The full resource name of the chunk. Format: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{ + // chunk_id}`. This field must be a UTF-8 encoded string with a length + // limit of 1024 characters. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaChunk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata: Document +// metadata contains the information of the document of the current +// chunk. +type GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata struct { + // Title: Title of the document. + Title string `json:"title,omitempty"` + + // Uri: Uri of the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Title") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest: Request // message for CompletionService.CompleteQuery method. type GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest struct { @@ -2901,7 +2981,7 @@ type GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest struct { // suggestions taken directly from user-imported document fields marked // as completable. Default values: * `document` is the default model for // regular dataStores. * `search-history` is the default model for site - // search dataStores. + // search dataStores. * QueryModel string `json:"queryModel,omitempty"` // UserPseudoId: A unique identifier for tracking visitors. For example, @@ -4131,6 +4211,9 @@ func (s *GoogleCloudDiscoveryengineV1alphaDocumentInfo) MarshalJSON() ([]byte, e // DataStoreService.UpdateDocumentProcessingConfig method will // initialize the config. type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { + // ChunkingConfig: Whether chunking mode is enabled. + ChunkingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig `json:"chunkingConfig,omitempty"` + // DefaultParsingConfig: Configurations for default Document parser. If // not specified, we will configure it as default DigitalParsingConfig, // and the default parsing config will be applied to all file types for @@ -4162,16 +4245,15 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "DefaultParsingConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent 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. "ChunkingConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultParsingConfig") to + // NullFields is a list of field names (e.g. "ChunkingConfig") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -4187,6 +4269,74 @@ func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfi +// g: Configuration for chunking config. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig struct { + // LayoutBasedChunkingConfig: Configuration for the layout based + // chunking. + LayoutBasedChunkingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig `json:"layoutBasedChunkingConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LayoutBasedChunkingConfig") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "LayoutBasedChunkingConfig") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfi +// gLayoutBasedChunkingConfig: Configuration for the layout based +// chunking. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig struct { + // ChunkSize: The token size limit for each chunk. Supported values: + // 100-500 (inclusive). Default value: 500. + ChunkSize int64 `json:"chunkSize,omitempty"` + + // IncludeAncestorHeadings: Whether to include appending different + // levels of headings to chunks from the middle of the document to + // prevent context loss. Default value: False. + IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkSize") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChunkSize") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig // : Related configurations applied to a specific type of document // parser. @@ -7831,6 +7981,19 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { // provided, there will be no extractive answer in the search response. ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, + // the search result mode is based on + // DataStore.DocumentProcessingConfig.chunking_config: * If + // DataStore.DocumentProcessingConfig.chunking_config is specified, it + // defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if + // the DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not // included in the search response. SnippetSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` @@ -8752,6 +8915,10 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo) Mars // GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult: // Represents the search results. type GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult struct { + // Chunk: The chunk data in the search response if the + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + Chunk *GoogleCloudDiscoveryengineV1alphaChunk `json:"chunk,omitempty"` + // Document: The document data snippet in the search response. Only // fields that are marked as retrievable are populated. Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` @@ -8762,7 +8929,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult struct { // ModelScores: Google provided available scores. ModelScores map[string]GoogleCloudDiscoveryengineV1alphaDoubleList `json:"modelScores,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to + // ForceSendFields is a list of field names (e.g. "Chunk") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8770,8 +8937,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult 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 - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -14033,7 +14200,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query st // `document-completable` - Using suggestions taken directly from // user-imported document fields marked as completable. Default values: // * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. +// `search-history` is the default model for site search dataStores. * func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { c.urlParams_.Set("queryModel", queryModel) return c @@ -14182,7 +14349,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo // "type": "string" // }, // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", // "location": "query", // "type": "string" // }, @@ -28026,7 +28193,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *Proj // `document-completable` - Using suggestions taken directly from // user-imported document fields marked as completable. Default values: // * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. +// `search-history` is the default model for site search dataStores. * func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { c.urlParams_.Set("queryModel", queryModel) return c @@ -28175,7 +28342,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call // "type": "string" // }, // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", // "location": "query", // "type": "string" // }, diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 5d6c69ab24e..cadf4795c61 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -214,7 +214,7 @@ "type": "string" }, "queryModel": { - "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", "location": "query", "type": "string" }, @@ -2738,7 +2738,7 @@ "type": "string" }, "queryModel": { - "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", "location": "query", "type": "string" }, @@ -4449,7 +4449,7 @@ } } }, - "revision": "20240227", + "revision": "20240305", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5860,6 +5860,10 @@ "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", "properties": { + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." + }, "defaultParsingConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." @@ -5883,6 +5887,33 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "properties": { + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "properties": { + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" + }, + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig": { "description": "Related configurations applied to a specific type of document parser.", "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 2631b9ac0ac..9fd4ab84ae7 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -3166,6 +3166,9 @@ type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse struct { // DataStoreService.UpdateDocumentProcessingConfig method will // initialize the config. type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { + // ChunkingConfig: Whether chunking mode is enabled. + ChunkingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig `json:"chunkingConfig,omitempty"` + // DefaultParsingConfig: Configurations for default Document parser. If // not specified, we will configure it as default DigitalParsingConfig, // and the default parsing config will be applied to all file types for @@ -3193,16 +3196,15 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // files, only digital parsing and or layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DefaultParsingConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent 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. "ChunkingConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultParsingConfig") to + // NullFields is a list of field names (e.g. "ChunkingConfig") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -3218,6 +3220,74 @@ func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfi +// g: Configuration for chunking config. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig struct { + // LayoutBasedChunkingConfig: Configuration for the layout based + // chunking. + LayoutBasedChunkingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig `json:"layoutBasedChunkingConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LayoutBasedChunkingConfig") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "LayoutBasedChunkingConfig") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfi +// gLayoutBasedChunkingConfig: Configuration for the layout based +// chunking. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig struct { + // ChunkSize: The token size limit for each chunk. Supported values: + // 100-500 (inclusive). Default value: 500. + ChunkSize int64 `json:"chunkSize,omitempty"` + + // IncludeAncestorHeadings: Whether to include appending different + // levels of headings to chunks from the middle of the document to + // prevent context loss. Default value: False. + IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkSize") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChunkSize") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig // : Related configurations applied to a specific type of document // parser. @@ -11773,7 +11843,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query st // `document-completable` - Using suggestions taken directly from // user-imported document fields marked as completable. Default values: // * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. +// `search-history` is the default model for site search dataStores. * func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { c.urlParams_.Set("queryModel", queryModel) return c @@ -11921,7 +11991,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo // "type": "string" // }, // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", // "location": "query", // "type": "string" // }, @@ -24700,7 +24770,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *Proj // `document-completable` - Using suggestions taken directly from // user-imported document fields marked as completable. Default values: // * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. +// `search-history` is the default model for site search dataStores. * func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { c.urlParams_.Set("queryModel", queryModel) return c @@ -24848,7 +24918,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call // "type": "string" // }, // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. *", // "location": "query", // "type": "string" // }, diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index 3ada55c77b8..9d0235f67a7 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2452,7 +2452,7 @@ ], "parameters": { "name": { - "description": "Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", + "description": "Identifier. Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", "location": "path", "pattern": "^[^/]+/[^/]+/services/[^/]+$", "required": true, @@ -2651,7 +2651,7 @@ ], "parameters": { "name": { - "description": "Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", + "description": "Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", "location": "path", "pattern": "^[^/]+/[^/]+/services/[^/]+/serviceLevelObjectives/[^/]+$", "required": true, @@ -2714,7 +2714,7 @@ } } }, - "revision": "20240128", + "revision": "20240303", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -5367,7 +5367,7 @@ "description": "Type used for Istio services scoped to an Istio mesh." }, "name": { - "description": "Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", + "description": "Identifier. Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", "type": "string" }, "telemetry": { @@ -5441,7 +5441,7 @@ "type": "number" }, "name": { - "description": "Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", + "description": "Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", "type": "string" }, "rollingPeriod": { diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index 427fe831b6c..1148f6999af 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -5521,7 +5521,7 @@ type MService struct { // MeshIstio: Type used for Istio services scoped to an Istio mesh. MeshIstio *MeshIstio `json:"meshIstio,omitempty"` - // Name: Resource name for this Service. The format is: + // Name: Identifier. Resource name for this Service. The format is: // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] Name string `json:"name,omitempty"` @@ -5647,7 +5647,8 @@ type ServiceLevelObjective struct { // objective to be met. 0 < goal <= 0.999. Goal float64 `json:"goal,omitempty"` - // Name: Resource name for this ServiceLevelObjective. The format is: + // Name: Identifier. Resource name for this ServiceLevelObjective. The + // format is: // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObje // ctives/[SLO_NAME] Name string `json:"name,omitempty"` @@ -17528,7 +17529,7 @@ type ServicesPatchCall struct { // Patch: Update this Service. // -// - name: Resource name for this Service. The format is: +// - name: Identifier. Resource name for this Service. The format is: // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]. func (r *ServicesService) Patch(name string, service *MService) *ServicesPatchCall { c := &ServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -17644,7 +17645,7 @@ func (c *ServicesPatchCall) Do(opts ...googleapi.CallOption) (*MService, error) // ], // "parameters": { // "name": { - // "description": "Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", + // "description": "Identifier. Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", // "location": "path", // "pattern": "^[^/]+/[^/]+/services/[^/]+$", // "required": true, @@ -18423,7 +18424,8 @@ type ServicesServiceLevelObjectivesPatchCall struct { // Patch: Update the given ServiceLevelObjective. // -// - name: Resource name for this ServiceLevelObjective. The format is: +// - name: Identifier. Resource name for this ServiceLevelObjective. The +// format is: // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelOb // jectives/[SLO_NAME]. func (r *ServicesServiceLevelObjectivesService) Patch(name string, servicelevelobjective *ServiceLevelObjective) *ServicesServiceLevelObjectivesPatchCall { @@ -18540,7 +18542,7 @@ func (c *ServicesServiceLevelObjectivesPatchCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "name": { - // "description": "Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", + // "description": "Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", // "location": "path", // "pattern": "^[^/]+/[^/]+/services/[^/]+/serviceLevelObjectives/[^/]+$", // "required": true, diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 9990e196a1d..8545c60ad50 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -135,6 +135,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getAlertConfig": { + "description": "Get the AlertConfig of the requested project.", + "flatPath": "v2alpha/projects/{projectsId}/alertConfig", + "httpMethod": "GET", + "id": "retail.projects.getAlertConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full AlertConfig resource name. Format: projects/{project_number}/alertConfig", + "location": "path", + "pattern": "^projects/[^/]+/alertConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudRetailV2alphaAlertConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getLoggingConfig": { "description": "Gets the LoggingConfig of the requested project.", "flatPath": "v2alpha/projects/{projectsId}/loggingConfig", @@ -210,6 +235,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "updateAlertConfig": { + "description": "Update the alert config of the requested project.", + "flatPath": "v2alpha/projects/{projectsId}/alertConfig", + "httpMethod": "PATCH", + "id": "retail.projects.updateAlertConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. The name of the AlertConfig singleton resource. Format: projects/*/alertConfig", + "location": "path", + "pattern": "^projects/[^/]+/alertConfig$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided AlertConfig to update. If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "request": { + "$ref": "GoogleCloudRetailV2alphaAlertConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaAlertConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "updateLoggingConfig": { "description": "Updates the LoggingConfig of the requested project.", "flatPath": "v2alpha/projects/{projectsId}/loggingConfig", @@ -2416,7 +2475,7 @@ } } }, - "revision": "20240212", + "revision": "20240229", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3241,6 +3300,67 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaAlertConfig": { + "description": "Project level alert config.", + "id": "GoogleCloudRetailV2alphaAlertConfig", + "properties": { + "alertPolicies": { + "description": "Alert policies for a customer. They must be unique by [AlertPolicy.alert_group]", + "items": { + "$ref": "GoogleCloudRetailV2alphaAlertConfigAlertPolicy" + }, + "type": "array" + }, + "name": { + "description": "Required. Immutable. The name of the AlertConfig singleton resource. Format: projects/*/alertConfig", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaAlertConfigAlertPolicy": { + "description": "Alert policy for a customer.", + "id": "GoogleCloudRetailV2alphaAlertConfigAlertPolicy", + "properties": { + "alertGroup": { + "description": "The feature that provides alerting capability. Supported value is only `search-data-quality` for now.", + "type": "string" + }, + "enrollStatus": { + "description": "The enrollment status of a customer.", + "enum": [ + "ENROLL_STATUS_UNSPECIFIED", + "ENROLLED", + "DECLINED" + ], + "enumDescriptions": [ + "Default value. Used for customers who have not responded to the alert policy.", + "Customer is enrolled in this policy.", + "Customer declined this policy." + ], + "type": "string" + }, + "recipients": { + "description": "Recipients for the alert policy. One alert policy should not exceed 20 recipients.", + "items": { + "$ref": "GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient": { + "description": "Recipient contact information.", + "id": "GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient", + "properties": { + "emailAddress": { + "description": "Email address of the recipient.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaAttributesConfig": { "description": "Catalog level attribute config.", "id": "GoogleCloudRetailV2alphaAttributesConfig", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index db043dca6e8..082105a9461 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -1883,6 +1883,115 @@ func (s *GoogleCloudRetailV2alphaAddLocalInventoriesRequest) MarshalJSON() ([]by type GoogleCloudRetailV2alphaAddLocalInventoriesResponse struct { } +// GoogleCloudRetailV2alphaAlertConfig: Project level alert config. +type GoogleCloudRetailV2alphaAlertConfig struct { + // AlertPolicies: Alert policies for a customer. They must be unique by + // [AlertPolicy.alert_group] + AlertPolicies []*GoogleCloudRetailV2alphaAlertConfigAlertPolicy `json:"alertPolicies,omitempty"` + + // Name: Required. Immutable. The name of the AlertConfig singleton + // resource. Format: projects/*/alertConfig + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AlertPolicies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AlertPolicies") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaAlertConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaAlertConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaAlertConfigAlertPolicy: Alert policy for a +// customer. +type GoogleCloudRetailV2alphaAlertConfigAlertPolicy struct { + // AlertGroup: The feature that provides alerting capability. Supported + // value is only `search-data-quality` for now. + AlertGroup string `json:"alertGroup,omitempty"` + + // EnrollStatus: The enrollment status of a customer. + // + // Possible values: + // "ENROLL_STATUS_UNSPECIFIED" - Default value. Used for customers who + // have not responded to the alert policy. + // "ENROLLED" - Customer is enrolled in this policy. + // "DECLINED" - Customer declined this policy. + EnrollStatus string `json:"enrollStatus,omitempty"` + + // Recipients: Recipients for the alert policy. One alert policy should + // not exceed 20 recipients. + Recipients []*GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient `json:"recipients,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AlertGroup") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AlertGroup") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaAlertConfigAlertPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaAlertConfigAlertPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient: Recipient +// contact information. +type GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient struct { + // EmailAddress: Email address of the recipient. + EmailAddress string `json:"emailAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EmailAddress") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EmailAddress") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaAttributesConfig: Catalog level attribute // config. type GoogleCloudRetailV2alphaAttributesConfig struct { @@ -11062,6 +11171,154 @@ func (c *ProjectsEnrollSolutionCall) Do(opts ...googleapi.CallOption) (*GoogleLo } +// method id "retail.projects.getAlertConfig": + +type ProjectsGetAlertConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetAlertConfig: Get the AlertConfig of the requested project. +// +// - name: Full AlertConfig resource name. Format: +// projects/{project_number}/alertConfig. +func (r *ProjectsService) GetAlertConfig(name string) *ProjectsGetAlertConfigCall { + c := &ProjectsGetAlertConfigCall{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 *ProjectsGetAlertConfigCall) Fields(s ...googleapi.Field) *ProjectsGetAlertConfigCall { + 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 *ProjectsGetAlertConfigCall) IfNoneMatch(entityTag string) *ProjectsGetAlertConfigCall { + 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 *ProjectsGetAlertConfigCall) Context(ctx context.Context) *ProjectsGetAlertConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsGetAlertConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetAlertConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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, "v2alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.getAlertConfig" call. +// Exactly one of *GoogleCloudRetailV2alphaAlertConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2alphaAlertConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsGetAlertConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaAlertConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudRetailV2alphaAlertConfig{ + ServerResponse: 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 the AlertConfig of the requested project.", + // "flatPath": "v2alpha/projects/{projectsId}/alertConfig", + // "httpMethod": "GET", + // "id": "retail.projects.getAlertConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full AlertConfig resource name. Format: projects/{project_number}/alertConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/alertConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudRetailV2alphaAlertConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.getLoggingConfig": type ProjectsGetLoggingConfigCall struct { @@ -11508,6 +11765,164 @@ func (c *ProjectsListEnrolledSolutionsCall) Do(opts ...googleapi.CallOption) (*G } +// method id "retail.projects.updateAlertConfig": + +type ProjectsUpdateAlertConfigCall struct { + s *Service + name string + googlecloudretailv2alphaalertconfig *GoogleCloudRetailV2alphaAlertConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateAlertConfig: Update the alert config of the requested project. +// +// - name: Immutable. The name of the AlertConfig singleton resource. +// Format: projects/*/alertConfig. +func (r *ProjectsService) UpdateAlertConfig(name string, googlecloudretailv2alphaalertconfig *GoogleCloudRetailV2alphaAlertConfig) *ProjectsUpdateAlertConfigCall { + c := &ProjectsUpdateAlertConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2alphaalertconfig = googlecloudretailv2alphaalertconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided AlertConfig to update. If not set, all +// supported fields are updated. +func (c *ProjectsUpdateAlertConfigCall) UpdateMask(updateMask string) *ProjectsUpdateAlertConfigCall { + 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 *ProjectsUpdateAlertConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateAlertConfigCall { + 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 *ProjectsUpdateAlertConfigCall) Context(ctx context.Context) *ProjectsUpdateAlertConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsUpdateAlertConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsUpdateAlertConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-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.googlecloudretailv2alphaalertconfig) + 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, "v2alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.updateAlertConfig" call. +// Exactly one of *GoogleCloudRetailV2alphaAlertConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2alphaAlertConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsUpdateAlertConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaAlertConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudRetailV2alphaAlertConfig{ + ServerResponse: 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 the alert config of the requested project.", + // "flatPath": "v2alpha/projects/{projectsId}/alertConfig", + // "httpMethod": "PATCH", + // "id": "retail.projects.updateAlertConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Immutable. The name of the AlertConfig singleton resource. Format: projects/*/alertConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/alertConfig$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided AlertConfig to update. If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaAlertConfig" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaAlertConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.updateLoggingConfig": type ProjectsUpdateLoggingConfigCall struct { diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index 5c047b9b582..6e1f8aea2f5 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -632,7 +632,7 @@ } } }, - "revision": "20240224", + "revision": "20240302", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -726,11 +726,11 @@ "type": "string" }, "cloudfrontDomain": { - "description": "Optional. Cloudfront domain name pointing to this bucket (as origin), to use when fetching. Format: `https://{id}.cloudfront.net` or any valid custom domain `https://...`", + "description": "Optional. The CloudFront distribution domain name pointing to this bucket, to use when fetching. See [Transfer from S3 via CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) for more information. Format: `https://{id}.cloudfront.net` or any valid custom domain. Must begin with `https://`.", "type": "string" }, "credentialsSecret": { - "description": "Optional. The Resource name of a secret in Secret Manager. AWS credentials must be stored in Secret Manager in JSON format: { \"access_key_id\": \"ACCESS_KEY_ID\", \"secret_access_key\": \"SECRET_ACCESS_KEY\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Amazon S3] (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) for more information. If `credentials_secret` is specified, do not specify role_arn or aws_access_key. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number}/secrets/{secret_name}`", + "description": "Optional. The Resource name of a secret in Secret Manager. AWS credentials must be stored in Secret Manager in JSON format: { \"access_key_id\": \"ACCESS_KEY_ID\", \"secret_access_key\": \"SECRET_ACCESS_KEY\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Amazon S3] (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) for more information. If `credentials_secret` is specified, do not specify role_arn or aws_access_key. Format: `projects/{project_number}/secrets/{secret_name}`", "type": "string" }, "path": { @@ -757,7 +757,7 @@ "type": "string" }, "credentialsSecret": { - "description": "Optional. The Resource name of a secret in Secret Manager. The Azure SAS token must be stored in Secret Manager in JSON format: { \"sas_token\" : \"SAS_TOKEN\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Microsoft Azure Blob Storage] (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) for more information. If `credentials_secret` is specified, do not specify azure_credentials. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number}/secrets/{secret_name}`", + "description": "Optional. The Resource name of a secret in Secret Manager. The Azure SAS token must be stored in Secret Manager in JSON format: { \"sas_token\" : \"SAS_TOKEN\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Microsoft Azure Blob Storage] (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) for more information. If `credentials_secret` is specified, do not specify azure_credentials. Format: `projects/{project_number}/secrets/{secret_name}`", "type": "string" }, "path": { @@ -937,7 +937,7 @@ "type": "string" }, "managedFolderTransferEnabled": { - "description": "Transfer managed folders is in public preview. This option is only applicable to the Cloud Storage source bucket. If set to true: - The source managed folder will be transferred to the destination bucket - The destination managed folder will always be overwritten, other OVERWRITE options will not be supported", + "description": "Preview. Enables the transfer of managed folders between Cloud Storage buckets. Set this option on the gcs_data_source. If set to true: - Managed folders in the source bucket are transferred to the destination bucket. - Managed folders in the destination bucket are overwritten. Other OVERWRITE options are not supported. See [Transfer Cloud Storage managed folders](/storage-transfer/docs/managed-folders).", "type": "boolean" }, "path": { diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index dc213d737e8..6c3ddb85676 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -362,10 +362,12 @@ type AwsS3Data struct { // (https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). BucketName string `json:"bucketName,omitempty"` - // CloudfrontDomain: Optional. Cloudfront domain name pointing to this - // bucket (as origin), to use when fetching. Format: - // `https://{id}.cloudfront.net` or any valid custom domain - // `https://...` + // CloudfrontDomain: Optional. The CloudFront distribution domain name + // pointing to this bucket, to use when fetching. See Transfer from S3 + // via CloudFront + // (https://cloud.google.com/storage-transfer/docs/s3-cloudfront) for + // more information. Format: `https://{id}.cloudfront.net` or any valid + // custom domain. Must begin with `https://`. CloudfrontDomain string `json:"cloudfrontDomain,omitempty"` // CredentialsSecret: Optional. The Resource name of a secret in Secret @@ -376,8 +378,7 @@ type AwsS3Data struct { // access to a source: Amazon S3] // (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) // for more information. If `credentials_secret` is specified, do not - // specify role_arn or aws_access_key. This feature is in preview - // (https://cloud.google.com/terms/service-terms#1). Format: + // specify role_arn or aws_access_key. Format: // `projects/{project_number}/secrets/{secret_name}` CredentialsSecret string `json:"credentialsSecret,omitempty"` @@ -445,8 +446,7 @@ type AzureBlobStorageData struct { // [Configure access to a source: Microsoft Azure Blob Storage] // (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) // for more information. If `credentials_secret` is specified, do not - // specify azure_credentials. This feature is in preview - // (https://cloud.google.com/terms/service-terms#1). Format: + // specify azure_credentials. Format: // `projects/{project_number}/secrets/{secret_name}` CredentialsSecret string `json:"credentialsSecret,omitempty"` @@ -820,12 +820,13 @@ type GcsData struct { // Name Requirements (/storage/docs/naming#requirements). BucketName string `json:"bucketName,omitempty"` - // ManagedFolderTransferEnabled: Transfer managed folders is in public - // preview. This option is only applicable to the Cloud Storage source - // bucket. If set to true: - The source managed folder will be - // transferred to the destination bucket - The destination managed - // folder will always be overwritten, other OVERWRITE options will not - // be supported + // ManagedFolderTransferEnabled: Preview. Enables the transfer of + // managed folders between Cloud Storage buckets. Set this option on the + // gcs_data_source. If set to true: - Managed folders in the source + // bucket are transferred to the destination bucket. - Managed folders + // in the destination bucket are overwritten. Other OVERWRITE options + // are not supported. See Transfer Cloud Storage managed folders + // (/storage-transfer/docs/managed-folders). ManagedFolderTransferEnabled bool `json:"managedFolderTransferEnabled,omitempty"` // Path: Root path to transfer objects. Must be an empty string or full