From 939c453446c89cd271b5689a5499695792a48e8e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 1 Apr 2022 07:12:50 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- adsense/v2/adsense-api.json | 36 +- adsense/v2/adsense-gen.go | 21 + .../v1/androidmanagement-api.json | 6 +- androidmanagement/v1/androidmanagement-gen.go | 7 +- apikeys/v2/apikeys-api.json | 4 +- apikeys/v2/apikeys-gen.go | 5 +- appengine/v1/appengine-api.json | 8 +- appengine/v1/appengine-gen.go | 7 +- appengine/v1alpha/appengine-api.json | 4 +- appengine/v1alpha/appengine-gen.go | 3 +- appengine/v1beta/appengine-api.json | 10 +- appengine/v1beta/appengine-gen.go | 12 +- artifactregistry/v1/artifactregistry-api.json | 213 +- artifactregistry/v1/artifactregistry-gen.go | 308 ++- .../v1beta1/artifactregistry-api.json | 10 +- .../v1beta1/artifactregistry-gen.go | 8 +- .../v1beta2/artifactregistry-api.json | 22 +- .../v1beta2/artifactregistry-gen.go | 18 +- chat/v1/chat-api.json | 110 +- chat/v1/chat-gen.go | 193 +- cloudtasks/v2/cloudtasks-api.json | 4 +- cloudtasks/v2/cloudtasks-gen.go | 3 +- cloudtasks/v2beta2/cloudtasks-api.json | 4 +- cloudtasks/v2beta2/cloudtasks-gen.go | 3 +- cloudtasks/v2beta3/cloudtasks-api.json | 4 +- cloudtasks/v2beta3/cloudtasks-gen.go | 3 +- documentai/v1/documentai-api.json | 10 +- documentai/v1/documentai-gen.go | 10 +- documentai/v1beta2/documentai-api.json | 4 +- documentai/v1beta2/documentai-gen.go | 4 +- documentai/v1beta3/documentai-api.json | 10 +- documentai/v1beta3/documentai-gen.go | 10 +- firebaserules/v1/firebaserules-api.json | 4 +- firebaserules/v1/firebaserules-gen.go | 3 +- forms/v1/forms-api.json | 47 +- forms/v1/forms-gen.go | 50 +- iam/v1/iam-api.json | 4 +- iam/v1/iam-gen.go | 3 +- lifesciences/v2beta/lifesciences-api.json | 4 +- lifesciences/v2beta/lifesciences-gen.go | 3 +- monitoring/v1/monitoring-api.json | 48 +- monitoring/v1/monitoring-gen.go | 53 + recommender/v1/recommender-api.json | 376 +--- recommender/v1/recommender-gen.go | 1778 ++--------------- 44 files changed, 1177 insertions(+), 2270 deletions(-) diff --git a/adsense/v2/adsense-api.json b/adsense/v2/adsense-api.json index bd12726ca3e..96fcef36c03 100644 --- a/adsense/v2/adsense-api.json +++ b/adsense/v2/adsense-api.json @@ -1567,7 +1567,7 @@ } } }, - "revision": "20220319", + "revision": "20220330", "rootUrl": "https://adsense.googleapis.com/", "schemas": { "Account": { @@ -1602,6 +1602,23 @@ "readOnly": true, "type": "boolean" }, + "state": { + "description": "Output only. State of the account.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "NEEDS_ATTENTION", + "CLOSED" + ], + "enumDescriptions": [ + "State unspecified.", + "The account is open and ready to serve ads.", + "There are some issues with this account. Publishers should visit AdSense in order to fix the account.", + "The account is closed and can't serve ads." + ], + "readOnly": true, + "type": "string" + }, "timeZone": { "$ref": "TimeZone", "description": "The account time zone, as used by reporting. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725)." @@ -1626,6 +1643,23 @@ "description": "Output only. Unique ID of the ad client as used in the `AD_CLIENT_ID` reporting dimension. Present only if the ad client supports reporting.", "readOnly": true, "type": "string" + }, + "state": { + "description": "Output only. State of the ad client.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "GETTING_READY", + "REQUIRES_REVIEW" + ], + "enumDescriptions": [ + "State unspecified.", + "The ad client is ready to show ads.", + "Running some checks on the ad client before it is ready to serve ads.", + "The ad client hasn't been checked yet. There are tasks pending before AdSense will start the review." + ], + "readOnly": true, + "type": "string" } }, "type": "object" diff --git a/adsense/v2/adsense-gen.go b/adsense/v2/adsense-gen.go index 5c4d3be5973..15cb387231f 100644 --- a/adsense/v2/adsense-gen.go +++ b/adsense/v2/adsense-gen.go @@ -280,6 +280,16 @@ type Account struct { // Premium: Output only. Whether this account is premium. Premium bool `json:"premium,omitempty"` + // State: Output only. State of the account. + // + // Possible values: + // "STATE_UNSPECIFIED" - State unspecified. + // "READY" - The account is open and ready to serve ads. + // "NEEDS_ATTENTION" - There are some issues with this account. + // Publishers should visit AdSense in order to fix the account. + // "CLOSED" - The account is closed and can't serve ads. + State string `json:"state,omitempty"` + // TimeZone: The account time zone, as used by reporting. For more // information, see changing the time zone of your reports // (https://support.google.com/adsense/answer/9830725). @@ -328,6 +338,17 @@ type AdClient struct { // client supports reporting. ReportingDimensionId string `json:"reportingDimensionId,omitempty"` + // State: Output only. State of the ad client. + // + // Possible values: + // "STATE_UNSPECIFIED" - State unspecified. + // "READY" - The ad client is ready to show ads. + // "GETTING_READY" - Running some checks on the ad client before it is + // ready to serve ads. + // "REQUIRES_REVIEW" - The ad client hasn't been checked yet. There + // are tasks pending before AdSense will start the review. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 856c42ef168..fe6406d00e8 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1004,7 +1004,7 @@ } } }, - "revision": "20220314", + "revision": "20220330", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdvancedSecurityOverrides": { @@ -2270,7 +2270,7 @@ "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); } The JSON representation for Empty is empty JSON object {}.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } ", "id": "Empty", "properties": {}, "type": "object" @@ -3849,7 +3849,7 @@ }, "permittedAccessibilityServices": { "$ref": "PackageNameList", - "description": "Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used." + "description": "Specifies permitted accessibility services. If the field is not set, any accessibility service can be used. If the field is set, only the accessibility services in this list and the system's built-in accessibility service can be used. In particular, if the field is set to empty, only the system's built-in accessibility servicess can be used. This can be set on fully managed devices and on work profiles. When applied to a work profile, this affects both the personal profile and the work profile." }, "permittedInputMethods": { "$ref": "PackageNameList", diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 34aed525434..61ba7ab1690 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -1840,8 +1840,7 @@ func (s *Display) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -3961,7 +3960,9 @@ type Policy struct { // used. If the field is set, only the accessibility services in this // list and the system's built-in accessibility service can be used. In // particular, if the field is set to empty, only the system's built-in - // accessibility servicess can be used. + // accessibility servicess can be used. This can be set on fully managed + // devices and on work profiles. When applied to a work profile, this + // affects both the personal profile and the work profile. PermittedAccessibilityServices *PackageNameList `json:"permittedAccessibilityServices,omitempty"` // PermittedInputMethods: If present, only the input methods provided by diff --git a/apikeys/v2/apikeys-api.json b/apikeys/v2/apikeys-api.json index 151c59bea43..d1794634074 100644 --- a/apikeys/v2/apikeys-api.json +++ b/apikeys/v2/apikeys-api.json @@ -346,7 +346,7 @@ "type": "string" }, "showDeleted": { - "description": "Optional. Indicate that keys are marked as deleted within 30 days should also be returned. Normally only active keys are returned.", + "description": "Optional. Indicate that keys deleted in the past 30 days should also be returned.", "location": "query", "type": "boolean" } @@ -429,7 +429,7 @@ } } }, - "revision": "20220321", + "revision": "20220330", "rootUrl": "https://apikeys.googleapis.com/", "schemas": { "Operation": { diff --git a/apikeys/v2/apikeys-gen.go b/apikeys/v2/apikeys-gen.go index b429cff8fe3..b79880ef854 100644 --- a/apikeys/v2/apikeys-gen.go +++ b/apikeys/v2/apikeys-gen.go @@ -1868,8 +1868,7 @@ func (c *ProjectsLocationsKeysListCall) PageToken(pageToken string) *ProjectsLoc } // ShowDeleted sets the optional parameter "showDeleted": Indicate that -// keys are marked as deleted within 30 days should also be returned. -// Normally only active keys are returned. +// keys deleted in the past 30 days should also be returned. func (c *ProjectsLocationsKeysListCall) ShowDeleted(showDeleted bool) *ProjectsLocationsKeysListCall { c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) return c @@ -2006,7 +2005,7 @@ func (c *ProjectsLocationsKeysListCall) Do(opts ...googleapi.CallOption) (*V2Lis // "type": "string" // }, // "showDeleted": { - // "description": "Optional. Indicate that keys are marked as deleted within 30 days should also be returned. Normally only active keys are returned.", + // "description": "Optional. Indicate that keys deleted in the past 30 days should also be returned.", // "location": "query", // "type": "boolean" // } diff --git a/appengine/v1/appengine-api.json b/appengine/v1/appengine-api.json index 3f65fe4132c..d60521dd6b4 100644 --- a/appengine/v1/appengine-api.json +++ b/appengine/v1/appengine-api.json @@ -1595,7 +1595,7 @@ } } }, - "revision": "20211016", + "revision": "20220326", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -2127,7 +2127,7 @@ "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); } The JSON representation for Empty is empty JSON object {}.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } ", "id": "Empty", "properties": {}, "type": "object" @@ -3482,6 +3482,10 @@ "$ref": "ApiConfigHandler", "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." }, + "appEngineApis": { + "description": "app_engine_apis allows second generation runtimes to access the App Engine APIs.", + "type": "boolean" + }, "automaticScaling": { "$ref": "AutomaticScaling", "description": "Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic." diff --git a/appengine/v1/appengine-gen.go b/appengine/v1/appengine-gen.go index ac3a464324e..5a2eace9dbb 100644 --- a/appengine/v1/appengine-gen.go +++ b/appengine/v1/appengine-gen.go @@ -1220,8 +1220,7 @@ func (s *DomainMapping) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -3467,6 +3466,10 @@ type Version struct { // returned in GET requests if view=FULL is set. ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"` + // AppEngineApis: app_engine_apis allows second generation runtimes to + // access the App Engine APIs. + AppEngineApis bool `json:"appEngineApis,omitempty"` + // AutomaticScaling: Automatic scaling is based on request rate, // response latencies, and other application metrics. Instances are // dynamically created and destroyed as needed in order to handle diff --git a/appengine/v1alpha/appengine-api.json b/appengine/v1alpha/appengine-api.json index e3dbac110ae..cb1795bae77 100644 --- a/appengine/v1alpha/appengine-api.json +++ b/appengine/v1alpha/appengine-api.json @@ -887,7 +887,7 @@ } } }, - "revision": "20211029", + "revision": "20220326", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "AuthorizedCertificate": { @@ -1031,7 +1031,7 @@ "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); } The JSON representation for Empty is empty JSON object {}.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } ", "id": "Empty", "properties": {}, "type": "object" diff --git a/appengine/v1alpha/appengine-gen.go b/appengine/v1alpha/appengine-gen.go index 56ee9536fa6..28f5d0163b0 100644 --- a/appengine/v1alpha/appengine-gen.go +++ b/appengine/v1alpha/appengine-gen.go @@ -559,8 +559,7 @@ func (s *DomainMapping) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/appengine/v1beta/appengine-api.json b/appengine/v1beta/appengine-api.json index 376ff891bfe..db949cbf6f8 100644 --- a/appengine/v1beta/appengine-api.json +++ b/appengine/v1beta/appengine-api.json @@ -1595,7 +1595,7 @@ } } }, - "revision": "20211016", + "revision": "20220326", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -2178,7 +2178,7 @@ "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); } The JSON representation for Empty is empty JSON object {}.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } ", "id": "Empty", "properties": {}, "type": "object" @@ -2871,9 +2871,9 @@ "INTERNAL" ], "enumDescriptions": [ - "Unspecified should be treated as EXTERNAL", - "VMs should be created with external and internal IPs", - "VMs should be created with internal IPs only" + "Unspecified is treated as EXTERNAL.", + "Instances are created with both internal and external IP addresses.", + "Instances are created with internal IP addresses only." ], "type": "string" }, diff --git a/appengine/v1beta/appengine-gen.go b/appengine/v1beta/appengine-gen.go index 4c48c9d7c7e..44ceeccdf41 100644 --- a/appengine/v1beta/appengine-gen.go +++ b/appengine/v1beta/appengine-gen.go @@ -1317,8 +1317,7 @@ func (s *DomainMapping) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -2489,10 +2488,11 @@ type Network struct { // Engine flexible environment. // // Possible values: - // "INSTANCE_IP_MODE_UNSPECIFIED" - Unspecified should be treated as - // EXTERNAL - // "EXTERNAL" - VMs should be created with external and internal IPs - // "INTERNAL" - VMs should be created with internal IPs only + // "INSTANCE_IP_MODE_UNSPECIFIED" - Unspecified is treated as + // EXTERNAL. + // "EXTERNAL" - Instances are created with both internal and external + // IP addresses. + // "INTERNAL" - Instances are created with internal IP addresses only. InstanceIpMode string `json:"instanceIpMode,omitempty"` // InstanceTag: Tag to apply to the instance during creation. Only diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index dec639c6ea4..b1fddd81c6a 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -1207,9 +1207,57 @@ } } }, - "revision": "20220311", + "revision": "20220328", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { + "AptArtifact": { + "description": "A detailed representation of an Apt artifact. Information in the record is derived from the archive's control file. See https://www.debian.org/doc/debian-policy/ch-controlfields.html", + "id": "AptArtifact", + "properties": { + "architecture": { + "description": "Output only. Operating system architecture of the artifact.", + "readOnly": true, + "type": "string" + }, + "component": { + "description": "Output only. Repository component of the artifact.", + "readOnly": true, + "type": "string" + }, + "controlFile": { + "description": "Output only. Contents of the artifact's control metadata file.", + "format": "byte", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The Artifact Registry resource name of the artifact.", + "readOnly": true, + "type": "string" + }, + "packageName": { + "description": "Output only. The Apt package name of the artifact.", + "readOnly": true, + "type": "string" + }, + "packageType": { + "description": "Output only. An artifact is a binary or source package.", + "enum": [ + "PACKAGE_TYPE_UNSPECIFIED", + "BINARY", + "SOURCE" + ], + "enumDescriptions": [ + "Package type is not specified.", + "Binary package.", + "Source package." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", @@ -1274,7 +1322,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" @@ -1365,6 +1413,21 @@ }, "type": "object" }, + "ImportAptArtifactsErrorInfo": { + "description": "Error information explaining why a package was not imported.", + "id": "ImportAptArtifactsErrorInfo", + "properties": { + "error": { + "$ref": "Status", + "description": "The detailed error status." + }, + "gcsSource": { + "$ref": "ImportAptArtifactsGcsSource", + "description": "Google Cloud Storage location requested." + } + }, + "type": "object" + }, "ImportAptArtifactsGcsSource": { "description": "Google Cloud Storage location where the artifacts currently reside.", "id": "ImportAptArtifactsGcsSource", @@ -1383,6 +1446,12 @@ }, "type": "object" }, + "ImportAptArtifactsMetadata": { + "description": "The operation metadata for importing artifacts.", + "id": "ImportAptArtifactsMetadata", + "properties": {}, + "type": "object" + }, "ImportAptArtifactsRequest": { "description": "The request to import new apt artifacts.", "id": "ImportAptArtifactsRequest", @@ -1394,6 +1463,42 @@ }, "type": "object" }, + "ImportAptArtifactsResponse": { + "description": "The response message from importing APT artifacts.", + "id": "ImportAptArtifactsResponse", + "properties": { + "aptArtifacts": { + "description": "The Apt artifacts imported.", + "items": { + "$ref": "AptArtifact" + }, + "type": "array" + }, + "errors": { + "description": "Detailed error info for packages that were not imported.", + "items": { + "$ref": "ImportAptArtifactsErrorInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "ImportYumArtifactsErrorInfo": { + "description": "Error information explaining why a package was not imported.", + "id": "ImportYumArtifactsErrorInfo", + "properties": { + "error": { + "$ref": "Status", + "description": "The detailed error status." + }, + "gcsSource": { + "$ref": "ImportYumArtifactsGcsSource", + "description": "Google Cloud Storage location requested." + } + }, + "type": "object" + }, "ImportYumArtifactsGcsSource": { "description": "Google Cloud Storage location where the artifacts currently reside.", "id": "ImportYumArtifactsGcsSource", @@ -1412,6 +1517,12 @@ }, "type": "object" }, + "ImportYumArtifactsMetadata": { + "description": "The operation metadata for importing artifacts.", + "id": "ImportYumArtifactsMetadata", + "properties": {}, + "type": "object" + }, "ImportYumArtifactsRequest": { "description": "The request to import new yum artifacts.", "id": "ImportYumArtifactsRequest", @@ -1423,6 +1534,27 @@ }, "type": "object" }, + "ImportYumArtifactsResponse": { + "description": "The response message from importing YUM artifacts.", + "id": "ImportYumArtifactsResponse", + "properties": { + "errors": { + "description": "Detailed error info for packages that were not imported.", + "items": { + "$ref": "ImportYumArtifactsErrorInfo" + }, + "type": "array" + }, + "yumArtifacts": { + "description": "The yum artifacts imported.", + "items": { + "$ref": "YumArtifact" + }, + "type": "array" + } + }, + "type": "object" + }, "ListDockerImagesResponse": { "description": "The response from listing docker images.", "id": "ListDockerImagesResponse", @@ -1643,6 +1775,12 @@ }, "type": "object" }, + "OperationMetadata": { + "description": "Metadata type for longrunning-operations, currently empty.", + "id": "OperationMetadata", + "properties": {}, + "type": "object" + }, "Package": { "description": "Packages are named collections of versions.", "id": "Package", @@ -1773,6 +1911,12 @@ "description": "The name of the repository, for example: \"projects/p1/locations/us-central1/repositories/repo1\".", "type": "string" }, + "sizeBytes": { + "description": "Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "updateTime": { "description": "The time when the repository was last updated.", "format": "google-datetime", @@ -1879,6 +2023,20 @@ "properties": {}, "type": "object" }, + "UploadAptArtifactResponse": { + "description": "The response of the completed artifact upload operation. This response is contained in the Operation and available to users.", + "id": "UploadAptArtifactResponse", + "properties": { + "aptArtifacts": { + "description": "The Apt artifacts updated.", + "items": { + "$ref": "AptArtifact" + }, + "type": "array" + } + }, + "type": "object" + }, "UploadYumArtifactMediaResponse": { "description": "The response to upload an artifact.", "id": "UploadYumArtifactMediaResponse", @@ -1896,6 +2054,20 @@ "properties": {}, "type": "object" }, + "UploadYumArtifactResponse": { + "description": "The response of the completed artifact upload operation. This response is contained in the Operation and available to users.", + "id": "UploadYumArtifactResponse", + "properties": { + "yumArtifacts": { + "description": "The Apt artifacts updated.", + "items": { + "$ref": "YumArtifact" + }, + "type": "array" + } + }, + "type": "object" + }, "Version": { "description": "The body of a version resource. A version resource represents a collection of components, such as files and other data. This may correspond to a version in many package management schemes.", "id": "Version", @@ -1936,6 +2108,43 @@ } }, "type": "object" + }, + "YumArtifact": { + "description": "A detailed representation of a Yum artifact.", + "id": "YumArtifact", + "properties": { + "architecture": { + "description": "Output only. Operating system architecture of the artifact.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The Artifact Registry resource name of the artifact.", + "readOnly": true, + "type": "string" + }, + "packageName": { + "description": "Output only. The yum package name of the artifact.", + "readOnly": true, + "type": "string" + }, + "packageType": { + "description": "Output only. An artifact is a binary or source package.", + "enum": [ + "PACKAGE_TYPE_UNSPECIFIED", + "BINARY", + "SOURCE" + ], + "enumDescriptions": [ + "Package type is not specified.", + "Binary package (.rpm).", + "Source package (.srpm)." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index e6559e1027b..677bb6e71f4 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -275,6 +275,59 @@ type ProjectsLocationsRepositoriesYumArtifactsService struct { s *Service } +// AptArtifact: A detailed representation of an Apt artifact. +// Information in the record is derived from the archive's control file. +// See https://www.debian.org/doc/debian-policy/ch-controlfields.html +type AptArtifact struct { + // Architecture: Output only. Operating system architecture of the + // artifact. + Architecture string `json:"architecture,omitempty"` + + // Component: Output only. Repository component of the artifact. + Component string `json:"component,omitempty"` + + // ControlFile: Output only. Contents of the artifact's control metadata + // file. + ControlFile string `json:"controlFile,omitempty"` + + // Name: Output only. The Artifact Registry resource name of the + // artifact. + Name string `json:"name,omitempty"` + + // PackageName: Output only. The Apt package name of the artifact. + PackageName string `json:"packageName,omitempty"` + + // PackageType: Output only. An artifact is a binary or source package. + // + // Possible values: + // "PACKAGE_TYPE_UNSPECIFIED" - Package type is not specified. + // "BINARY" - Binary package. + // "SOURCE" - Source package. + PackageType string `json:"packageType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Architecture") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Architecture") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AptArtifact) MarshalJSON() ([]byte, error) { + type NoMethod AptArtifact + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the @@ -422,8 +475,7 @@ func (s *DockerImage) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -577,6 +629,38 @@ func (s *Hash) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportAptArtifactsErrorInfo: Error information explaining why a +// package was not imported. +type ImportAptArtifactsErrorInfo struct { + // Error: The detailed error status. + Error *Status `json:"error,omitempty"` + + // GcsSource: Google Cloud Storage location requested. + GcsSource *ImportAptArtifactsGcsSource `json:"gcsSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportAptArtifactsErrorInfo) MarshalJSON() ([]byte, error) { + type NoMethod ImportAptArtifactsErrorInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ImportAptArtifactsGcsSource: Google Cloud Storage location where the // artifacts currently reside. type ImportAptArtifactsGcsSource struct { @@ -610,6 +694,11 @@ func (s *ImportAptArtifactsGcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportAptArtifactsMetadata: The operation metadata for importing +// artifacts. +type ImportAptArtifactsMetadata struct { +} + // ImportAptArtifactsRequest: The request to import new apt artifacts. type ImportAptArtifactsRequest struct { // GcsSource: Google Cloud Storage location where input content is @@ -639,6 +728,70 @@ func (s *ImportAptArtifactsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportAptArtifactsResponse: The response message from importing APT +// artifacts. +type ImportAptArtifactsResponse struct { + // AptArtifacts: The Apt artifacts imported. + AptArtifacts []*AptArtifact `json:"aptArtifacts,omitempty"` + + // Errors: Detailed error info for packages that were not imported. + Errors []*ImportAptArtifactsErrorInfo `json:"errors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AptArtifacts") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AptArtifacts") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportAptArtifactsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ImportAptArtifactsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImportYumArtifactsErrorInfo: Error information explaining why a +// package was not imported. +type ImportYumArtifactsErrorInfo struct { + // Error: The detailed error status. + Error *Status `json:"error,omitempty"` + + // GcsSource: Google Cloud Storage location requested. + GcsSource *ImportYumArtifactsGcsSource `json:"gcsSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportYumArtifactsErrorInfo) MarshalJSON() ([]byte, error) { + type NoMethod ImportYumArtifactsErrorInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ImportYumArtifactsGcsSource: Google Cloud Storage location where the // artifacts currently reside. type ImportYumArtifactsGcsSource struct { @@ -672,6 +825,11 @@ func (s *ImportYumArtifactsGcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportYumArtifactsMetadata: The operation metadata for importing +// artifacts. +type ImportYumArtifactsMetadata struct { +} + // ImportYumArtifactsRequest: The request to import new yum artifacts. type ImportYumArtifactsRequest struct { // GcsSource: Google Cloud Storage location where input content is @@ -701,6 +859,38 @@ func (s *ImportYumArtifactsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportYumArtifactsResponse: The response message from importing YUM +// artifacts. +type ImportYumArtifactsResponse struct { + // Errors: Detailed error info for packages that were not imported. + Errors []*ImportYumArtifactsErrorInfo `json:"errors,omitempty"` + + // YumArtifacts: The yum artifacts imported. + YumArtifacts []*YumArtifact `json:"yumArtifacts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Errors") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportYumArtifactsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ImportYumArtifactsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDockerImagesResponse: The response from listing docker images. type ListDockerImagesResponse struct { // DockerImages: The docker images returned. @@ -1111,6 +1301,11 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OperationMetadata: Metadata type for longrunning-operations, +// currently empty. +type OperationMetadata struct { +} + // Package: Packages are named collections of versions. type Package struct { // CreateTime: The time when the package was created. @@ -1354,6 +1549,11 @@ type Repository struct { // "projects/p1/locations/us-central1/repositories/repo1". Name string `json:"name,omitempty"` + // SizeBytes: Output only. The size, in bytes, of all artifact storage + // in this repository. Repositories that are generally available or in + // public preview use this to calculate storage costs. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + // UpdateTime: The time when the repository was last updated. UpdateTime string `json:"updateTime,omitempty"` @@ -1604,6 +1804,36 @@ func (s *UploadAptArtifactMediaResponse) MarshalJSON() ([]byte, error) { type UploadAptArtifactRequest struct { } +// UploadAptArtifactResponse: The response of the completed artifact +// upload operation. This response is contained in the Operation and +// available to users. +type UploadAptArtifactResponse struct { + // AptArtifacts: The Apt artifacts updated. + AptArtifacts []*AptArtifact `json:"aptArtifacts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AptArtifacts") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AptArtifacts") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UploadAptArtifactResponse) MarshalJSON() ([]byte, error) { + type NoMethod UploadAptArtifactResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UploadYumArtifactMediaResponse: The response to upload an artifact. type UploadYumArtifactMediaResponse struct { // Operation: Operation to be returned to the user. @@ -1640,6 +1870,36 @@ func (s *UploadYumArtifactMediaResponse) MarshalJSON() ([]byte, error) { type UploadYumArtifactRequest struct { } +// UploadYumArtifactResponse: The response of the completed artifact +// upload operation. This response is contained in the Operation and +// available to users. +type UploadYumArtifactResponse struct { + // YumArtifacts: The Apt artifacts updated. + YumArtifacts []*YumArtifact `json:"yumArtifacts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "YumArtifacts") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "YumArtifacts") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UploadYumArtifactResponse) MarshalJSON() ([]byte, error) { + type NoMethod UploadYumArtifactResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Version: The body of a version resource. A version resource // represents a collection of components, such as files and other data. // This may correspond to a version in many package management schemes. @@ -1697,6 +1957,50 @@ func (s *Version) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// YumArtifact: A detailed representation of a Yum artifact. +type YumArtifact struct { + // Architecture: Output only. Operating system architecture of the + // artifact. + Architecture string `json:"architecture,omitempty"` + + // Name: Output only. The Artifact Registry resource name of the + // artifact. + Name string `json:"name,omitempty"` + + // PackageName: Output only. The yum package name of the artifact. + PackageName string `json:"packageName,omitempty"` + + // PackageType: Output only. An artifact is a binary or source package. + // + // Possible values: + // "PACKAGE_TYPE_UNSPECIFIED" - Package type is not specified. + // "BINARY" - Binary package (.rpm). + // "SOURCE" - Source package (.srpm). + PackageType string `json:"packageType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Architecture") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Architecture") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *YumArtifact) MarshalJSON() ([]byte, error) { + type NoMethod YumArtifact + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "artifactregistry.projects.getProjectSettings": type ProjectsGetProjectSettingsCall struct { diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index 0797586ba1b..9fa80bc1686 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -929,7 +929,7 @@ } } }, - "revision": "20220307", + "revision": "20220328", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { @@ -955,7 +955,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" @@ -1322,6 +1322,12 @@ "description": "The name of the repository, for example: \"projects/p1/locations/us-central1/repositories/repo1\".", "type": "string" }, + "sizeBytes": { + "description": "Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "updateTime": { "description": "The time when the repository was last updated.", "format": "google-datetime", diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index e37fe3d36dd..748157e6a57 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -316,8 +316,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -990,6 +989,11 @@ type Repository struct { // "projects/p1/locations/us-central1/repositories/repo1". Name string `json:"name,omitempty"` + // SizeBytes: Output only. The size, in bytes, of all artifact storage + // in this repository. Repositories that are generally available or in + // public preview use this to calculate storage costs. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + // UpdateTime: The time when the repository was last updated. UpdateTime string `json:"updateTime,omitempty"` diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index ee924cbc043..685de17f7a1 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -1135,7 +1135,7 @@ } } }, - "revision": "20220307", + "revision": "20220328", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -1209,7 +1209,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" @@ -1333,6 +1333,12 @@ }, "type": "object" }, + "ImportAptArtifactsMetadata": { + "description": "The operation metadata for importing artifacts.", + "id": "ImportAptArtifactsMetadata", + "properties": {}, + "type": "object" + }, "ImportAptArtifactsRequest": { "description": "The request to import new apt artifacts.", "id": "ImportAptArtifactsRequest", @@ -1398,6 +1404,12 @@ }, "type": "object" }, + "ImportYumArtifactsMetadata": { + "description": "The operation metadata for importing artifacts.", + "id": "ImportYumArtifactsMetadata", + "properties": {}, + "type": "object" + }, "ImportYumArtifactsRequest": { "description": "The request to import new yum artifacts.", "id": "ImportYumArtifactsRequest", @@ -1768,6 +1780,12 @@ "description": "The name of the repository, for example: \"projects/p1/locations/us-central1/repositories/repo1\".", "type": "string" }, + "sizeBytes": { + "description": "Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "updateTime": { "description": "The time when the repository was last updated.", "format": "google-datetime", diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index 3372131cc73..9a2e1dc2fb1 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -393,8 +393,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -613,6 +612,11 @@ func (s *ImportAptArtifactsGcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportAptArtifactsMetadata: The operation metadata for importing +// artifacts. +type ImportAptArtifactsMetadata struct { +} + // ImportAptArtifactsRequest: The request to import new apt artifacts. type ImportAptArtifactsRequest struct { // GcsSource: Google Cloud Storage location where input content is @@ -739,6 +743,11 @@ func (s *ImportYumArtifactsGcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportYumArtifactsMetadata: The operation metadata for importing +// artifacts. +type ImportYumArtifactsMetadata struct { +} + // ImportYumArtifactsRequest: The request to import new yum artifacts. type ImportYumArtifactsRequest struct { // GcsSource: Google Cloud Storage location where input content is @@ -1422,6 +1431,11 @@ type Repository struct { // "projects/p1/locations/us-central1/repositories/repo1". Name string `json:"name,omitempty"` + // SizeBytes: Output only. The size, in bytes, of all artifact storage + // in this repository. Repositories that are generally available or in + // public preview use this to calculate storage costs. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + // UpdateTime: The time when the repository was last updated. UpdateTime string `json:"updateTime,omitempty"` diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index e2bfdd47f51..b04dce5edad 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -120,7 +120,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", "location": "query", "type": "string" } @@ -155,7 +155,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", "location": "query", "type": "string" } @@ -194,7 +194,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", "location": "query", "type": "string" } @@ -262,7 +262,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", "location": "query", "type": "string" } @@ -297,7 +297,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", "location": "query", "type": "string" } @@ -336,7 +336,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", "location": "query", "type": "string" } @@ -356,7 +356,7 @@ "spaces": { "methods": { "get": { - "description": "Returns a space.", + "description": "Returns a space. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces/{spacesId}", "httpMethod": "GET", "id": "chat.spaces.get", @@ -378,7 +378,7 @@ } }, "list": { - "description": "Lists spaces the caller is a member of.", + "description": "Lists spaces the caller is a member of. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces", "httpMethod": "GET", "id": "chat.spaces.list", @@ -423,7 +423,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", "location": "query", "type": "string" } @@ -441,7 +441,7 @@ "members": { "methods": { "get": { - "description": "Returns a membership.", + "description": "Returns a membership. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces/{spacesId}/members/{membersId}", "httpMethod": "GET", "id": "chat.spaces.members.get", @@ -463,7 +463,7 @@ } }, "list": { - "description": "Lists human memberships in a space.", + "description": "Lists human memberships in a space. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces/{spacesId}/members", "httpMethod": "GET", "id": "chat.spaces.members.list", @@ -500,7 +500,7 @@ "messages": { "methods": { "create": { - "description": "Creates a message.", + "description": "Creates a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces/{spacesId}/messages", "httpMethod": "POST", "id": "chat.spaces.messages.create", @@ -521,7 +521,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", "location": "query", "type": "string" } @@ -535,7 +535,7 @@ } }, "delete": { - "description": "Deletes a message.", + "description": "Deletes a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", "httpMethod": "DELETE", "id": "chat.spaces.messages.delete", @@ -557,7 +557,7 @@ } }, "get": { - "description": "Returns a message.", + "description": "Returns a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", "httpMethod": "GET", "id": "chat.spaces.messages.get", @@ -579,7 +579,7 @@ } }, "update": { - "description": "Updates a message.", + "description": "Updates a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", "httpMethod": "PUT", "id": "chat.spaces.messages.update", @@ -614,7 +614,7 @@ "attachments": { "methods": { "get": { - "description": "Gets the metadata of a message attachment. The attachment data is fetched using the media API.", + "description": "Gets the metadata of a message attachment. The attachment data is fetched using the media API. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}", "httpMethod": "GET", "id": "chat.spaces.messages.attachments.get", @@ -642,7 +642,7 @@ } } }, - "revision": "20220319", + "revision": "20220326", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -661,15 +661,15 @@ "type": "object" }, "ActionResponse": { - "description": "Parameters that a bot can use to configure how it's response is posted.", + "description": "Parameters that a Chat app can use to configure how it's response is posted.", "id": "ActionResponse", "properties": { "dialogAction": { "$ref": "DialogAction", - "description": "A response to an event related to a [dialog](https://developers.google.com/chat/how-tos/bot-dialogs). Must be accompanied by `ResponseType.Dialog`." + "description": "A response to an event related to a [dialog](https://developers.google.com/chat/how-tos/dialogs). Must be accompanied by `ResponseType.Dialog`." }, "type": { - "description": "The type of bot response.", + "description": "The type of Chat app response.", "enum": [ "TYPE_UNSPECIFIED", "NEW_MESSAGE", @@ -681,10 +681,10 @@ "enumDescriptions": [ "Default type; will be handled as NEW_MESSAGE.", "Post as a new message in the topic.", - "Update the bot's message. This is only permitted on a CARD_CLICKED event where the message sender type is BOT.", + "Update the Chat app's message. This is only permitted on a CARD_CLICKED event where the message sender type is BOT.", "Update the cards on a user's message. This is only permitted as a response to a MESSAGE event with a matched url, or a CARD_CLICKED event where the message sender type is HUMAN. Text will be ignored.", "Privately ask the user for additional auth or config.", - "Presents a [dialog](https://developers.google.com/chat/how-tos/bot-dialogs)." + "Presents a [dialog](https://developers.google.com/chat/how-tos/dialogs)." ], "type": "string" }, @@ -804,7 +804,7 @@ "type": "string" }, "downloadUri": { - "description": "Output only. The download URL which should be used to allow a human user to download the attachment. Bots should not use this URL to download attachment content.", + "description": "Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps should not use this URL to download attachment content.", "type": "string" }, "driveDataRef": { @@ -830,7 +830,7 @@ "type": "string" }, "thumbnailUri": { - "description": "Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content.", + "description": "Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps should not use this URL to download attachment content.", "type": "string" } }, @@ -966,14 +966,14 @@ "type": "object" }, "CommonEventObject": { - "description": "Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes data submitted by users interacting with cards, like data entered in [dialogs](https://developers.google.com/chat/how-tos/bot-dialogs).", + "description": "Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes data submitted by users interacting with cards, like data entered in [dialogs](https://developers.google.com/chat/how-tos/dialogs).", "id": "CommonEventObject", "properties": { "formInputs": { "additionalProperties": { "$ref": "Inputs" }, - "description": "A map containing the current values of the widgets in a card. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. Depending on the input data type, a different object represents each input: For single-value widgets, `StringInput`. For multi-value widgets, an array of `StringInput` objects. For a date-time picker, a `DateTimeInput`. For a date-only picker, a `DateInput`. For a time-only picker, a `TimeInput`. Corresponds with the data entered by a user on a card in a [dialog](https://developers.google.com/chat/how-tos/bot-dialogs).", + "description": "A map containing the current values of the widgets in a card. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. Depending on the input data type, a different object represents each input: For single-value widgets, `StringInput`. For multi-value widgets, an array of `StringInput` objects. For a date-time picker, a `DateTimeInput`. For a date-only picker, a `DateInput`. For a time-only picker, a `TimeInput`. Corresponds with the data entered by a user on a card in a [dialog](https://developers.google.com/chat/how-tos/dialogs).", "type": "object" }, "hostApp": { @@ -1084,14 +1084,14 @@ }, "common": { "$ref": "CommonEventObject", - "description": "Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes information submitted by users interacting with [dialogs](https://developers.google.com/chat/how-tos/bot-dialogs), like data entered on a card." + "description": "Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes information submitted by users interacting with [dialogs](https://developers.google.com/chat/how-tos/dialogs), like data entered on a card." }, "configCompleteRedirectUrl": { - "description": "The URL the bot should redirect the user to after they have completed an authorization or configuration flow outside of Google Chat. See the [Authorizing access to 3p services guide](/chat/how-tos/auth-3p) for more information.", + "description": "The URL the Chat app should redirect the user to after they have completed an authorization or configuration flow outside of Google Chat. See the [Authorizing access to 3p services guide](/chat/how-tos/auth-3p) for more information.", "type": "string" }, "dialogEventType": { - "description": "The type of [dialog](https://developers.google.com/chat/how-tos/bot-dialogs) event received.", + "description": "The type of [dialog](https://developers.google.com/chat/how-tos/dialogs) event received.", "enum": [ "TYPE_UNSPECIFIED", "REQUEST_DIALOG", @@ -1100,9 +1100,9 @@ ], "enumDescriptions": [ "This could be used when the corresponding event is not dialog related. For example an @mention.", - "Any user action that opens a [dialog](https://developers.google.com/chat/how-tos/bot-dialogs).", - "A card click event from a [dialog](https://developers.google.com/chat/how-tos/bot-dialogs).", - "The [dialog](https://developers.google.com/chat/how-tos/bot-dialogs) was cancelled." + "Any user action that opens a [dialog](https://developers.google.com/chat/how-tos/dialogs).", + "A card click event from a [dialog](https://developers.google.com/chat/how-tos/dialogs).", + "The [dialog](https://developers.google.com/chat/how-tos/dialogs) was cancelled." ], "type": "string" }, @@ -1112,7 +1112,7 @@ "type": "string" }, "isDialogEvent": { - "description": "True when the event is related to [dialogs](https://developers.google.com/chat/how-tos/bot-dialogs).", + "description": "True when the event is related to [dialogs](https://developers.google.com/chat/how-tos/dialogs).", "type": "boolean" }, "message": { @@ -1124,11 +1124,11 @@ "description": "The space in which the event occurred." }, "threadKey": { - "description": "The bot-defined key for the thread related to the event. See the thread_key field of the `spaces.message.create` request for more information.", + "description": "The Chat app-defined key for the thread related to the event. See the thread_key field of the `spaces.message.create` request for more information.", "type": "string" }, "token": { - "description": "A secret value that bots can use to verify if a request is from Google. The token is randomly generated by Google, remains static, and can be obtained from the Google Chat API configuration page in the Cloud Console. Developers can revoke/regenerate it if needed from the same page.", + "description": "A secret value that Chat apps can use to verify if a request is from Google. The token is randomly generated by Google, remains static, and can be obtained from the Google Chat API configuration page in the Cloud Console. Developers can revoke/regenerate it if needed from the same page.", "type": "string" }, "type": { @@ -1143,9 +1143,9 @@ "enumDescriptions": [ "Default value for the enum. DO NOT USE.", "A message was sent in a space.", - "The bot was added to a space.", - "The bot was removed from a space.", - "The bot's interactive card was clicked." + "The Chat app was added to a space.", + "The Chat app was removed from a space.", + "The Chat app's interactive card was clicked." ], "type": "string" }, @@ -1168,16 +1168,16 @@ "type": "object" }, "DialogAction": { - "description": "Contains a [dialog](https://developers.google.com/chat/how-tos/bot-dialogs) and request status code.", + "description": "Contains a [dialog](https://developers.google.com/chat/how-tos/dialogs) and request status code.", "id": "DialogAction", "properties": { "actionStatus": { "$ref": "ActionStatus", - "description": "Status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/bot-dialogs). Displays a status and message to users, if necessary. For example, in case of an error or success." + "description": "Status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs). Displays a status and message to users, if necessary. For example, in case of an error or success." }, "dialog": { "$ref": "Dialog", - "description": "[Dialog](https://developers.google.com/chat/how-tos/bot-dialogs) for the request." + "description": "[Dialog](https://developers.google.com/chat/how-tos/dialogs) for the request." } }, "type": "object" @@ -1223,7 +1223,7 @@ "id": "FormAction", "properties": { "actionMethodName": { - "description": "The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.", + "description": "The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.", "type": "string" }, "parameters": { @@ -2355,7 +2355,7 @@ "type": "object" }, "MatchedUrl": { - "description": "A matched url in a Chat message. Chat bots can unfurl matched URLs. For more information, refer to [Unfurl links](/chat/how-tos/link-unfurling).", + "description": "A matched url in a Chat message. Chat apps can unfurl matched URLs. For more information, refer to [Unfurl links](/chat/how-tos/link-unfurling).", "id": "MatchedUrl", "properties": { "url": { @@ -2419,7 +2419,7 @@ "properties": { "actionResponse": { "$ref": "ActionResponse", - "description": "Input only. Parameters that a bot can use to configure how its response is posted." + "description": "Input only. Parameters that a Chat app can use to configure how its response is posted." }, "annotations": { "description": "Output only. Annotations associated with the text in this message.", @@ -2429,7 +2429,7 @@ "type": "array" }, "argumentText": { - "description": "Plain-text body of the message with all bot mentions stripped out.", + "description": "Plain-text body of the message with all Chat app mentions stripped out.", "type": "string" }, "attachment": { @@ -2470,10 +2470,6 @@ "description": "Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`", "type": "string" }, - "previewText": { - "description": "Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips.", - "type": "string" - }, "sender": { "$ref": "User", "description": "The user who created the message." @@ -2487,7 +2483,7 @@ "description": "The space the message belongs to." }, "text": { - "description": "Plain-text body of the message.", + "description": "Plain-text body of the message. The first link to an image, video, web page, or other preview-able item generates a preview chip.", "type": "string" }, "thread": { @@ -2559,7 +2555,7 @@ "properties": { "bot": { "$ref": "User", - "description": "The bot whose command was invoked." + "description": "The Chat app whose command was invoked." }, "commandId": { "description": "The command id of the invoked slash command.", @@ -2583,7 +2579,7 @@ ], "enumDescriptions": [ "Default value for the enum. DO NOT USE.", - "Add bot to space.", + "Add Chat app to space.", "Invoke slash command in space." ], "type": "string" @@ -2592,7 +2588,7 @@ "type": "object" }, "Space": { - "description": "A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat bot.", + "description": "A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.", "id": "Space", "properties": { "displayName": { @@ -2604,7 +2600,7 @@ "type": "string" }, "singleUserBotDm": { - "description": "Output only. Whether the space is a DM between a bot and a single human.", + "description": "Output only. Whether the space is a DM between a Chat app and a single human.", "readOnly": true, "type": "boolean" }, @@ -2623,7 +2619,7 @@ "enumDescriptions": [ "", "Conversations between two or more humans.", - "1:1 Direct Message between a human and a Chat bot, where all messages are flat. Note that this does not include direct messages between two humans." + "1:1 Direct Message between a human and a Chat app, where all messages are flat. Note that this does not include direct messages between two humans." ], "type": "string" } @@ -2770,7 +2766,7 @@ "enumDescriptions": [ "Default value for the enum. DO NOT USE.", "Human user.", - "Bot user." + "Chat app user." ], "type": "string" } diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 90aa92d352d..b648da7639e 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -265,21 +265,22 @@ func (s *ActionParameter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ActionResponse: Parameters that a bot can use to configure how it's -// response is posted. +// ActionResponse: Parameters that a Chat app can use to configure how +// it's response is posted. type ActionResponse struct { // DialogAction: A response to an event related to a dialog - // (https://developers.google.com/chat/how-tos/bot-dialogs). Must be + // (https://developers.google.com/chat/how-tos/dialogs). Must be // accompanied by `ResponseType.Dialog`. DialogAction *DialogAction `json:"dialogAction,omitempty"` - // Type: The type of bot response. + // Type: The type of Chat app response. // // Possible values: // "TYPE_UNSPECIFIED" - Default type; will be handled as NEW_MESSAGE. // "NEW_MESSAGE" - Post as a new message in the topic. - // "UPDATE_MESSAGE" - Update the bot's message. This is only permitted - // on a CARD_CLICKED event where the message sender type is BOT. + // "UPDATE_MESSAGE" - Update the Chat app's message. This is only + // permitted on a CARD_CLICKED event where the message sender type is + // BOT. // "UPDATE_USER_MESSAGE_CARDS" - Update the cards on a user's message. // This is only permitted as a response to a MESSAGE event with a // matched url, or a CARD_CLICKED event where the message sender type is @@ -287,7 +288,7 @@ type ActionResponse struct { // "REQUEST_CONFIG" - Privately ask the user for additional auth or // config. // "DIALOG" - Presents a - // [dialog](https://developers.google.com/chat/how-tos/bot-dialogs). + // [dialog](https://developers.google.com/chat/how-tos/dialogs). Type string `json:"type,omitempty"` // Url: URL for users to auth or config. (Only for REQUEST_CONFIG @@ -507,8 +508,8 @@ type Attachment struct { ContentType string `json:"contentType,omitempty"` // DownloadUri: Output only. The download URL which should be used to - // allow a human user to download the attachment. Bots should not use - // this URL to download attachment content. + // allow a human user to download the attachment. Chat apps should not + // use this URL to download attachment content. DownloadUri string `json:"downloadUri,omitempty"` // DriveDataRef: A reference to the drive attachment. This is used with @@ -528,8 +529,8 @@ type Attachment struct { Source string `json:"source,omitempty"` // ThumbnailUri: Output only. The thumbnail URL which should be used to - // preview the attachment to a human user. Bots should not use this URL - // to download attachment content. + // preview the attachment to a human user. Chat apps should not use this + // URL to download attachment content. ThumbnailUri string `json:"thumbnailUri,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -860,7 +861,7 @@ func (s *Color) UnmarshalJSON(data []byte) error { // such as locale, host app, and platform. For Chat apps, // `CommonEventObject` includes data submitted by users interacting with // cards, like data entered in dialogs -// (https://developers.google.com/chat/how-tos/bot-dialogs). +// (https://developers.google.com/chat/how-tos/dialogs). type CommonEventObject struct { // FormInputs: A map containing the current values of the widgets in a // card. The map keys are the string IDs assigned to each widget, and @@ -870,7 +871,7 @@ type CommonEventObject struct { // `StringInput` objects. For a date-time picker, a `DateTimeInput`. For // a date-only picker, a `DateInput`. For a time-only picker, a // `TimeInput`. Corresponds with the data entered by a user on a card in - // a dialog (https://developers.google.com/chat/how-tos/bot-dialogs). + // a dialog (https://developers.google.com/chat/how-tos/dialogs). FormInputs map[string]Inputs `json:"formInputs,omitempty"` // HostApp: The hostApp enum which indicates the app the add-on is @@ -1015,29 +1016,28 @@ type DeprecatedEvent struct { // Common: Represents information about the user's client, such as // locale, host app, and platform. For Chat apps, `CommonEventObject` // includes information submitted by users interacting with dialogs - // (https://developers.google.com/chat/how-tos/bot-dialogs), like data + // (https://developers.google.com/chat/how-tos/dialogs), like data // entered on a card. Common *CommonEventObject `json:"common,omitempty"` - // ConfigCompleteRedirectUrl: The URL the bot should redirect the user - // to after they have completed an authorization or configuration flow - // outside of Google Chat. See the Authorizing access to 3p services - // guide (/chat/how-tos/auth-3p) for more information. + // ConfigCompleteRedirectUrl: The URL the Chat app should redirect the + // user to after they have completed an authorization or configuration + // flow outside of Google Chat. See the Authorizing access to 3p + // services guide (/chat/how-tos/auth-3p) for more information. ConfigCompleteRedirectUrl string `json:"configCompleteRedirectUrl,omitempty"` // DialogEventType: The type of dialog - // (https://developers.google.com/chat/how-tos/bot-dialogs) event - // received. + // (https://developers.google.com/chat/how-tos/dialogs) event received. // // Possible values: // "TYPE_UNSPECIFIED" - This could be used when the corresponding // event is not dialog related. For example an @mention. // "REQUEST_DIALOG" - Any user action that opens a - // [dialog](https://developers.google.com/chat/how-tos/bot-dialogs). + // [dialog](https://developers.google.com/chat/how-tos/dialogs). // "SUBMIT_DIALOG" - A card click event from a - // [dialog](https://developers.google.com/chat/how-tos/bot-dialogs). + // [dialog](https://developers.google.com/chat/how-tos/dialogs). // "CANCEL_DIALOG" - The - // [dialog](https://developers.google.com/chat/how-tos/bot-dialogs) was + // [dialog](https://developers.google.com/chat/how-tos/dialogs) was // cancelled. DialogEventType string `json:"dialogEventType,omitempty"` @@ -1045,7 +1045,7 @@ type DeprecatedEvent struct { EventTime string `json:"eventTime,omitempty"` // IsDialogEvent: True when the event is related to dialogs - // (https://developers.google.com/chat/how-tos/bot-dialogs). + // (https://developers.google.com/chat/how-tos/dialogs). IsDialogEvent bool `json:"isDialogEvent,omitempty"` // Message: The message that triggered the event, if applicable. @@ -1054,13 +1054,13 @@ type DeprecatedEvent struct { // Space: The space in which the event occurred. Space *Space `json:"space,omitempty"` - // ThreadKey: The bot-defined key for the thread related to the event. - // See the thread_key field of the `spaces.message.create` request for - // more information. + // ThreadKey: The Chat app-defined key for the thread related to the + // event. See the thread_key field of the `spaces.message.create` + // request for more information. ThreadKey string `json:"threadKey,omitempty"` - // Token: A secret value that bots can use to verify if a request is - // from Google. The token is randomly generated by Google, remains + // Token: A secret value that Chat apps can use to verify if a request + // is from Google. The token is randomly generated by Google, remains // static, and can be obtained from the Google Chat API configuration // page in the Cloud Console. Developers can revoke/regenerate it if // needed from the same page. @@ -1071,9 +1071,9 @@ type DeprecatedEvent struct { // Possible values: // "UNSPECIFIED" - Default value for the enum. DO NOT USE. // "MESSAGE" - A message was sent in a space. - // "ADDED_TO_SPACE" - The bot was added to a space. - // "REMOVED_FROM_SPACE" - The bot was removed from a space. - // "CARD_CLICKED" - The bot's interactive card was clicked. + // "ADDED_TO_SPACE" - The Chat app was added to a space. + // "REMOVED_FROM_SPACE" - The Chat app was removed from a space. + // "CARD_CLICKED" - The Chat app's interactive card was clicked. Type string `json:"type,omitempty"` // User: The user that triggered the event. @@ -1133,18 +1133,17 @@ func (s *Dialog) MarshalJSON() ([]byte, error) { } // DialogAction: Contains a dialog -// (https://developers.google.com/chat/how-tos/bot-dialogs) and request +// (https://developers.google.com/chat/how-tos/dialogs) and request // status code. type DialogAction struct { // ActionStatus: Status for a request to either invoke or submit a - // dialog (https://developers.google.com/chat/how-tos/bot-dialogs). - // Displays a status and message to users, if necessary. For example, in - // case of an error or success. + // dialog (https://developers.google.com/chat/how-tos/dialogs). Displays + // a status and message to users, if necessary. For example, in case of + // an error or success. ActionStatus *ActionStatus `json:"actionStatus,omitempty"` - // Dialog: Dialog - // (https://developers.google.com/chat/how-tos/bot-dialogs) for the - // request. + // Dialog: Dialog (https://developers.google.com/chat/how-tos/dialogs) + // for the request. Dialog *Dialog `json:"dialog,omitempty"` // ForceSendFields is a list of field names (e.g. "ActionStatus") to @@ -1253,9 +1252,9 @@ type Empty struct { type FormAction struct { // ActionMethodName: The method name is used to identify which part of // the form triggered the form submission. This information is echoed - // back to the bot as part of the card click event. The same method name - // can be used for several elements that trigger a common behavior if - // desired. + // back to the Chat app as part of the card click event. The same method + // name can be used for several elements that trigger a common behavior + // if desired. ActionMethodName string `json:"actionMethodName,omitempty"` // Parameters: List of action parameters. @@ -2945,7 +2944,7 @@ func (s *ListSpacesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MatchedUrl: A matched url in a Chat message. Chat bots can unfurl +// MatchedUrl: A matched url in a Chat message. Chat apps can unfurl // matched URLs. For more information, refer to Unfurl links // (/chat/how-tos/link-unfurling). type MatchedUrl struct { @@ -3062,7 +3061,7 @@ func (s *Membership) MarshalJSON() ([]byte, error) { // Message: A message in Google Chat. type Message struct { - // ActionResponse: Input only. Parameters that a bot can use to + // ActionResponse: Input only. Parameters that a Chat app can use to // configure how its response is posted. ActionResponse *ActionResponse `json:"actionResponse,omitempty"` @@ -3070,8 +3069,8 @@ type Message struct { // this message. Annotations []*Annotation `json:"annotations,omitempty"` - // ArgumentText: Plain-text body of the message with all bot mentions - // stripped out. + // ArgumentText: Plain-text body of the message with all Chat app + // mentions stripped out. ArgumentText string `json:"argumentText,omitempty"` // Attachment: User uploaded attachment. @@ -3106,11 +3105,6 @@ type Message struct { // `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` Name string `json:"name,omitempty"` - // PreviewText: Text for generating preview chips. This text will not be - // displayed to the user, but any links to images, web pages, videos, - // etc. included here will generate preview chips. - PreviewText string `json:"previewText,omitempty"` - // Sender: The user who created the message. Sender *User `json:"sender,omitempty"` @@ -3120,7 +3114,8 @@ type Message struct { // Space: The space the message belongs to. Space *Space `json:"space,omitempty"` - // Text: Plain-text body of the message. + // Text: Plain-text body of the message. The first link to an image, + // video, web page, or other preview-able item generates a preview chip. Text string `json:"text,omitempty"` // Thread: The thread the message belongs to. @@ -3279,7 +3274,7 @@ func (s *SlashCommand) MarshalJSON() ([]byte, error) { // SlashCommandMetadata: Annotation metadata for slash commands (/). type SlashCommandMetadata struct { - // Bot: The bot whose command was invoked. + // Bot: The Chat app whose command was invoked. Bot *User `json:"bot,omitempty"` // CommandId: The command id of the invoked slash command. @@ -3295,7 +3290,7 @@ type SlashCommandMetadata struct { // // Possible values: // "TYPE_UNSPECIFIED" - Default value for the enum. DO NOT USE. - // "ADD" - Add bot to space. + // "ADD" - Add Chat app to space. // "INVOKE" - Invoke slash command in space. Type string `json:"type,omitempty"` @@ -3323,7 +3318,7 @@ func (s *SlashCommandMetadata) MarshalJSON() ([]byte, error) { } // Space: A space in Google Chat. Spaces are conversations between two -// or more users or 1:1 messages between a user and a Chat bot. +// or more users or 1:1 messages between a user and a Chat app. type Space struct { // DisplayName: The space's display name. For direct messages between // humans, this field might be empty. @@ -3333,8 +3328,8 @@ type Space struct { // Example: spaces/AAAAAAAAAAAA Name string `json:"name,omitempty"` - // SingleUserBotDm: Output only. Whether the space is a DM between a bot - // and a single human. + // SingleUserBotDm: Output only. Whether the space is a DM between a + // Chat app and a single human. SingleUserBotDm bool `json:"singleUserBotDm,omitempty"` // Threaded: Output only. Whether the messages are threaded in this @@ -3347,7 +3342,7 @@ type Space struct { // Possible values: // "TYPE_UNSPECIFIED" // "ROOM" - Conversations between two or more humans. - // "DM" - 1:1 Direct Message between a human and a Chat bot, where all + // "DM" - 1:1 Direct Message between a human and a Chat app, where all // messages are flat. Note that this does not include direct messages // between two humans. Type string `json:"type,omitempty"` @@ -3630,7 +3625,7 @@ type User struct { // Possible values: // "TYPE_UNSPECIFIED" - Default value for the enum. DO NOT USE. // "HUMAN" - Human user. - // "BOT" - Bot user. + // "BOT" - Chat app user. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to @@ -3767,7 +3762,7 @@ func (c *DmsMessagesCall) RequestId(requestId string) *DmsMessagesCall { // single thread. If this is the first message with a given thread // identifier, a new thread is created. Subsequent messages with the // same thread identifier will be posted into the same thread. This -// relieves bots and webhooks from having to store the Google Chat +// relieves Chat apps and webhooks from having to store the Google Chat // thread ID of a thread (created earlier by them) to post further // updates to it. Has no effect if thread field, corresponding to an // existing thread, is set in message. @@ -3888,7 +3883,7 @@ func (c *DmsMessagesCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", // "location": "query", // "type": "string" // } @@ -3940,7 +3935,7 @@ func (c *DmsWebhooksCall) RequestId(requestId string) *DmsWebhooksCall { // single thread. If this is the first message with a given thread // identifier, a new thread is created. Subsequent messages with the // same thread identifier will be posted into the same thread. This -// relieves bots and webhooks from having to store the Google Chat +// relieves Chat apps and webhooks from having to store the Google Chat // thread ID of a thread (created earlier by them) to post further // updates to it. Has no effect if thread field, corresponding to an // existing thread, is set in message. @@ -4061,7 +4056,7 @@ func (c *DmsWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", // "location": "query", // "type": "string" // } @@ -4113,7 +4108,7 @@ func (c *DmsConversationsMessagesCall) RequestId(requestId string) *DmsConversat // single thread. If this is the first message with a given thread // identifier, a new thread is created. Subsequent messages with the // same thread identifier will be posted into the same thread. This -// relieves bots and webhooks from having to store the Google Chat +// relieves Chat apps and webhooks from having to store the Google Chat // thread ID of a thread (created earlier by them) to post further // updates to it. Has no effect if thread field, corresponding to an // existing thread, is set in message. @@ -4234,7 +4229,7 @@ func (c *DmsConversationsMessagesCall) Do(opts ...googleapi.CallOption) (*Messag // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", // "location": "query", // "type": "string" // } @@ -4448,7 +4443,7 @@ func (c *RoomsMessagesCall) RequestId(requestId string) *RoomsMessagesCall { // single thread. If this is the first message with a given thread // identifier, a new thread is created. Subsequent messages with the // same thread identifier will be posted into the same thread. This -// relieves bots and webhooks from having to store the Google Chat +// relieves Chat apps and webhooks from having to store the Google Chat // thread ID of a thread (created earlier by them) to post further // updates to it. Has no effect if thread field, corresponding to an // existing thread, is set in message. @@ -4569,7 +4564,7 @@ func (c *RoomsMessagesCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", // "location": "query", // "type": "string" // } @@ -4621,7 +4616,7 @@ func (c *RoomsWebhooksCall) RequestId(requestId string) *RoomsWebhooksCall { // single thread. If this is the first message with a given thread // identifier, a new thread is created. Subsequent messages with the // same thread identifier will be posted into the same thread. This -// relieves bots and webhooks from having to store the Google Chat +// relieves Chat apps and webhooks from having to store the Google Chat // thread ID of a thread (created earlier by them) to post further // updates to it. Has no effect if thread field, corresponding to an // existing thread, is set in message. @@ -4742,7 +4737,7 @@ func (c *RoomsWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", // "location": "query", // "type": "string" // } @@ -4794,7 +4789,7 @@ func (c *RoomsConversationsMessagesCall) RequestId(requestId string) *RoomsConve // single thread. If this is the first message with a given thread // identifier, a new thread is created. Subsequent messages with the // same thread identifier will be posted into the same thread. This -// relieves bots and webhooks from having to store the Google Chat +// relieves Chat apps and webhooks from having to store the Google Chat // thread ID of a thread (created earlier by them) to post further // updates to it. Has no effect if thread field, corresponding to an // existing thread, is set in message. @@ -4915,7 +4910,7 @@ func (c *RoomsConversationsMessagesCall) Do(opts ...googleapi.CallOption) (*Mess // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", // "location": "query", // "type": "string" // } @@ -4942,7 +4937,8 @@ type SpacesGetCall struct { header_ http.Header } -// Get: Returns a space. +// Get: Returns a space. Requires service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). // // - name: Resource name of the space, in the form "spaces/*". Example: // spaces/AAAAAAAAAAAA. @@ -5051,7 +5047,7 @@ func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) { } return ret, nil // { - // "description": "Returns a space.", + // "description": "Returns a space. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces/{spacesId}", // "httpMethod": "GET", // "id": "chat.spaces.get", @@ -5085,7 +5081,9 @@ type SpacesListCall struct { header_ http.Header } -// List: Lists spaces the caller is a member of. +// List: Lists spaces the caller is a member of. Requires service +// account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). func (r *SpacesService) List() *SpacesListCall { c := &SpacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -5202,7 +5200,7 @@ func (c *SpacesListCall) Do(opts ...googleapi.CallOption) (*ListSpacesResponse, } return ret, nil // { - // "description": "Lists spaces the caller is a member of.", + // "description": "Lists spaces the caller is a member of. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces", // "httpMethod": "GET", // "id": "chat.spaces.list", @@ -5285,7 +5283,7 @@ func (c *SpacesWebhooksCall) RequestId(requestId string) *SpacesWebhooksCall { // single thread. If this is the first message with a given thread // identifier, a new thread is created. Subsequent messages with the // same thread identifier will be posted into the same thread. This -// relieves bots and webhooks from having to store the Google Chat +// relieves Chat apps and webhooks from having to store the Google Chat // thread ID of a thread (created earlier by them) to post further // updates to it. Has no effect if thread field, corresponding to an // existing thread, is set in message. @@ -5406,7 +5404,7 @@ func (c *SpacesWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", // "location": "query", // "type": "string" // } @@ -5433,7 +5431,8 @@ type SpacesMembersGetCall struct { header_ http.Header } -// Get: Returns a membership. +// Get: Returns a membership. Requires service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). // // - name: Resource name of the membership to be retrieved, in the form // "spaces/*/members/*". Example: @@ -5543,7 +5542,7 @@ func (c *SpacesMembersGetCall) Do(opts ...googleapi.CallOption) (*Membership, er } return ret, nil // { - // "description": "Returns a membership.", + // "description": "Returns a membership. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces/{spacesId}/members/{membersId}", // "httpMethod": "GET", // "id": "chat.spaces.members.get", @@ -5578,7 +5577,9 @@ type SpacesMembersListCall struct { header_ http.Header } -// List: Lists human memberships in a space. +// List: Lists human memberships in a space. Requires service account +// authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). // // - parent: The resource name of the space for which membership list is // to be fetched, in the form "spaces/*". Example: spaces/AAAAAAAAAAAA. @@ -5702,7 +5703,7 @@ func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershi } return ret, nil // { - // "description": "Lists human memberships in a space.", + // "description": "Lists human memberships in a space. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces/{spacesId}/members", // "httpMethod": "GET", // "id": "chat.spaces.members.list", @@ -5769,7 +5770,8 @@ type SpacesMessagesCreateCall struct { header_ http.Header } -// Create: Creates a message. +// Create: Creates a message. Requires service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). // // - parent: Space resource name, in the form "spaces/*". Example: // spaces/AAAAAAAAAAA. @@ -5793,7 +5795,7 @@ func (c *SpacesMessagesCreateCall) RequestId(requestId string) *SpacesMessagesCr // single thread. If this is the first message with a given thread // identifier, a new thread is created. Subsequent messages with the // same thread identifier will be posted into the same thread. This -// relieves bots and webhooks from having to store the Google Chat +// relieves Chat apps and webhooks from having to store the Google Chat // thread ID of a thread (created earlier by them) to post further // updates to it. Has no effect if thread field, corresponding to an // existing thread, is set in message. @@ -5893,7 +5895,7 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e } return ret, nil // { - // "description": "Creates a message.", + // "description": "Creates a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces/{spacesId}/messages", // "httpMethod": "POST", // "id": "chat.spaces.messages.create", @@ -5914,7 +5916,7 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", + // "description": "Optional. Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves Chat apps and webhooks from having to store the Google Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", // "location": "query", // "type": "string" // } @@ -5940,7 +5942,8 @@ type SpacesMessagesDeleteCall struct { header_ http.Header } -// Delete: Deletes a message. +// Delete: Deletes a message. Requires service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). // // - name: Resource name of the message to be deleted, in the form // "spaces/*/messages/*" Example: @@ -6037,7 +6040,7 @@ func (c *SpacesMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, err } return ret, nil // { - // "description": "Deletes a message.", + // "description": "Deletes a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "DELETE", // "id": "chat.spaces.messages.delete", @@ -6072,7 +6075,8 @@ type SpacesMessagesGetCall struct { header_ http.Header } -// Get: Returns a message. +// Get: Returns a message. Requires service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). // // - name: Resource name of the message to be retrieved, in the form // "spaces/*/messages/*". Example: @@ -6182,7 +6186,7 @@ func (c *SpacesMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, erro } return ret, nil // { - // "description": "Returns a message.", + // "description": "Returns a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "GET", // "id": "chat.spaces.messages.get", @@ -6217,7 +6221,8 @@ type SpacesMessagesUpdateCall struct { header_ http.Header } -// Update: Updates a message. +// Update: Updates a message. Requires service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). // // - name: Resource name in the form `spaces/*/messages/*`. Example: // `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. @@ -6327,7 +6332,7 @@ func (c *SpacesMessagesUpdateCall) Do(opts ...googleapi.CallOption) (*Message, e } return ret, nil // { - // "description": "Updates a message.", + // "description": "Updates a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "PUT", // "id": "chat.spaces.messages.update", @@ -6372,7 +6377,9 @@ type SpacesMessagesAttachmentsGetCall struct { } // Get: Gets the metadata of a message attachment. The attachment data -// is fetched using the media API. +// is fetched using the media API. Requires service account +// authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). // // - name: Resource name of the attachment, in the form // "spaces/*/messages/*/attachments/*". @@ -6481,7 +6488,7 @@ func (c *SpacesMessagesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*At } return ret, nil // { - // "description": "Gets the metadata of a message attachment. The attachment data is fetched using the media API.", + // "description": "Gets the metadata of a message attachment. The attachment data is fetched using the media API. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}", // "httpMethod": "GET", // "id": "chat.spaces.messages.attachments.get", diff --git a/cloudtasks/v2/cloudtasks-api.json b/cloudtasks/v2/cloudtasks-api.json index 451cd0d49ed..1e0517b64cd 100644 --- a/cloudtasks/v2/cloudtasks-api.json +++ b/cloudtasks/v2/cloudtasks-api.json @@ -685,7 +685,7 @@ } } }, - "revision": "20211130", + "revision": "20220321", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpRequest": { @@ -836,7 +836,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/cloudtasks/v2/cloudtasks-gen.go b/cloudtasks/v2/cloudtasks-gen.go index 1f838e6dc51..1f44e1201a6 100644 --- a/cloudtasks/v2/cloudtasks-gen.go +++ b/cloudtasks/v2/cloudtasks-gen.go @@ -587,8 +587,7 @@ func (s *CreateTaskRequest) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudtasks/v2beta2/cloudtasks-api.json b/cloudtasks/v2beta2/cloudtasks-api.json index 676f195fcee..96295b0beea 100644 --- a/cloudtasks/v2beta2/cloudtasks-api.json +++ b/cloudtasks/v2beta2/cloudtasks-api.json @@ -809,7 +809,7 @@ } } }, - "revision": "20211130", + "revision": "20220321", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AcknowledgeTaskRequest": { @@ -1005,7 +1005,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index 554453ad5ce..5c4573afe3c 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -727,8 +727,7 @@ func (s *CreateTaskRequest) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudtasks/v2beta3/cloudtasks-api.json b/cloudtasks/v2beta3/cloudtasks-api.json index e2cf5e77c16..397d4ce1868 100644 --- a/cloudtasks/v2beta3/cloudtasks-api.json +++ b/cloudtasks/v2beta3/cloudtasks-api.json @@ -697,7 +697,7 @@ } } }, - "revision": "20211130", + "revision": "20220321", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpQueue": { @@ -859,7 +859,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/cloudtasks/v2beta3/cloudtasks-gen.go b/cloudtasks/v2beta3/cloudtasks-gen.go index 71bbd2cc4ab..8f791f637a5 100644 --- a/cloudtasks/v2beta3/cloudtasks-gen.go +++ b/cloudtasks/v2beta3/cloudtasks-gen.go @@ -622,8 +622,7 @@ func (s *CreateTaskRequest) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 1d1734adfad..8940aea0b7d 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1947,7 +1947,7 @@ "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { - "description": "Entity type from a schema e.g. `Address`.", + "description": "Required. Entity type from a schema e.g. `Address`.", "type": "string" } }, @@ -3192,6 +3192,10 @@ "description": "The display name of the processor version.", "type": "string" }, + "googleManaged": { + "description": "Denotes that this ProcessorVersion is managed by google.", + "type": "boolean" + }, "kmsKeyName": { "description": "The KMS key name used for encryption.", "type": "string" @@ -3586,7 +3590,7 @@ "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { - "description": "Entity type from a schema e.g. `Address`.", + "description": "Required. Entity type from a schema e.g. `Address`.", "type": "string" } }, @@ -4783,7 +4787,7 @@ "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { - "description": "Entity type from a schema e.g. `Address`.", + "description": "Required. Entity type from a schema e.g. `Address`.", "type": "string" } }, diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index e4f67edafc8..b113955d6ef 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -1869,7 +1869,7 @@ type GoogleCloudDocumentaiV1DocumentEntity struct { // into the Document.text. TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Entity type from a schema e.g. `Address`. + // Type: Required. Entity type from a schema e.g. `Address`. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -3975,6 +3975,10 @@ type GoogleCloudDocumentaiV1ProcessorVersion struct { // DisplayName: The display name of the processor version. DisplayName string `json:"displayName,omitempty"` + // GoogleManaged: Denotes that this ProcessorVersion is managed by + // google. + GoogleManaged bool `json:"googleManaged,omitempty"` + // KmsKeyName: The KMS key name used for encryption. KmsKeyName string `json:"kmsKeyName,omitempty"` @@ -4585,7 +4589,7 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // into the Document.text. TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Entity type from a schema e.g. `Address`. + // Type: Required. Entity type from a schema e.g. `Address`. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -6509,7 +6513,7 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // into the Document.text. TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Entity type from a schema e.g. `Address`. + // Type: Required. Entity type from a schema e.g. `Address`. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index 02e97f8e377..026f76c6471 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -1344,7 +1344,7 @@ "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { - "description": "Entity type from a schema e.g. `Address`.", + "description": "Required. Entity type from a schema e.g. `Address`.", "type": "string" } }, @@ -2566,7 +2566,7 @@ "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { - "description": "Entity type from a schema e.g. `Address`.", + "description": "Required. Entity type from a schema e.g. `Address`.", "type": "string" } }, diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index eb45e361b2c..997cbc575d5 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -2051,7 +2051,7 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // into the Document.text. TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Entity type from a schema e.g. `Address`. + // Type: Required. Entity type from a schema e.g. `Address`. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -4039,7 +4039,7 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // into the Document.text. TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Entity type from a schema e.g. `Address`. + // Type: Required. Entity type from a schema e.g. `Address`. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 655e0de542d..6a9ce968727 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1848,7 +1848,7 @@ "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { - "description": "Entity type from a schema e.g. `Address`.", + "description": "Required. Entity type from a schema e.g. `Address`.", "type": "string" } }, @@ -3045,7 +3045,7 @@ "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { - "description": "Entity type from a schema e.g. `Address`.", + "description": "Required. Entity type from a schema e.g. `Address`.", "type": "string" } }, @@ -4513,7 +4513,7 @@ "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { - "description": "Entity type from a schema e.g. `Address`.", + "description": "Required. Entity type from a schema e.g. `Address`.", "type": "string" } }, @@ -5766,6 +5766,10 @@ "description": "The display name of the processor version.", "type": "string" }, + "googleManaged": { + "description": "Denotes that this ProcessorVersion is managed by google.", + "type": "boolean" + }, "kmsKeyName": { "description": "The KMS key name used for encryption.", "type": "string" diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 56e6445d7e6..0f201f6ccd5 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -2051,7 +2051,7 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // into the Document.text. TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Entity type from a schema e.g. `Address`. + // Type: Required. Entity type from a schema e.g. `Address`. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -3975,7 +3975,7 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // into the Document.text. TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Entity type from a schema e.g. `Address`. + // Type: Required. Entity type from a schema e.g. `Address`. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -6375,7 +6375,7 @@ type GoogleCloudDocumentaiV1beta3DocumentEntity struct { // into the Document.text. TextAnchor *GoogleCloudDocumentaiV1beta3DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Entity type from a schema e.g. `Address`. + // Type: Required. Entity type from a schema e.g. `Address`. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -8493,6 +8493,10 @@ type GoogleCloudDocumentaiV1beta3ProcessorVersion struct { // DisplayName: The display name of the processor version. DisplayName string `json:"displayName,omitempty"` + // GoogleManaged: Denotes that this ProcessorVersion is managed by + // google. + GoogleManaged bool `json:"googleManaged,omitempty"` + // KmsKeyName: The KMS key name used for encryption. KmsKeyName string `json:"kmsKeyName,omitempty"` diff --git a/firebaserules/v1/firebaserules-api.json b/firebaserules/v1/firebaserules-api.json index b2777d39767..bc8fe3f9a28 100644 --- a/firebaserules/v1/firebaserules-api.json +++ b/firebaserules/v1/firebaserules-api.json @@ -477,7 +477,7 @@ } } }, - "revision": "20220127", + "revision": "20220323", "rootUrl": "https://firebaserules.googleapis.com/", "schemas": { "Arg": { @@ -496,7 +496,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/firebaserules/v1/firebaserules-gen.go b/firebaserules/v1/firebaserules-gen.go index 2bdd84187d6..126027f67bc 100644 --- a/firebaserules/v1/firebaserules-gen.go +++ b/firebaserules/v1/firebaserules-gen.go @@ -217,8 +217,7 @@ func (s *Arg) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/forms/v1/forms-api.json b/forms/v1/forms-api.json index bd367fc113d..cf1da63a944 100644 --- a/forms/v1/forms-api.json +++ b/forms/v1/forms-api.json @@ -10,6 +10,15 @@ }, "https://www.googleapis.com/auth/drive.readonly": { "description": "See and download all your Google Drive files" + }, + "https://www.googleapis.com/auth/forms.body": { + "description": "See, edit, create, and delete all your Google Forms forms" + }, + "https://www.googleapis.com/auth/forms.body.readonly": { + "description": "See all your Google Forms forms" + }, + "https://www.googleapis.com/auth/forms.responses.readonly": { + "description": "See all responses to your Google Forms forms" } } } @@ -138,7 +147,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file" + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/forms.body" ] }, "create": { @@ -157,7 +167,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file" + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/forms.body" ] }, "get": { @@ -183,7 +194,9 @@ "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/drive.readonly" + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/forms.body", + "https://www.googleapis.com/auth/forms.body.readonly" ] } }, @@ -219,7 +232,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file" + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/forms.responses.readonly" ] }, "list": { @@ -260,7 +274,8 @@ }, "scopes": [ "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file" + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/forms.responses.readonly" ] } } @@ -293,7 +308,10 @@ "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/drive.readonly" + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/forms.body", + "https://www.googleapis.com/auth/forms.body.readonly", + "https://www.googleapis.com/auth/forms.responses.readonly" ] }, "delete": { @@ -326,7 +344,10 @@ "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/drive.readonly" + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/forms.body", + "https://www.googleapis.com/auth/forms.body.readonly", + "https://www.googleapis.com/auth/forms.responses.readonly" ] }, "list": { @@ -352,7 +373,10 @@ "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/drive.readonly" + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/forms.body", + "https://www.googleapis.com/auth/forms.body.readonly", + "https://www.googleapis.com/auth/forms.responses.readonly" ] }, "renew": { @@ -388,7 +412,10 @@ "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/drive.readonly" + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/forms.body", + "https://www.googleapis.com/auth/forms.body.readonly", + "https://www.googleapis.com/auth/forms.responses.readonly" ] } } @@ -396,7 +423,7 @@ } } }, - "revision": "20220322", + "revision": "20220329", "rootUrl": "https://forms.googleapis.com/", "schemas": { "Answer": { diff --git a/forms/v1/forms-gen.go b/forms/v1/forms-gen.go index f2d1a3b3529..48c221058d5 100644 --- a/forms/v1/forms-gen.go +++ b/forms/v1/forms-gen.go @@ -25,7 +25,7 @@ // // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: // -// formsService, err := forms.NewService(ctx, option.WithScopes(forms.DriveReadonlyScope)) +// formsService, err := forms.NewService(ctx, option.WithScopes(forms.FormsResponsesReadonlyScope)) // // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: // @@ -93,6 +93,15 @@ const ( // See and download all your Google Drive files DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly" + + // See, edit, create, and delete all your Google Forms forms + FormsBodyScope = "https://www.googleapis.com/auth/forms.body" + + // See all your Google Forms forms + FormsBodyReadonlyScope = "https://www.googleapis.com/auth/forms.body.readonly" + + // See all responses to your Google Forms forms + FormsResponsesReadonlyScope = "https://www.googleapis.com/auth/forms.responses.readonly" ) // NewService creates a new Service. @@ -101,6 +110,9 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/forms.body", + "https://www.googleapis.com/auth/forms.body.readonly", + "https://www.googleapis.com/auth/forms.responses.readonly", ) // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) @@ -2472,7 +2484,8 @@ func (c *FormsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateFor // }, // "scopes": [ // "https://www.googleapis.com/auth/drive", - // "https://www.googleapis.com/auth/drive.file" + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/forms.body" // ] // } @@ -2604,7 +2617,8 @@ func (c *FormsCreateCall) Do(opts ...googleapi.CallOption) (*Form, error) { // }, // "scopes": [ // "https://www.googleapis.com/auth/drive", - // "https://www.googleapis.com/auth/drive.file" + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/forms.body" // ] // } @@ -2751,7 +2765,9 @@ func (c *FormsGetCall) Do(opts ...googleapi.CallOption) (*Form, error) { // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file", - // "https://www.googleapis.com/auth/drive.readonly" + // "https://www.googleapis.com/auth/drive.readonly", + // "https://www.googleapis.com/auth/forms.body", + // "https://www.googleapis.com/auth/forms.body.readonly" // ] // } @@ -2908,7 +2924,8 @@ func (c *FormsResponsesGetCall) Do(opts ...googleapi.CallOption) (*FormResponse, // }, // "scopes": [ // "https://www.googleapis.com/auth/drive", - // "https://www.googleapis.com/auth/drive.file" + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/forms.responses.readonly" // ] // } @@ -3100,7 +3117,8 @@ func (c *FormsResponsesListCall) Do(opts ...googleapi.CallOption) (*ListFormResp // }, // "scopes": [ // "https://www.googleapis.com/auth/drive", - // "https://www.googleapis.com/auth/drive.file" + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/forms.responses.readonly" // ] // } @@ -3267,7 +3285,10 @@ func (c *FormsWatchesCreateCall) Do(opts ...googleapi.CallOption) (*Watch, error // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file", - // "https://www.googleapis.com/auth/drive.readonly" + // "https://www.googleapis.com/auth/drive.readonly", + // "https://www.googleapis.com/auth/forms.body", + // "https://www.googleapis.com/auth/forms.body.readonly", + // "https://www.googleapis.com/auth/forms.responses.readonly" // ] // } @@ -3411,7 +3432,10 @@ func (c *FormsWatchesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file", - // "https://www.googleapis.com/auth/drive.readonly" + // "https://www.googleapis.com/auth/drive.readonly", + // "https://www.googleapis.com/auth/forms.body", + // "https://www.googleapis.com/auth/forms.body.readonly", + // "https://www.googleapis.com/auth/forms.responses.readonly" // ] // } @@ -3560,7 +3584,10 @@ func (c *FormsWatchesListCall) Do(opts ...googleapi.CallOption) (*ListWatchesRes // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file", - // "https://www.googleapis.com/auth/drive.readonly" + // "https://www.googleapis.com/auth/drive.readonly", + // "https://www.googleapis.com/auth/forms.body", + // "https://www.googleapis.com/auth/forms.body.readonly", + // "https://www.googleapis.com/auth/forms.responses.readonly" // ] // } @@ -3718,7 +3745,10 @@ func (c *FormsWatchesRenewCall) Do(opts ...googleapi.CallOption) (*Watch, error) // "scopes": [ // "https://www.googleapis.com/auth/drive", // "https://www.googleapis.com/auth/drive.file", - // "https://www.googleapis.com/auth/drive.readonly" + // "https://www.googleapis.com/auth/drive.readonly", + // "https://www.googleapis.com/auth/forms.body", + // "https://www.googleapis.com/auth/forms.body.readonly", + // "https://www.googleapis.com/auth/forms.responses.readonly" // ] // } diff --git a/iam/v1/iam-api.json b/iam/v1/iam-api.json index 2c210686fe3..862bcee7120 100644 --- a/iam/v1/iam-api.json +++ b/iam/v1/iam-api.json @@ -1921,7 +1921,7 @@ } } }, - "revision": "20220310", + "revision": "20220324", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AdminAuditData": { @@ -2149,7 +2149,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index e58ce48541c..f64240d12f5 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -902,8 +902,7 @@ type DisableServiceAccountRequest struct { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/lifesciences/v2beta/lifesciences-api.json b/lifesciences/v2beta/lifesciences-api.json index dbf7c5102fa..8301a8405dc 100644 --- a/lifesciences/v2beta/lifesciences-api.json +++ b/lifesciences/v2beta/lifesciences-api.json @@ -312,7 +312,7 @@ } } }, - "revision": "20210813", + "revision": "20220325", "rootUrl": "https://lifesciences.googleapis.com/", "schemas": { "Accelerator": { @@ -541,7 +541,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" diff --git a/lifesciences/v2beta/lifesciences-gen.go b/lifesciences/v2beta/lifesciences-gen.go index 4f75fd45856..68503b88e05 100644 --- a/lifesciences/v2beta/lifesciences-gen.go +++ b/lifesciences/v2beta/lifesciences-gen.go @@ -602,8 +602,7 @@ func (s *Disk) MarshalJSON() ([]byte, error) { // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/monitoring/v1/monitoring-api.json b/monitoring/v1/monitoring-api.json index 17f596b33c1..e148c807f4f 100644 --- a/monitoring/v1/monitoring-api.json +++ b/monitoring/v1/monitoring-api.json @@ -679,7 +679,7 @@ } } }, - "revision": "20220322", + "revision": "20220327", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -894,6 +894,13 @@ "$ref": "ColumnLayout", "description": "The content is divided into equally spaced columns and the widgets are arranged vertically." }, + "dashboardFilters": { + "description": "Filters to reduce the amount of data charted based on the filter criteria.", + "items": { + "$ref": "DashboardFilter" + }, + "type": "array" + }, "displayName": { "description": "Required. The mutable, human-readable name.", "type": "string" @@ -928,6 +935,45 @@ }, "type": "object" }, + "DashboardFilter": { + "description": "A filter to reduce the amount of data charted in relevant widgets.", + "id": "DashboardFilter", + "properties": { + "filterType": { + "description": "The specified filter type", + "enum": [ + "FILTER_TYPE_UNSPECIFIED", + "RESOURCE_LABEL", + "METRIC_LABEL", + "USER_METADATA_LABEL", + "SYSTEM_METADATA_LABEL", + "GROUP" + ], + "enumDescriptions": [ + "Filter type is unspecified. This is not valid in a well-formed request.", + "Filter on a resource label value", + "Filter on a metrics label value", + "Filter on a user metadata label value", + "Filter on a system metadata label value", + "Filter on a group id" + ], + "type": "string" + }, + "labelKey": { + "description": "Required. The key for the label", + "type": "string" + }, + "stringValue": { + "description": "A variable-length string value.", + "type": "string" + }, + "templateVariable": { + "description": "The placeholder text that can be referenced in a filter string or MQL query. If omitted, the dashboard filter will be applied to all relevant widgets in the dashboard.", + "type": "string" + } + }, + "type": "object" + }, "DataSet": { "description": "Groups a time series query definition with charting options.", "id": "DataSet", diff --git a/monitoring/v1/monitoring-gen.go b/monitoring/v1/monitoring-gen.go index 9b6960ab3d3..82fde520751 100644 --- a/monitoring/v1/monitoring-gen.go +++ b/monitoring/v1/monitoring-gen.go @@ -785,6 +785,10 @@ type Dashboard struct { // the widgets are arranged vertically. ColumnLayout *ColumnLayout `json:"columnLayout,omitempty"` + // DashboardFilters: Filters to reduce the amount of data charted based + // on the filter criteria. + DashboardFilters []*DashboardFilter `json:"dashboardFilters,omitempty"` + // DisplayName: Required. The mutable, human-readable name. DisplayName string `json:"displayName,omitempty"` @@ -842,6 +846,55 @@ func (s *Dashboard) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DashboardFilter: A filter to reduce the amount of data charted in +// relevant widgets. +type DashboardFilter struct { + // FilterType: The specified filter type + // + // Possible values: + // "FILTER_TYPE_UNSPECIFIED" - Filter type is unspecified. This is not + // valid in a well-formed request. + // "RESOURCE_LABEL" - Filter on a resource label value + // "METRIC_LABEL" - Filter on a metrics label value + // "USER_METADATA_LABEL" - Filter on a user metadata label value + // "SYSTEM_METADATA_LABEL" - Filter on a system metadata label value + // "GROUP" - Filter on a group id + FilterType string `json:"filterType,omitempty"` + + // LabelKey: Required. The key for the label + LabelKey string `json:"labelKey,omitempty"` + + // StringValue: A variable-length string value. + StringValue string `json:"stringValue,omitempty"` + + // TemplateVariable: The placeholder text that can be referenced in a + // filter string or MQL query. If omitted, the dashboard filter will be + // applied to all relevant widgets in the dashboard. + TemplateVariable string `json:"templateVariable,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FilterType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FilterType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DashboardFilter) MarshalJSON() ([]byte, error) { + type NoMethod DashboardFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DataSet: Groups a time series query definition with charting options. type DataSet struct { // LegendTemplate: A template string for naming TimeSeries in the diff --git a/recommender/v1/recommender-api.json b/recommender/v1/recommender-api.json index 7bdb8b781f5..690ea31830d 100644 --- a/recommender/v1/recommender-api.json +++ b/recommender/v1/recommender-api.json @@ -646,72 +646,6 @@ "locations": { "resources": { "insightTypes": { - "methods": { - "getConfig": { - "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", - "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", - "httpMethod": "GET", - "id": "recommender.organizations.locations.insightTypes.getConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", - "location": "path", - "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "updateConfig": { - "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", - "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", - "httpMethod": "PATCH", - "id": "recommender.organizations.locations.insightTypes.updateConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", - "location": "path", - "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The list of fields to be updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, validate the request and preview the change, but do not actually update it.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - }, - "response": { - "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "insights": { "methods": { @@ -814,72 +748,6 @@ } }, "recommenders": { - "methods": { - "getConfig": { - "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", - "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", - "httpMethod": "GET", - "id": "recommender.organizations.locations.recommenders.getConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", - "location": "path", - "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "updateConfig": { - "description": "Updates a Recommender Config. This will create a new revision of the config.", - "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", - "httpMethod": "PATCH", - "id": "recommender.organizations.locations.recommenders.updateConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", - "location": "path", - "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The list of fields to be updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, validate the request and preview the change, but do not actually update it.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - }, - "response": { - "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "recommendations": { "methods": { @@ -1046,72 +914,6 @@ "locations": { "resources": { "insightTypes": { - "methods": { - "getConfig": { - "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", - "httpMethod": "GET", - "id": "recommender.projects.locations.insightTypes.getConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "updateConfig": { - "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", - "httpMethod": "PATCH", - "id": "recommender.projects.locations.insightTypes.updateConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The list of fields to be updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, validate the request and preview the change, but do not actually update it.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - }, - "response": { - "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "insights": { "methods": { @@ -1214,72 +1016,6 @@ } }, "recommenders": { - "methods": { - "getConfig": { - "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", - "httpMethod": "GET", - "id": "recommender.projects.locations.recommenders.getConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "updateConfig": { - "description": "Updates a Recommender Config. This will create a new revision of the config.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", - "httpMethod": "PATCH", - "id": "recommender.projects.locations.recommenders.updateConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The list of fields to be updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, validate the request and preview the change, but do not actually update it.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - }, - "response": { - "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "recommendations": { "methods": { @@ -1442,7 +1178,7 @@ } } }, - "revision": "20220321", + "revision": "20220327", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1CostProjection": { @@ -1630,61 +1366,6 @@ }, "type": "object" }, - "GoogleCloudRecommenderV1InsightTypeConfig": { - "description": "Configuration for an InsightType.", - "id": "GoogleCloudRecommenderV1InsightTypeConfig", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", - "type": "object" - }, - "displayName": { - "description": "A user-settable field to provide a human-readable name to be used in user interfaces.", - "type": "string" - }, - "etag": { - "description": "Fingerprint of the InsightTypeConfig. Provides optimistic locking when updating.", - "type": "string" - }, - "insightTypeGenerationConfig": { - "$ref": "GoogleCloudRecommenderV1InsightTypeGenerationConfig", - "description": "InsightTypeGenerationConfig which configures the generation of insights for this insight type." - }, - "name": { - "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", - "type": "string" - }, - "revisionId": { - "description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Last time when the config was updated.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRecommenderV1InsightTypeGenerationConfig": { - "description": "A configuration to customize the generation of insights. Eg, customizing the lookback period considered when generating a insight.", - "id": "GoogleCloudRecommenderV1InsightTypeGenerationConfig", - "properties": { - "params": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Parameters for this InsightTypeGenerationConfig. These configs can be used by or are applied to all subtypes.", - "type": "object" - } - }, - "type": "object" - }, "GoogleCloudRecommenderV1ListInsightsResponse": { "description": "Response to the `ListInsights` method.", "id": "GoogleCloudRecommenderV1ListInsightsResponse", @@ -2003,61 +1684,6 @@ }, "type": "object" }, - "GoogleCloudRecommenderV1RecommenderConfig": { - "description": "Configuration for a Recommender.", - "id": "GoogleCloudRecommenderV1RecommenderConfig", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", - "type": "object" - }, - "displayName": { - "description": "A user-settable field to provide a human-readable name to be used in user interfaces.", - "type": "string" - }, - "etag": { - "description": "Fingerprint of the RecommenderConfig. Provides optimistic locking when updating.", - "type": "string" - }, - "name": { - "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", - "type": "string" - }, - "recommenderGenerationConfig": { - "$ref": "GoogleCloudRecommenderV1RecommenderGenerationConfig", - "description": "RecommenderGenerationConfig which configures the Generation of recommendations for this recommender." - }, - "revisionId": { - "description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Last time when the config was updated.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRecommenderV1RecommenderGenerationConfig": { - "description": "A Configuration to customize the generation of recommendations. Eg, customizing the lookback period considered when generating a recommendation.", - "id": "GoogleCloudRecommenderV1RecommenderGenerationConfig", - "properties": { - "params": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Parameters for this RecommenderGenerationConfig. These configs can be used by or are applied to all subtypes.", - "type": "object" - } - }, - "type": "object" - }, "GoogleCloudRecommenderV1SecurityProjection": { "description": "Contains various ways of describing the impact on Security.", "id": "GoogleCloudRecommenderV1SecurityProjection", diff --git a/recommender/v1/recommender-gen.go b/recommender/v1/recommender-gen.go index e8fc30310d7..0e0dc282a21 100644 --- a/recommender/v1/recommender-gen.go +++ b/recommender/v1/recommender-gen.go @@ -674,101 +674,6 @@ func (s *GoogleCloudRecommenderV1InsightStateInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudRecommenderV1InsightTypeConfig: Configuration for an -// InsightType. -type GoogleCloudRecommenderV1InsightTypeConfig struct { - // Annotations: Allows clients to store small amounts of arbitrary data. - // Annotations must follow the Kubernetes syntax. The total size of all - // keys and values combined is limited to 256k. Key can have 2 segments: - // prefix (optional) and name (required), separated by a slash (/). - // Prefix must be a DNS subdomain. Name must be 63 characters or less, - // begin and end with alphanumerics, with dashes (-), underscores (_), - // dots (.), and alphanumerics between. - Annotations map[string]string `json:"annotations,omitempty"` - - // DisplayName: A user-settable field to provide a human-readable name - // to be used in user interfaces. - DisplayName string `json:"displayName,omitempty"` - - // Etag: Fingerprint of the InsightTypeConfig. Provides optimistic - // locking when updating. - Etag string `json:"etag,omitempty"` - - // InsightTypeGenerationConfig: InsightTypeGenerationConfig which - // configures the generation of insights for this insight type. - InsightTypeGenerationConfig *GoogleCloudRecommenderV1InsightTypeGenerationConfig `json:"insightTypeGenerationConfig,omitempty"` - - // Name: Name of insight type config. Eg, - // projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_T - // YPE_ID]/config - Name string `json:"name,omitempty"` - - // RevisionId: Output only. Immutable. The revision ID of the config. A - // new revision is committed whenever the config is changed in any way. - // The format is an 8-character hexadecimal string. - RevisionId string `json:"revisionId,omitempty"` - - // UpdateTime: Last time when the config was updated. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "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 - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // 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:"-"` -} - -func (s *GoogleCloudRecommenderV1InsightTypeConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRecommenderV1InsightTypeConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudRecommenderV1InsightTypeGenerationConfig: A configuration -// to customize the generation of insights. Eg, customizing the lookback -// period considered when generating a insight. -type GoogleCloudRecommenderV1InsightTypeGenerationConfig struct { - // Params: Parameters for this InsightTypeGenerationConfig. These - // configs can be used by or are applied to all subtypes. - Params googleapi.RawMessage `json:"params,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Params") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Params") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudRecommenderV1InsightTypeGenerationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRecommenderV1InsightTypeGenerationConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudRecommenderV1ListInsightsResponse: Response to the // `ListInsights` method. type GoogleCloudRecommenderV1ListInsightsResponse struct { @@ -1321,101 +1226,6 @@ func (s *GoogleCloudRecommenderV1RecommendationStateInfo) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudRecommenderV1RecommenderConfig: Configuration for a -// Recommender. -type GoogleCloudRecommenderV1RecommenderConfig struct { - // Annotations: Allows clients to store small amounts of arbitrary data. - // Annotations must follow the Kubernetes syntax. The total size of all - // keys and values combined is limited to 256k. Key can have 2 segments: - // prefix (optional) and name (required), separated by a slash (/). - // Prefix must be a DNS subdomain. Name must be 63 characters or less, - // begin and end with alphanumerics, with dashes (-), underscores (_), - // dots (.), and alphanumerics between. - Annotations map[string]string `json:"annotations,omitempty"` - - // DisplayName: A user-settable field to provide a human-readable name - // to be used in user interfaces. - DisplayName string `json:"displayName,omitempty"` - - // Etag: Fingerprint of the RecommenderConfig. Provides optimistic - // locking when updating. - Etag string `json:"etag,omitempty"` - - // Name: Name of recommender config. Eg, - // projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMEND - // ER_ID]/config - Name string `json:"name,omitempty"` - - // RecommenderGenerationConfig: RecommenderGenerationConfig which - // configures the Generation of recommendations for this recommender. - RecommenderGenerationConfig *GoogleCloudRecommenderV1RecommenderGenerationConfig `json:"recommenderGenerationConfig,omitempty"` - - // RevisionId: Output only. Immutable. The revision ID of the config. A - // new revision is committed whenever the config is changed in any way. - // The format is an 8-character hexadecimal string. - RevisionId string `json:"revisionId,omitempty"` - - // UpdateTime: Last time when the config was updated. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "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 - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // 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:"-"` -} - -func (s *GoogleCloudRecommenderV1RecommenderConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRecommenderV1RecommenderConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudRecommenderV1RecommenderGenerationConfig: A Configuration -// to customize the generation of recommendations. Eg, customizing the -// lookback period considered when generating a recommendation. -type GoogleCloudRecommenderV1RecommenderGenerationConfig struct { - // Params: Parameters for this RecommenderGenerationConfig. These - // configs can be used by or are applied to all subtypes. - Params googleapi.RawMessage `json:"params,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Params") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Params") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudRecommenderV1RecommenderGenerationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudRecommenderV1RecommenderGenerationConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudRecommenderV1SecurityProjection: Contains various ways of // describing the impact on Security. type GoogleCloudRecommenderV1SecurityProjection struct { @@ -4234,9 +4044,9 @@ func (c *FoldersLocationsRecommendersRecommendationsMarkSucceededCall) Do(opts . } -// method id "recommender.organizations.locations.insightTypes.getConfig": +// method id "recommender.organizations.locations.insightTypes.insights.get": -type OrganizationsLocationsInsightTypesGetConfigCall struct { +type OrganizationsLocationsInsightTypesInsightsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4245,18 +4055,12 @@ type OrganizationsLocationsInsightTypesGetConfigCall struct { header_ http.Header } -// GetConfig: Gets the requested InsightTypeConfig. There is only one -// instance of the config for each InsightType. +// Get: Gets the requested insight. Requires the recommender.*.get IAM +// permission for the specified insight type. // -// - name: Name of the InsightTypeConfig to get. Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY -// PE_ID]/config` * -// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I -// D]/config` * -// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI -// GHT_TYPE_ID]/config`. -func (r *OrganizationsLocationsInsightTypesService) GetConfig(name string) *OrganizationsLocationsInsightTypesGetConfigCall { - c := &OrganizationsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the insight. +func (r *OrganizationsLocationsInsightTypesInsightsService) Get(name string) *OrganizationsLocationsInsightTypesInsightsGetCall { + c := &OrganizationsLocationsInsightTypesInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4264,7 +4068,7 @@ func (r *OrganizationsLocationsInsightTypesService) GetConfig(name string) *Orga // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesGetConfigCall { +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4274,7 +4078,7 @@ func (c *OrganizationsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi. // 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 *OrganizationsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesGetConfigCall { +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -4282,21 +4086,21 @@ func (c *OrganizationsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsInsightTypesGetConfigCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesGetConfigCall { +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsInsightTypesGetConfigCall) Header() http.Header { +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInsightTypesGetConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4322,16 +4126,14 @@ func (c *OrganizationsLocationsInsightTypesGetConfigCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.organizations.locations.insightTypes.getConfig" call. -// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { +// Do executes the "recommender.organizations.locations.insightTypes.insights.get" call. +// Exactly one of *GoogleCloudRecommenderV1Insight or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4350,7 +4152,7 @@ func (c *OrganizationsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1InsightTypeConfig{ + ret := &GoogleCloudRecommenderV1Insight{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4362,25 +4164,25 @@ func (c *OrganizationsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", // "httpMethod": "GET", - // "id": "recommender.organizations.locations.insightTypes.getConfig", + // "id": "recommender.organizations.locations.insightTypes.insights.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + // "description": "Required. Name of the insight.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // "$ref": "GoogleCloudRecommenderV1Insight" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4389,108 +4191,144 @@ func (c *OrganizationsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.C } -// method id "recommender.organizations.locations.insightTypes.updateConfig": +// method id "recommender.organizations.locations.insightTypes.insights.list": -type OrganizationsLocationsInsightTypesUpdateConfigCall struct { - s *Service - name string - googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsInsightTypesInsightsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateConfig: Updates an InsightTypeConfig change. This will create a -// new revision of the config. +// List: Lists insights for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified insight type. // -// - name: Name of insight type config. Eg, -// projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT -// _TYPE_ID]/config. -func (r *OrganizationsLocationsInsightTypesService) UpdateConfig(name string, googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig) *OrganizationsLocationsInsightTypesUpdateConfigCall { - c := &OrganizationsLocationsInsightTypesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudrecommenderv1insighttypeconfig = googlecloudrecommenderv1insighttypeconfig +// - parent: The container resource on which to execute the request. +// Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY +// PE_ID]` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]` * +// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE +// _ID]` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: +// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to +// supported insight types: +// https://cloud.google.com/recommender/docs/insights/insight-types. +func (r *OrganizationsLocationsInsightTypesInsightsService) List(parent string) *OrganizationsLocationsInsightTypesInsightsListCall { + c := &OrganizationsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter expression to +// restrict the insights returned. Supported filter fields: * +// `stateInfo.state` * `insightSubtype` * `severity` Examples: * +// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * +// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR +// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL +// OR severity = HIGH)` (These expressions are based on the filter +// language described at https://google.aip.dev/160) +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Filter(filter string) *OrganizationsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("filter", filter) return c } -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to be updated. -func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) UpdateMask(updateMask string) *OrganizationsLocationsInsightTypesUpdateConfigCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return from this request. Non-positive values are +// ignored. If not specified, the server will determine the number of +// results to return. +func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *OrganizationsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ValidateOnly sets the optional parameter "validateOnly": If true, -// validate the request and preview the change, but do not actually -// update it. -func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) ValidateOnly(validateOnly bool) *OrganizationsLocationsInsightTypesUpdateConfigCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// PageToken sets the optional parameter "pageToken": If present, +// retrieves the next batch of results from the preceding call to this +// method. `page_token` must be the value of `next_page_token` from the +// previous response. The values of other method parameters must be +// identical to those in the previous call. +func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesUpdateConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesUpdateConfigCall { +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsListCall { 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 *OrganizationsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesUpdateConfigCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesUpdateConfigCall { +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Header() http.Header { +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1insighttypeconfig) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/insights") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.organizations.locations.insightTypes.updateConfig" call. -// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// Do executes the "recommender.organizations.locations.insightTypes.insights.list" call. +// Exactly one of *GoogleCloudRecommenderV1ListInsightsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudRecommenderV1ListInsightsResponse.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1ListInsightsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4509,7 +4347,7 @@ func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1InsightTypeConfig{ + ret := &GoogleCloudRecommenderV1ListInsightsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4521,397 +4359,41 @@ func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleap } return ret, nil // { - // "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", - // "httpMethod": "PATCH", - // "id": "recommender.organizations.locations.insightTypes.updateConfig", + // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", + // "httpMethod": "GET", + // "id": "recommender.organizations.locations.insightTypes.insights.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", - // "required": true, + // "filter": { + // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", + // "location": "query", // "type": "string" // }, - // "updateMask": { - // "description": "The list of fields to be updated.", - // "format": "google-fieldmask", + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "validateOnly": { - // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "pageToken": { + // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", // "location": "query", - // "type": "boolean" + // "type": "string" + // }, + // "parent": { + // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - // }, + // "path": "v1/{+parent}/insights", // "response": { - // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "recommender.organizations.locations.insightTypes.insights.get": - -type OrganizationsLocationsInsightTypesInsightsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the requested insight. Requires the recommender.*.get IAM -// permission for the specified insight type. -// -// - name: Name of the insight. -func (r *OrganizationsLocationsInsightTypesInsightsService) Get(name string) *OrganizationsLocationsInsightTypesInsightsGetCall { - c := &OrganizationsLocationsInsightTypesInsightsGetCall{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 *OrganizationsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsGetCall { - 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 *OrganizationsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsGetCall { - 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "recommender.organizations.locations.insightTypes.insights.get" call. -// Exactly one of *GoogleCloudRecommenderV1Insight or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudRecommenderV1Insight{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", - // "httpMethod": "GET", - // "id": "recommender.organizations.locations.insightTypes.insights.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the insight.", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudRecommenderV1Insight" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "recommender.organizations.locations.insightTypes.insights.list": - -type OrganizationsLocationsInsightTypesInsightsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists insights for the specified Cloud Resource. Requires the -// recommender.*.list IAM permission for the specified insight type. -// -// - parent: The container resource on which to execute the request. -// Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH -// T_TYPE_ID]` * -// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY -// PE_ID]` * -// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy -// pes/[INSIGHT_TYPE_ID]` * -// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE -// _ID]` * -// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ -// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: -// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to -// supported insight types: -// https://cloud.google.com/recommender/docs/insights/insight-types. -func (r *OrganizationsLocationsInsightTypesInsightsService) List(parent string) *OrganizationsLocationsInsightTypesInsightsListCall { - c := &OrganizationsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter expression to -// restrict the insights returned. Supported filter fields: * -// `stateInfo.state` * `insightSubtype` * `severity` Examples: * -// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * -// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR -// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL -// OR severity = HIGH)` (These expressions are based on the filter -// language described at https://google.aip.dev/160) -func (c *OrganizationsLocationsInsightTypesInsightsListCall) Filter(filter string) *OrganizationsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return from this request. Non-positive values are -// ignored. If not specified, the server will determine the number of -// results to return. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *OrganizationsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, -// retrieves the next batch of results from the preceding call to this -// method. `page_token` must be the value of `next_page_token` from the -// previous response. The values of other method parameters must be -// identical to those in the previous call. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *OrganizationsLocationsInsightTypesInsightsListCall { - 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 *OrganizationsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsListCall { - 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 *OrganizationsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsListCall { - 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 *OrganizationsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/insights") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "recommender.organizations.locations.insightTypes.insights.list" call. -// Exactly one of *GoogleCloudRecommenderV1ListInsightsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRecommenderV1ListInsightsResponse.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1ListInsightsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudRecommenderV1ListInsightsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", - // "httpMethod": "GET", - // "id": "recommender.organizations.locations.insightTypes.insights.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/insights", - // "response": { - // "$ref": "GoogleCloudRecommenderV1ListInsightsResponse" + // "$ref": "GoogleCloudRecommenderV1ListInsightsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5074,341 +4556,12 @@ func (c *OrganizationsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ... // "type": "string" // } // }, - // "path": "v1/{+name}:markAccepted", - // "request": { - // "$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" - // }, - // "response": { - // "$ref": "GoogleCloudRecommenderV1Insight" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "recommender.organizations.locations.recommenders.getConfig": - -type OrganizationsLocationsRecommendersGetConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetConfig: Gets the requested Recommender Config. There is only one -// instance of the config for each Recommender. -// -// - name: Name of the Recommendation Config to get. Acceptable formats: -// * -// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMM -// ENDER_ID]/config` * -// `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE -// R_ID]/config` * -// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ -// RECOMMENDER_ID]/config`. -func (r *OrganizationsLocationsRecommendersService) GetConfig(name string) *OrganizationsLocationsRecommendersGetConfigCall { - c := &OrganizationsLocationsRecommendersGetConfigCall{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 *OrganizationsLocationsRecommendersGetConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecommendersGetConfigCall { - 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 *OrganizationsLocationsRecommendersGetConfigCall) IfNoneMatch(entityTag string) *OrganizationsLocationsRecommendersGetConfigCall { - 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 *OrganizationsLocationsRecommendersGetConfigCall) Context(ctx context.Context) *OrganizationsLocationsRecommendersGetConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *OrganizationsLocationsRecommendersGetConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsLocationsRecommendersGetConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "recommender.organizations.locations.recommenders.getConfig" call. -// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudRecommenderV1RecommenderConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", - // "httpMethod": "GET", - // "id": "recommender.organizations.locations.recommenders.getConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "recommender.organizations.locations.recommenders.updateConfig": - -type OrganizationsLocationsRecommendersUpdateConfigCall struct { - s *Service - name string - googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateConfig: Updates a Recommender Config. This will create a new -// revision of the config. -// -// - name: Name of recommender config. Eg, -// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMME -// NDER_ID]/config. -func (r *OrganizationsLocationsRecommendersService) UpdateConfig(name string, googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig) *OrganizationsLocationsRecommendersUpdateConfigCall { - c := &OrganizationsLocationsRecommendersUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudrecommenderv1recommenderconfig = googlecloudrecommenderv1recommenderconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to be updated. -func (c *OrganizationsLocationsRecommendersUpdateConfigCall) UpdateMask(updateMask string) *OrganizationsLocationsRecommendersUpdateConfigCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, -// validate the request and preview the change, but do not actually -// update it. -func (c *OrganizationsLocationsRecommendersUpdateConfigCall) ValidateOnly(validateOnly bool) *OrganizationsLocationsRecommendersUpdateConfigCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *OrganizationsLocationsRecommendersUpdateConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecommendersUpdateConfigCall { - 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 *OrganizationsLocationsRecommendersUpdateConfigCall) Context(ctx context.Context) *OrganizationsLocationsRecommendersUpdateConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *OrganizationsLocationsRecommendersUpdateConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsLocationsRecommendersUpdateConfigCall) doRequest(alt string) (*http.Response, 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.googlecloudrecommenderv1recommenderconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "recommender.organizations.locations.recommenders.updateConfig" call. -// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsRecommendersUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudRecommenderV1RecommenderConfig{ - ServerResponse: 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 Recommender Config. This will create a new revision of the config.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", - // "httpMethod": "PATCH", - // "id": "recommender.organizations.locations.recommenders.updateConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "The list of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "If true, validate the request and preview the change, but do not actually update it.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:markAccepted", // "request": { - // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // "$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // "$ref": "GoogleCloudRecommenderV1Insight" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6234,340 +5387,12 @@ func (c *OrganizationsLocationsRecommendersRecommendationsMarkSucceededCall) Do( // "type": "string" // } // }, - // "path": "v1/{+name}:markSucceeded", - // "request": { - // "$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" - // }, - // "response": { - // "$ref": "GoogleCloudRecommenderV1Recommendation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "recommender.projects.locations.insightTypes.getConfig": - -type ProjectsLocationsInsightTypesGetConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetConfig: Gets the requested InsightTypeConfig. There is only one -// instance of the config for each InsightType. -// -// - name: Name of the InsightTypeConfig to get. Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY -// PE_ID]/config` * -// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I -// D]/config` * -// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI -// GHT_TYPE_ID]/config`. -func (r *ProjectsLocationsInsightTypesService) GetConfig(name string) *ProjectsLocationsInsightTypesGetConfigCall { - c := &ProjectsLocationsInsightTypesGetConfigCall{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 *ProjectsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightTypesGetConfigCall { - 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 *ProjectsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightTypesGetConfigCall { - 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 *ProjectsLocationsInsightTypesGetConfigCall) Context(ctx context.Context) *ProjectsLocationsInsightTypesGetConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsInsightTypesGetConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsInsightTypesGetConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "recommender.projects.locations.insightTypes.getConfig" call. -// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudRecommenderV1InsightTypeConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", - // "httpMethod": "GET", - // "id": "recommender.projects.locations.insightTypes.getConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "recommender.projects.locations.insightTypes.updateConfig": - -type ProjectsLocationsInsightTypesUpdateConfigCall struct { - s *Service - name string - googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateConfig: Updates an InsightTypeConfig change. This will create a -// new revision of the config. -// -// - name: Name of insight type config. Eg, -// projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT -// _TYPE_ID]/config. -func (r *ProjectsLocationsInsightTypesService) UpdateConfig(name string, googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig) *ProjectsLocationsInsightTypesUpdateConfigCall { - c := &ProjectsLocationsInsightTypesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudrecommenderv1insighttypeconfig = googlecloudrecommenderv1insighttypeconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to be updated. -func (c *ProjectsLocationsInsightTypesUpdateConfigCall) UpdateMask(updateMask string) *ProjectsLocationsInsightTypesUpdateConfigCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, -// validate the request and preview the change, but do not actually -// update it. -func (c *ProjectsLocationsInsightTypesUpdateConfigCall) ValidateOnly(validateOnly bool) *ProjectsLocationsInsightTypesUpdateConfigCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsInsightTypesUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightTypesUpdateConfigCall { - 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 *ProjectsLocationsInsightTypesUpdateConfigCall) Context(ctx context.Context) *ProjectsLocationsInsightTypesUpdateConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsInsightTypesUpdateConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsInsightTypesUpdateConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1insighttypeconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "recommender.projects.locations.insightTypes.updateConfig" call. -// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudRecommenderV1InsightTypeConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", - // "httpMethod": "PATCH", - // "id": "recommender.projects.locations.insightTypes.updateConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "The list of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "If true, validate the request and preview the change, but do not actually update it.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:markSucceeded", // "request": { - // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // "$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // "$ref": "GoogleCloudRecommenderV1Recommendation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7102,335 +5927,6 @@ func (c *ProjectsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ...googl } -// method id "recommender.projects.locations.recommenders.getConfig": - -type ProjectsLocationsRecommendersGetConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetConfig: Gets the requested Recommender Config. There is only one -// instance of the config for each Recommender. -// -// - name: Name of the Recommendation Config to get. Acceptable formats: -// * -// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMM -// ENDER_ID]/config` * -// `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE -// R_ID]/config` * -// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ -// RECOMMENDER_ID]/config`. -func (r *ProjectsLocationsRecommendersService) GetConfig(name string) *ProjectsLocationsRecommendersGetConfigCall { - c := &ProjectsLocationsRecommendersGetConfigCall{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 *ProjectsLocationsRecommendersGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRecommendersGetConfigCall { - 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 *ProjectsLocationsRecommendersGetConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsRecommendersGetConfigCall { - 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 *ProjectsLocationsRecommendersGetConfigCall) Context(ctx context.Context) *ProjectsLocationsRecommendersGetConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRecommendersGetConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRecommendersGetConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "recommender.projects.locations.recommenders.getConfig" call. -// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudRecommenderV1RecommenderConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", - // "httpMethod": "GET", - // "id": "recommender.projects.locations.recommenders.getConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "recommender.projects.locations.recommenders.updateConfig": - -type ProjectsLocationsRecommendersUpdateConfigCall struct { - s *Service - name string - googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateConfig: Updates a Recommender Config. This will create a new -// revision of the config. -// -// - name: Name of recommender config. Eg, -// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMME -// NDER_ID]/config. -func (r *ProjectsLocationsRecommendersService) UpdateConfig(name string, googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig) *ProjectsLocationsRecommendersUpdateConfigCall { - c := &ProjectsLocationsRecommendersUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudrecommenderv1recommenderconfig = googlecloudrecommenderv1recommenderconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to be updated. -func (c *ProjectsLocationsRecommendersUpdateConfigCall) UpdateMask(updateMask string) *ProjectsLocationsRecommendersUpdateConfigCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, -// validate the request and preview the change, but do not actually -// update it. -func (c *ProjectsLocationsRecommendersUpdateConfigCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRecommendersUpdateConfigCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRecommendersUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRecommendersUpdateConfigCall { - 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 *ProjectsLocationsRecommendersUpdateConfigCall) Context(ctx context.Context) *ProjectsLocationsRecommendersUpdateConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRecommendersUpdateConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRecommendersUpdateConfigCall) doRequest(alt string) (*http.Response, 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.googlecloudrecommenderv1recommenderconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "recommender.projects.locations.recommenders.updateConfig" call. -// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsRecommendersUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudRecommenderV1RecommenderConfig{ - ServerResponse: 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 Recommender Config. This will create a new revision of the config.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", - // "httpMethod": "PATCH", - // "id": "recommender.projects.locations.recommenders.updateConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "The list of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "If true, validate the request and preview the change, but do not actually update it.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - // }, - // "response": { - // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "recommender.projects.locations.recommenders.recommendations.get": type ProjectsLocationsRecommendersRecommendationsGetCall struct {