diff --git a/admob/v1/admob-api.json b/admob/v1/admob-api.json index bb6a1183f49..43b67bea2b9 100644 --- a/admob/v1/admob-api.json +++ b/admob/v1/admob-api.json @@ -253,7 +253,7 @@ "mediationReport": { "methods": { "generate": { - "description": "Generates an AdMob Mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", + "description": "Generates an AdMob mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", "flatPath": "v1/accounts/{accountsId}/mediationReport:generate", "httpMethod": "POST", "id": "admob.accounts.mediationReport.generate", @@ -321,7 +321,7 @@ } } }, - "revision": "20221024", + "revision": "20221026", "rootUrl": "https://admob.googleapis.com/", "schemas": { "AdUnit": { @@ -450,7 +450,7 @@ "type": "object" }, "GenerateMediationReportRequest": { - "description": "Request to generate an AdMob Mediation report.", + "description": "Request to generate an AdMob mediation report.", "id": "GenerateMediationReportRequest", "properties": { "reportSpec": { @@ -461,7 +461,7 @@ "type": "object" }, "GenerateMediationReportResponse": { - "description": "The streaming response for the AdMob Mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ \"header\": { \"date_range\": { \"start_date\": {\"year\": 2018, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2018, \"month\": 9, \"day\": 1} }, \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } }, { \"row\": { \"dimension_values\": { \"DATE\": {\"value\": \"20180918\"}, \"APP\": { \"value\": \"ca-app-pub-8123415297019784~1001342552\", \"display_label\": \"My app name!\" } }, \"metric_values\": { \"ESTIMATED_EARNINGS\": {\"decimal_value\": \"1324746\"} } } }, { \"footer\": {\"matching_row_count\": 1} }]", + "description": "The streaming response for the AdMob mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ \"header\": { \"date_range\": { \"start_date\": {\"year\": 2018, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2018, \"month\": 9, \"day\": 1} }, \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } }, { \"row\": { \"dimension_values\": { \"DATE\": {\"value\": \"20180918\"}, \"APP\": { \"value\": \"ca-app-pub-8123415297019784~1001342552\", \"display_label\": \"My app name!\" } }, \"metric_values\": { \"ESTIMATED_EARNINGS\": {\"decimal_value\": \"1324746\"} } } }, { \"footer\": {\"matching_row_count\": 1} }]", "id": "GenerateMediationReportResponse", "properties": { "footer": { diff --git a/admob/v1/admob-gen.go b/admob/v1/admob-gen.go index da01159edf5..eedae6d8ab3 100644 --- a/admob/v1/admob-gen.go +++ b/admob/v1/admob-gen.go @@ -469,7 +469,7 @@ func (s *DateRange) MarshalJSON() ([]byte, error) { } // GenerateMediationReportRequest: Request to generate an AdMob -// Mediation report. +// mediation report. type GenerateMediationReportRequest struct { // ReportSpec: Network report specification. ReportSpec *MediationReportSpec `json:"reportSpec,omitempty"` @@ -498,7 +498,7 @@ func (s *GenerateMediationReportRequest) MarshalJSON() ([]byte, error) { } // GenerateMediationReportResponse: The streaming response for the AdMob -// Mediation report where the first response contains the report header, +// mediation report where the first response contains the report header, // then a stream of row responses, and finally a footer as the last // response message. For example: [{ "header": { "date_range": { // "start_date": {"year": 2018, "month": 9, "day": 1}, "end_date": @@ -2528,7 +2528,7 @@ type AccountsMediationReportGenerateCall struct { header_ http.Header } -// Generate: Generates an AdMob Mediation report based on the provided +// Generate: Generates an AdMob mediation report based on the provided // report specification. Returns result of a server-side streaming RPC. // The result is returned in a sequence of responses. // @@ -2632,7 +2632,7 @@ func (c *AccountsMediationReportGenerateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Generates an AdMob Mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", + // "description": "Generates an AdMob mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", // "flatPath": "v1/accounts/{accountsId}/mediationReport:generate", // "httpMethod": "POST", // "id": "admob.accounts.mediationReport.generate", diff --git a/admob/v1beta/admob-api.json b/admob/v1beta/admob-api.json index e297c31c50e..24c337e4929 100644 --- a/admob/v1beta/admob-api.json +++ b/admob/v1beta/admob-api.json @@ -291,7 +291,7 @@ "mediationReport": { "methods": { "generate": { - "description": "Generates an AdMob Mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", + "description": "Generates an AdMob mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", "flatPath": "v1beta/accounts/{accountsId}/mediationReport:generate", "httpMethod": "POST", "id": "admob.accounts.mediationReport.generate", @@ -359,7 +359,7 @@ } } }, - "revision": "20221024", + "revision": "20221026", "rootUrl": "https://admob.googleapis.com/", "schemas": { "AdSource": { @@ -507,7 +507,7 @@ "type": "object" }, "GenerateMediationReportRequest": { - "description": "Request to generate an AdMob Mediation report.", + "description": "Request to generate an AdMob mediation report.", "id": "GenerateMediationReportRequest", "properties": { "reportSpec": { @@ -518,7 +518,7 @@ "type": "object" }, "GenerateMediationReportResponse": { - "description": "The streaming response for the AdMob Mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ \"header\": { \"date_range\": { \"start_date\": {\"year\": 2018, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2018, \"month\": 9, \"day\": 1} }, \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } }, { \"row\": { \"dimension_values\": { \"DATE\": {\"value\": \"20180918\"}, \"APP\": { \"value\": \"ca-app-pub-8123415297019784~1001342552\", \"display_label\": \"My app name!\" } }, \"metric_values\": { \"ESTIMATED_EARNINGS\": {\"decimal_value\": \"1324746\"} } } }, { \"footer\": {\"matching_row_count\": 1} }]", + "description": "The streaming response for the AdMob mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ \"header\": { \"date_range\": { \"start_date\": {\"year\": 2018, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2018, \"month\": 9, \"day\": 1} }, \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } }, { \"row\": { \"dimension_values\": { \"DATE\": {\"value\": \"20180918\"}, \"APP\": { \"value\": \"ca-app-pub-8123415297019784~1001342552\", \"display_label\": \"My app name!\" } }, \"metric_values\": { \"ESTIMATED_EARNINGS\": {\"decimal_value\": \"1324746\"} } } }, { \"footer\": {\"matching_row_count\": 1} }]", "id": "GenerateMediationReportResponse", "properties": { "footer": { diff --git a/admob/v1beta/admob-gen.go b/admob/v1beta/admob-gen.go index 3bd582e0d66..c26cdb38e42 100644 --- a/admob/v1beta/admob-gen.go +++ b/admob/v1beta/admob-gen.go @@ -516,7 +516,7 @@ func (s *DateRange) MarshalJSON() ([]byte, error) { } // GenerateMediationReportRequest: Request to generate an AdMob -// Mediation report. +// mediation report. type GenerateMediationReportRequest struct { // ReportSpec: Network report specification. ReportSpec *MediationReportSpec `json:"reportSpec,omitempty"` @@ -545,7 +545,7 @@ func (s *GenerateMediationReportRequest) MarshalJSON() ([]byte, error) { } // GenerateMediationReportResponse: The streaming response for the AdMob -// Mediation report where the first response contains the report header, +// mediation report where the first response contains the report header, // then a stream of row responses, and finally a footer as the last // response message. For example: [{ "header": { "date_range": { // "start_date": {"year": 2018, "month": 9, "day": 1}, "end_date": @@ -2806,7 +2806,7 @@ type AccountsMediationReportGenerateCall struct { header_ http.Header } -// Generate: Generates an AdMob Mediation report based on the provided +// Generate: Generates an AdMob mediation report based on the provided // report specification. Returns result of a server-side streaming RPC. // The result is returned in a sequence of responses. // @@ -2910,7 +2910,7 @@ func (c *AccountsMediationReportGenerateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Generates an AdMob Mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", + // "description": "Generates an AdMob mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", // "flatPath": "v1beta/accounts/{accountsId}/mediationReport:generate", // "httpMethod": "POST", // "id": "admob.accounts.mediationReport.generate", diff --git a/api-list.json b/api-list.json index 3a4b6339ca6..b6a302b0496 100644 --- a/api-list.json +++ b/api-list.json @@ -736,21 +736,6 @@ "documentationLink": "https://cloud.google.com/bigquery-transfer/", "preferred": true }, - { - "kind": "discovery#directoryItem", - "id": "bigqueryreservation:v1beta1", - "name": "bigqueryreservation", - "version": "v1beta1", - "title": "BigQuery Reservation API", - "description": "A service to modify your BigQuery flat-rate reservations.", - "discoveryRestUrl": "https://bigqueryreservation.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bigquery/", - "preferred": false - }, { "kind": "discovery#directoryItem", "id": "bigqueryreservation:v1", @@ -5480,6 +5465,21 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://cloud.google.com/tpu/", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "tpu:v2", + "name": "tpu", + "version": "v2", + "title": "Cloud TPU API", + "description": "TPU API provides customers with access to Google TPU technology.", + "discoveryRestUrl": "https://tpu.googleapis.com/$discovery/rest?version=v2", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/tpu/", "preferred": true }, { diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index b7627608df8..1e4be833279 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220824", + "revision": "20221020", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -653,8 +653,26 @@ "readOnly": true, "type": "string" }, + "buildpackStack": { + "description": "Specifies one of the Google provided buildpack stacks.", + "type": "string" + }, + "dockerRegistry": { + "description": "Optional. Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry. If `docker_repository` field is specified, this field will be automatically set as `ARTIFACT_REGISTRY`. If unspecified, it currently defaults to `CONTAINER_REGISTRY`. This field may be overridden by the backend for eligible deployments.", + "enum": [ + "DOCKER_REGISTRY_UNSPECIFIED", + "CONTAINER_REGISTRY", + "ARTIFACT_REGISTRY" + ], + "enumDescriptions": [ + "Unspecified.", + "Docker images will be stored in multi-regional Container Registry repositories named `gcf`.", + "Docker images will be stored in regional Artifact Registry repositories. By default, GCF will create and use repositories named `gcf-artifacts` in every region in which a function is deployed. But the repository to use can also be specified by the user using the `docker_repository` field." + ], + "type": "string" + }, "dockerRepository": { - "description": "Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", + "description": "User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", "type": "string" }, "entryPoint": { @@ -1798,6 +1816,20 @@ }, "type": "array" }, + "securityLevel": { + "description": "Optional. Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.", + "enum": [ + "SECURITY_LEVEL_UNSPECIFIED", + "SECURE_ALWAYS", + "SECURE_OPTIONAL" + ], + "enumDescriptions": [ + "Unspecified.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly." + ], + "type": "string" + }, "service": { "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", "readOnly": true, diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index a0584cf2404..0c39dce45c2 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -376,12 +376,35 @@ type BuildConfig struct { // deployment of the function. Build string `json:"build,omitempty"` - // DockerRepository: Optional. User managed repository created in - // Artifact Registry optionally with a customer managed encryption key. - // This is the repository to which the function docker image will be - // pushed after it is built by Cloud Build. If unspecified, GCF will - // create and use a repository named 'gcf-artifacts' for every deployed - // region. It must match the pattern + // BuildpackStack: Specifies one of the Google provided buildpack + // stacks. + BuildpackStack string `json:"buildpackStack,omitempty"` + + // DockerRegistry: Optional. Docker Registry to use for this deployment. + // This configuration is only applicable to 1st Gen functions, 2nd Gen + // functions can only use Artifact Registry. If `docker_repository` + // field is specified, this field will be automatically set as + // `ARTIFACT_REGISTRY`. If unspecified, it currently defaults to + // `CONTAINER_REGISTRY`. This field may be overridden by the backend for + // eligible deployments. + // + // Possible values: + // "DOCKER_REGISTRY_UNSPECIFIED" - Unspecified. + // "CONTAINER_REGISTRY" - Docker images will be stored in + // multi-regional Container Registry repositories named `gcf`. + // "ARTIFACT_REGISTRY" - Docker images will be stored in regional + // Artifact Registry repositories. By default, GCF will create and use + // repositories named `gcf-artifacts` in every region in which a + // function is deployed. But the repository to use can also be specified + // by the user using the `docker_repository` field. + DockerRegistry string `json:"dockerRegistry,omitempty"` + + // DockerRepository: User managed repository created in Artifact + // Registry optionally with a customer managed encryption key. This is + // the repository to which the function docker image will be pushed + // after it is built by Cloud Build. If unspecified, GCF will create and + // use a repository named 'gcf-artifacts' for every deployed region. It + // must match the pattern // `projects/{project}/locations/{location}/repositories/{repository}`. // Cross-project repositories are not supported. Cross-location // repositories are not supported. Repository format must be 'DOCKER'. @@ -1994,6 +2017,22 @@ type ServiceConfig struct { // SecretVolumes: Secret volumes configuration. SecretVolumes []*SecretVolume `json:"secretVolumes,omitempty"` + // SecurityLevel: Optional. Security level configure whether the + // function only accepts https. This configuration is only applicable to + // 1st Gen functions with Http trigger. By default https is optional for + // 1st Gen functions; 2nd Gen functions are https ONLY. + // + // Possible values: + // "SECURITY_LEVEL_UNSPECIFIED" - Unspecified. + // "SECURE_ALWAYS" - Requests for a URL that match this handler that + // do not use HTTPS are automatically redirected to the HTTPS URL with + // the same path. Query parameters are reserved for the redirect. + // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that + // match the handler succeed without redirects. The application can + // examine the request to determine which protocol was used and respond + // accordingly. + SecurityLevel string `json:"securityLevel,omitempty"` + // Service: Output only. Name of the service associated with a Function. // The format of this field is // `projects/{project}/locations/{region}/services/{service}` diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 2c8cd44e65a..8ea62f4b66d 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220824", + "revision": "20221020", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -653,8 +653,26 @@ "readOnly": true, "type": "string" }, + "buildpackStack": { + "description": "Specifies one of the Google provided buildpack stacks.", + "type": "string" + }, + "dockerRegistry": { + "description": "Optional. Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry. If `docker_repository` field is specified, this field will be automatically set as `ARTIFACT_REGISTRY`. If unspecified, it currently defaults to `CONTAINER_REGISTRY`. This field may be overridden by the backend for eligible deployments.", + "enum": [ + "DOCKER_REGISTRY_UNSPECIFIED", + "CONTAINER_REGISTRY", + "ARTIFACT_REGISTRY" + ], + "enumDescriptions": [ + "Unspecified.", + "Docker images will be stored in multi-regional Container Registry repositories named `gcf`.", + "Docker images will be stored in regional Artifact Registry repositories. By default, GCF will create and use repositories named `gcf-artifacts` in every region in which a function is deployed. But the repository to use can also be specified by the user using the `docker_repository` field." + ], + "type": "string" + }, "dockerRepository": { - "description": "Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", + "description": "User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", "type": "string" }, "entryPoint": { @@ -1798,6 +1816,20 @@ }, "type": "array" }, + "securityLevel": { + "description": "Optional. Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.", + "enum": [ + "SECURITY_LEVEL_UNSPECIFIED", + "SECURE_ALWAYS", + "SECURE_OPTIONAL" + ], + "enumDescriptions": [ + "Unspecified.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly." + ], + "type": "string" + }, "service": { "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", "readOnly": true, diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index f170c8db62b..ef85b98a5d5 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -376,12 +376,35 @@ type BuildConfig struct { // deployment of the function. Build string `json:"build,omitempty"` - // DockerRepository: Optional. User managed repository created in - // Artifact Registry optionally with a customer managed encryption key. - // This is the repository to which the function docker image will be - // pushed after it is built by Cloud Build. If unspecified, GCF will - // create and use a repository named 'gcf-artifacts' for every deployed - // region. It must match the pattern + // BuildpackStack: Specifies one of the Google provided buildpack + // stacks. + BuildpackStack string `json:"buildpackStack,omitempty"` + + // DockerRegistry: Optional. Docker Registry to use for this deployment. + // This configuration is only applicable to 1st Gen functions, 2nd Gen + // functions can only use Artifact Registry. If `docker_repository` + // field is specified, this field will be automatically set as + // `ARTIFACT_REGISTRY`. If unspecified, it currently defaults to + // `CONTAINER_REGISTRY`. This field may be overridden by the backend for + // eligible deployments. + // + // Possible values: + // "DOCKER_REGISTRY_UNSPECIFIED" - Unspecified. + // "CONTAINER_REGISTRY" - Docker images will be stored in + // multi-regional Container Registry repositories named `gcf`. + // "ARTIFACT_REGISTRY" - Docker images will be stored in regional + // Artifact Registry repositories. By default, GCF will create and use + // repositories named `gcf-artifacts` in every region in which a + // function is deployed. But the repository to use can also be specified + // by the user using the `docker_repository` field. + DockerRegistry string `json:"dockerRegistry,omitempty"` + + // DockerRepository: User managed repository created in Artifact + // Registry optionally with a customer managed encryption key. This is + // the repository to which the function docker image will be pushed + // after it is built by Cloud Build. If unspecified, GCF will create and + // use a repository named 'gcf-artifacts' for every deployed region. It + // must match the pattern // `projects/{project}/locations/{location}/repositories/{repository}`. // Cross-project repositories are not supported. Cross-location // repositories are not supported. Repository format must be 'DOCKER'. @@ -1994,6 +2017,22 @@ type ServiceConfig struct { // SecretVolumes: Secret volumes configuration. SecretVolumes []*SecretVolume `json:"secretVolumes,omitempty"` + // SecurityLevel: Optional. Security level configure whether the + // function only accepts https. This configuration is only applicable to + // 1st Gen functions with Http trigger. By default https is optional for + // 1st Gen functions; 2nd Gen functions are https ONLY. + // + // Possible values: + // "SECURITY_LEVEL_UNSPECIFIED" - Unspecified. + // "SECURE_ALWAYS" - Requests for a URL that match this handler that + // do not use HTTPS are automatically redirected to the HTTPS URL with + // the same path. Query parameters are reserved for the redirect. + // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that + // match the handler succeed without redirects. The application can + // examine the request to determine which protocol was used and respond + // accordingly. + SecurityLevel string `json:"securityLevel,omitempty"` + // Service: Output only. Name of the service associated with a Function. // The format of this field is // `projects/{project}/locations/{region}/services/{service}` diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index e2dc04d4a53..b6b0380f26c 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220824", + "revision": "20221020", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -653,8 +653,26 @@ "readOnly": true, "type": "string" }, + "buildpackStack": { + "description": "Specifies one of the Google provided buildpack stacks.", + "type": "string" + }, + "dockerRegistry": { + "description": "Optional. Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry. If `docker_repository` field is specified, this field will be automatically set as `ARTIFACT_REGISTRY`. If unspecified, it currently defaults to `CONTAINER_REGISTRY`. This field may be overridden by the backend for eligible deployments.", + "enum": [ + "DOCKER_REGISTRY_UNSPECIFIED", + "CONTAINER_REGISTRY", + "ARTIFACT_REGISTRY" + ], + "enumDescriptions": [ + "Unspecified.", + "Docker images will be stored in multi-regional Container Registry repositories named `gcf`.", + "Docker images will be stored in regional Artifact Registry repositories. By default, GCF will create and use repositories named `gcf-artifacts` in every region in which a function is deployed. But the repository to use can also be specified by the user using the `docker_repository` field." + ], + "type": "string" + }, "dockerRepository": { - "description": "Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", + "description": "User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", "type": "string" }, "entryPoint": { @@ -1798,6 +1816,20 @@ }, "type": "array" }, + "securityLevel": { + "description": "Optional. Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.", + "enum": [ + "SECURITY_LEVEL_UNSPECIFIED", + "SECURE_ALWAYS", + "SECURE_OPTIONAL" + ], + "enumDescriptions": [ + "Unspecified.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly." + ], + "type": "string" + }, "service": { "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", "readOnly": true, diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 65c8b719194..545fb2d8009 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -376,12 +376,35 @@ type BuildConfig struct { // deployment of the function. Build string `json:"build,omitempty"` - // DockerRepository: Optional. User managed repository created in - // Artifact Registry optionally with a customer managed encryption key. - // This is the repository to which the function docker image will be - // pushed after it is built by Cloud Build. If unspecified, GCF will - // create and use a repository named 'gcf-artifacts' for every deployed - // region. It must match the pattern + // BuildpackStack: Specifies one of the Google provided buildpack + // stacks. + BuildpackStack string `json:"buildpackStack,omitempty"` + + // DockerRegistry: Optional. Docker Registry to use for this deployment. + // This configuration is only applicable to 1st Gen functions, 2nd Gen + // functions can only use Artifact Registry. If `docker_repository` + // field is specified, this field will be automatically set as + // `ARTIFACT_REGISTRY`. If unspecified, it currently defaults to + // `CONTAINER_REGISTRY`. This field may be overridden by the backend for + // eligible deployments. + // + // Possible values: + // "DOCKER_REGISTRY_UNSPECIFIED" - Unspecified. + // "CONTAINER_REGISTRY" - Docker images will be stored in + // multi-regional Container Registry repositories named `gcf`. + // "ARTIFACT_REGISTRY" - Docker images will be stored in regional + // Artifact Registry repositories. By default, GCF will create and use + // repositories named `gcf-artifacts` in every region in which a + // function is deployed. But the repository to use can also be specified + // by the user using the `docker_repository` field. + DockerRegistry string `json:"dockerRegistry,omitempty"` + + // DockerRepository: User managed repository created in Artifact + // Registry optionally with a customer managed encryption key. This is + // the repository to which the function docker image will be pushed + // after it is built by Cloud Build. If unspecified, GCF will create and + // use a repository named 'gcf-artifacts' for every deployed region. It + // must match the pattern // `projects/{project}/locations/{location}/repositories/{repository}`. // Cross-project repositories are not supported. Cross-location // repositories are not supported. Repository format must be 'DOCKER'. @@ -1994,6 +2017,22 @@ type ServiceConfig struct { // SecretVolumes: Secret volumes configuration. SecretVolumes []*SecretVolume `json:"secretVolumes,omitempty"` + // SecurityLevel: Optional. Security level configure whether the + // function only accepts https. This configuration is only applicable to + // 1st Gen functions with Http trigger. By default https is optional for + // 1st Gen functions; 2nd Gen functions are https ONLY. + // + // Possible values: + // "SECURITY_LEVEL_UNSPECIFIED" - Unspecified. + // "SECURE_ALWAYS" - Requests for a URL that match this handler that + // do not use HTTPS are automatically redirected to the HTTPS URL with + // the same path. Query parameters are reserved for the redirect. + // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that + // match the handler succeed without redirects. The application can + // examine the request to determine which protocol was used and respond + // accordingly. + SecurityLevel string `json:"securityLevel,omitempty"` + // Service: Output only. Name of the service associated with a Function. // The format of this field is // `projects/{project}/locations/{region}/services/{service}` diff --git a/cloudidentity/v1beta1/cloudidentity-api.json b/cloudidentity/v1beta1/cloudidentity-api.json index 80f5a2ca830..4d4a35acc56 100644 --- a/cloudidentity/v1beta1/cloudidentity-api.json +++ b/cloudidentity/v1beta1/cloudidentity-api.json @@ -1537,12 +1537,12 @@ "parameterOrder": [], "parameters": { "filter": { - "description": "A CEL expression to filter the results. The only currently-supported filter is filtering by customer. For example: `customer==customers/C0123abc`. Omitting the filter or specifying a filter of `customer==customers/my_customer` will return the profiles for the customer that the caller (authenticated user) belongs to.", + "description": "A [Common Expression Language](https://github.com/google/cel-spec) expression to filter the results. The only currently-supported filter is filtering by customer. For example: `customer==\"customers/C0123abc\"`. Omitting the filter or specifying a filter of `customer==\"customers/my_customer\"` will return the profiles for the customer that the caller (authenticated user) belongs to.", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of InboundSamlSsoProfiles to return. The service may return fewer than this value. If omitted (or defaulted to zero) the server will use a sensible default. This default may change over time. The maximum allowed value is 100, though requests with page_size greater than that will be silently interpreted as having this maximum value. This may increase in the futue.", + "description": "The maximum number of InboundSamlSsoProfiles to return. The service may return fewer than this value. If omitted (or defaulted to zero) the server will use a sensible default. This default may change over time. The maximum allowed value is 100. Requests with page_size greater than that will be silently interpreted as having this maximum value.", "format": "int32", "location": "query", "type": "integer" @@ -1932,7 +1932,7 @@ } } }, - "revision": "20221011", + "revision": "20221025", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { @@ -1946,7 +1946,7 @@ "id": "AddIdpCredentialRequest", "properties": { "pemData": { - "description": "PEM encoded x509 certificate containing the public signing key.", + "description": "PEM encoded x509 certificate containing the public key for verifying IdP signatures.", "type": "string" } }, @@ -3530,7 +3530,7 @@ "type": "object" }, "IdpCredential": { - "description": "The identity provider's credentials (for signing assertions, etc).", + "description": "Credential for verifying signatures produced by the Identity Provider.", "id": "IdpCredential", "properties": { "dsaKeyInfo": { diff --git a/cloudidentity/v1beta1/cloudidentity-gen.go b/cloudidentity/v1beta1/cloudidentity-gen.go index 9b097721510..cbde45c0ded 100644 --- a/cloudidentity/v1beta1/cloudidentity-gen.go +++ b/cloudidentity/v1beta1/cloudidentity-gen.go @@ -315,8 +315,8 @@ type AddIdpCredentialOperationMetadata struct { // with its associated payload. An InboundSamlSsoProfile can own up to 2 // credentials. type AddIdpCredentialRequest struct { - // PemData: PEM encoded x509 certificate containing the public signing - // key. + // PemData: PEM encoded x509 certificate containing the public key for + // verifying IdP signatures. PemData string `json:"pemData,omitempty"` // ForceSendFields is a list of field names (e.g. "PemData") to @@ -2309,8 +2309,8 @@ func (s *GroupRelation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// IdpCredential: The identity provider's credentials (for signing -// assertions, etc). +// IdpCredential: Credential for verifying signatures produced by the +// Identity Provider. type IdpCredential struct { // DsaKeyInfo: Output only. Information of a DSA public key. DsaKeyInfo *DsaPublicKeyInfo `json:"dsaKeyInfo,omitempty"` @@ -11470,12 +11470,13 @@ func (r *InboundSamlSsoProfilesService) List() *InboundSamlSsoProfilesListCall { return c } -// Filter sets the optional parameter "filter": A CEL expression to -// filter the results. The only currently-supported filter is filtering -// by customer. For example: `customer==customers/C0123abc`. Omitting -// the filter or specifying a filter of -// `customer==customers/my_customer` will return the profiles for the -// customer that the caller (authenticated user) belongs to. +// Filter sets the optional parameter "filter": A Common Expression +// Language (https://github.com/google/cel-spec) expression to filter +// the results. The only currently-supported filter is filtering by +// customer. For example: `customer=="customers/C0123abc". Omitting the +// filter or specifying a filter of `customer=="customers/my_customer" +// will return the profiles for the customer that the caller +// (authenticated user) belongs to. func (c *InboundSamlSsoProfilesListCall) Filter(filter string) *InboundSamlSsoProfilesListCall { c.urlParams_.Set("filter", filter) return c @@ -11485,9 +11486,8 @@ func (c *InboundSamlSsoProfilesListCall) Filter(filter string) *InboundSamlSsoPr // of InboundSamlSsoProfiles to return. The service may return fewer // than this value. If omitted (or defaulted to zero) the server will // use a sensible default. This default may change over time. The -// maximum allowed value is 100, though requests with page_size greater -// than that will be silently interpreted as having this maximum value. -// This may increase in the futue. +// maximum allowed value is 100. Requests with page_size greater than +// that will be silently interpreted as having this maximum value. func (c *InboundSamlSsoProfilesListCall) PageSize(pageSize int64) *InboundSamlSsoProfilesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -11607,12 +11607,12 @@ func (c *InboundSamlSsoProfilesListCall) Do(opts ...googleapi.CallOption) (*List // "parameterOrder": [], // "parameters": { // "filter": { - // "description": "A CEL expression to filter the results. The only currently-supported filter is filtering by customer. For example: `customer==customers/C0123abc`. Omitting the filter or specifying a filter of `customer==customers/my_customer` will return the profiles for the customer that the caller (authenticated user) belongs to.", + // "description": "A [Common Expression Language](https://github.com/google/cel-spec) expression to filter the results. The only currently-supported filter is filtering by customer. For example: `customer==\"customers/C0123abc\"`. Omitting the filter or specifying a filter of `customer==\"customers/my_customer\"` will return the profiles for the customer that the caller (authenticated user) belongs to.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of InboundSamlSsoProfiles to return. The service may return fewer than this value. If omitted (or defaulted to zero) the server will use a sensible default. This default may change over time. The maximum allowed value is 100, though requests with page_size greater than that will be silently interpreted as having this maximum value. This may increase in the futue.", + // "description": "The maximum number of InboundSamlSsoProfiles to return. The service may return fewer than this value. If omitted (or defaulted to zero) the server will use a sensible default. This default may change over time. The maximum allowed value is 100. Requests with page_size greater than that will be silently interpreted as having this maximum value.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/cloudsearch/v1/cloudsearch-api.json b/cloudsearch/v1/cloudsearch-api.json index f6c23f93ac0..29933500ab5 100644 --- a/cloudsearch/v1/cloudsearch-api.json +++ b/cloudsearch/v1/cloudsearch-api.json @@ -1215,7 +1215,7 @@ "type": "string" }, "updateMask": { - "description": "Update mask to control which fields to update. If update_mask is non-empty then only the fields specified in the update_mask are updated. If you specify a field in the update_mask, but don't specify its value in the source that field will be cleared. If the update_mask is not present or empty or has the value * then all fields will be updated. Some example field paths: name, display_name", + "description": "Only applies to [`settings.datasources.patch`](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.datasources/patch). Update mask to control which fields to update. Example field paths: `name`, `displayName`. * If `update_mask` is non-empty, then only the fields specified in the `update_mask` are updated. * If you specify a field in the `update_mask`, but don't specify its value in the source, that field is cleared. * If the `update_mask` is not present or empty or has the value `*`, then all fields are updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1403,7 +1403,7 @@ "type": "string" }, "updateMask": { - "description": "Update mask to control which fields to update. If update_mask is non-empty then only the fields specified in the update_mask are updated. If you specify a field in the update_mask, but don't specify its value in the search_application then that field will be cleared. If the update_mask is not present or empty or has the value * then all fields will be updated. Some example field paths: search_application.name, search_application.display_name", + "description": "Only applies to [`settings.searchapplications.patch`](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch). Update mask to control which fields to update. Example field paths: `search_application.name`, `search_application.displayName`. * If `update_mask` is non-empty, then only the fields specified in the `update_mask` are updated. * If you specify a field in the `update_mask`, but don't specify its value in the `search_application`, then that field is cleared. * If the `update_mask` is not present or empty or has the value `*`, then all fields are updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1469,7 +1469,7 @@ "type": "string" }, "updateMask": { - "description": "Update mask to control which fields to update. If update_mask is non-empty then only the fields specified in the update_mask are updated. If you specify a field in the update_mask, but don't specify its value in the search_application then that field will be cleared. If the update_mask is not present or empty or has the value * then all fields will be updated. Some example field paths: search_application.name, search_application.display_name", + "description": "Only applies to [`settings.searchapplications.patch`](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch). Update mask to control which fields to update. Example field paths: `search_application.name`, `search_application.displayName`. * If `update_mask` is non-empty, then only the fields specified in the `update_mask` are updated. * If you specify a field in the `update_mask`, but don't specify its value in the `search_application`, then that field is cleared. * If the `update_mask` is not present or empty or has the value `*`, then all fields are updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2077,7 +2077,7 @@ } } }, - "revision": "20220927", + "revision": "20221018", "rootUrl": "https://cloudsearch.googleapis.com/", "schemas": { "AbuseReportingConfig": { @@ -2237,6 +2237,23 @@ }, "type": "object" }, + "AddonComposeUiActionMarkup": { + "id": "AddonComposeUiActionMarkup", + "properties": { + "type": { + "enum": [ + "UNSPECIFIED", + "DISMISS" + ], + "enumDescriptions": [ + "Default. When unspecified, no action is taken.", + "Dismisses the add-on compose UI." + ], + "type": "string" + } + }, + "type": "object" + }, "AffectedMembership": { "description": "Earlier we used to populate just the affected_members list and inferred the new membership state (roles didn't exist back then) from the Type. go/dynamite-finra required backend to know the previous membership state to reconstruct membership history. The proper solution involved cleaning up up Type enum, but it was used in many, many places. This was added as a stop-gap solution to unblock FINRA without breaking everything. Later role update and target audience update started relying on this to communicate information to clients about what transition happened. So this is now required to be populated and should be in sync with affected_members for new messages.", "id": "AffectedMembership", @@ -4244,6 +4261,10 @@ "$ref": "AppsDynamiteSharedAction", "description": "If specified, an action is triggered by this onClick." }, + "hostAppAction": { + "$ref": "HostAppActionMarkup", + "description": "Triggers host app action on click directly without invoking form actions. This is currently not available to end-users and is used internal only." + }, "openDynamicLinkAction": { "$ref": "AppsDynamiteSharedAction", "description": "An add-on triggers this action when the action needs to open a link. This differs from the open_link above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back." @@ -5074,6 +5095,219 @@ }, "type": "object" }, + "AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkup": { + "id": "AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkup", + "properties": { + "addonAttachments": { + "items": { + "$ref": "AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkupAddonAttachment" + }, + "type": "array" + } + }, + "type": "object" + }, + "AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkupAddonAttachment": { + "id": "AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkupAddonAttachment", + "properties": { + "iconUrl": { + "description": "Link to the resource's icon.", + "type": "string" + }, + "mimeType": { + "description": "MIME type of the content in resource_url.", + "type": "string" + }, + "resourceUrl": { + "type": "string" + }, + "title": { + "description": "Title of the attachment.", + "type": "string" + } + }, + "type": "object" + }, + "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkup": { + "description": "Markup that defines conference data associated to a Google Calendar event.", + "id": "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkup", + "properties": { + "conferenceId": { + "description": "Unique identifier for this conference data. Maximum 512 characters long.", + "type": "string" + }, + "conferenceSolutionId": { + "description": "An identifier of the conferencing solution. Must match a value from the deployment's `calendar.conferenceSolution.id` field.", + "type": "string" + }, + "entryPoints": { + "description": "Entry points to the conference. Maximum 300 entry points are allowed.", + "items": { + "$ref": "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupEntryPointMarkup" + }, + "type": "array" + }, + "error": { + "$ref": "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupError", + "description": "If set, it means an error occurred during conference creation." + }, + "note": { + "description": "Additional notes (such as instructions from the administrator, legal notices) to display to the user. Can contain HTML. Max length 2048 characters.", + "type": "string" + }, + "parameters": { + "description": "Additional add-on parameters. Maximum 300 parameters are allowed.", + "items": { + "$ref": "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupParameter" + }, + "type": "array" + } + }, + "type": "object" + }, + "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupEntryPointMarkup": { + "description": "A way to join the conference.", + "id": "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupEntryPointMarkup", + "properties": { + "accessCode": { + "description": "An access code for accessing the conference. Maximum 128 characters long.", + "type": "string" + }, + "features": { + "description": "Features of the entry point, such as being toll or toll-free. One entry point can have multiple features.", + "items": { + "enum": [ + "UNKNOWN_FEATURE", + "TOLL", + "TOLL_FREE" + ], + "enumDescriptions": [ + "Unknown feature.", + "Applies to `PHONE` entry point. A call to a toll number is charged to the calling party. A number can't be toll and toll-free at the same time.", + "Applies to `PHONE` entry point. For the calling party, a call to a toll-free number is free of charge. A number can't be toll and toll-free at the same time." + ], + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "The label of the entry point to display to the user. Maximum 512 characters long.", + "type": "string" + }, + "meetingCode": { + "description": "A meeting code for accessing the conference. Maximum 128 characters long.", + "type": "string" + }, + "passcode": { + "description": "A passcode for accessing the conference. Maximum 128 characters long.", + "type": "string" + }, + "password": { + "description": "A password for accessing the conference. Maximum 128 characters long.", + "type": "string" + }, + "pin": { + "description": "A PIN for accessing the conference. Maximum 128 characters long.", + "type": "string" + }, + "regionCode": { + "description": "The CLDR/ISO 3166 region code for the country associated with this entry point. Applicable only to `Type.PHONE`.", + "type": "string" + }, + "type": { + "description": "The type of the entry point. Required.", + "enum": [ + "UNKNOWN", + "VIDEO", + "PHONE", + "MORE", + "SIP" + ], + "enumDescriptions": [ + "Unknown conference type.", + "A video conference.", + "A phone conference.", + "Used to provide a link to further conference joining information.", + "A conference using [Session Initiation Protocol](https://en.wikipedia.org/wiki/Session_Initiation_Protocol)" + ], + "type": "string" + }, + "uri": { + "description": "A URI for joining the conference. Supports tel: and http(s): and should be at most 1300 characters long. Required.", + "type": "string" + } + }, + "type": "object" + }, + "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupError": { + "description": "Represents an error that occurred during conference creation.", + "id": "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupError", + "properties": { + "authenticationUrl": { + "description": "If the error type is `AUTHENTICATION`, the add-on can provide a URL allowing users to log in. Maximum 1300 characters long.", + "type": "string" + }, + "type": { + "description": "The type of error. Required.", + "enum": [ + "UNKNOWN", + "AUTHENTICATION", + "TEMPORARY", + "PERMANENT", + "PERMISSION_DENIED", + "CONFERENCE_SOLUTION_FORBIDDEN" + ], + "enumDescriptions": [ + "Unknown error.", + "An authentication error.", + "A temporary error.", + "A permanent error.", + "The user isn't allowed to perform some action in the third-party conferencing system.", + "The user isn't allowed to use the selected conference solution (but might be allowed to use other solutions offered by the add-on)." + ], + "type": "string" + } + }, + "type": "object" + }, + "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupParameter": { + "description": "Solution-specific parameters that are persisted with the event data and, if an update or delete is needed, are passed to the add-on. For example: `[{key: 'sessionKey', value: '123'}, {key: 'meetingId', value: '456'}]`", + "id": "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupParameter", + "properties": { + "key": { + "description": "The key of the parameter. Maximum 50 characters long. Required.", + "type": "string" + }, + "value": { + "description": "The value of the parameter. Maximum 1024 characters long. Required.", + "type": "string" + } + }, + "type": "object" + }, + "AppsExtensionsMarkupCalendarClientActionMarkupEditAttendeesActionMarkup": { + "id": "AppsExtensionsMarkupCalendarClientActionMarkupEditAttendeesActionMarkup", + "properties": { + "addAttendeeEmails": { + "description": "A list of attendees to add to the Google Calendar event.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AppsExtensionsMarkupCalendarClientActionMarkupEditConferenceDataActionMarkup": { + "id": "AppsExtensionsMarkupCalendarClientActionMarkupEditConferenceDataActionMarkup", + "properties": { + "conferenceData": { + "$ref": "AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkup", + "description": "The conference data to add to the Google Calendar event." + } + }, + "type": "object" + }, "Attachment": { "description": "Attachments that follow the message text.", "id": "Attachment", @@ -5383,7 +5617,8 @@ "SETUP_REQUIRED", "DISABLED_BY_ADMIN", "DISABLED_BY_DEVELOPER", - "PRIVATE" + "PRIVATE", + "APP_SUGGESTION" ], "enumDescriptions": [ "", @@ -5391,7 +5626,8 @@ "Bot requires auth or config", "Bot fails to respond because it is disabled by domain admin", "Bot fails to respond because it is disabled by the bot's developer", - "Message to bot should be permanently private." + "Message to bot should be permanently private.", + "A suggestion to promote an app." ], "type": "string" }, @@ -5475,6 +5711,24 @@ }, "type": "object" }, + "CalendarClientActionMarkup": { + "id": "CalendarClientActionMarkup", + "properties": { + "addAttachmentsActionMarkup": { + "$ref": "AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkup", + "description": "An action that adds attachments to the Google Calendar event." + }, + "editAttendeesActionMarkup": { + "$ref": "AppsExtensionsMarkupCalendarClientActionMarkupEditAttendeesActionMarkup", + "description": "An action that adds attendees to the Google Calendar event." + }, + "editConferenceDataActionMarkup": { + "$ref": "AppsExtensionsMarkupCalendarClientActionMarkupEditConferenceDataActionMarkup", + "description": "An action that adds conference data to the Google Calendar event." + } + }, + "type": "object" + }, "CallInfo": { "description": "Contains information regarding an ongoing conference (aka call) for a meeting space.", "id": "CallInfo", @@ -5600,6 +5854,26 @@ "description": "Indicates whether the access lock is currently on or off.", "type": "boolean" }, + "accessType": { + "description": "The current access type of the conference.", + "enum": [ + "ACCESS_TYPE_UNSPECIFIED", + "ACCESS_TYPE_OPEN", + "ACCESS_TYPE_TRUSTED", + "ACCESS_TYPE_RESTRICTED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Anyone with meeting join information (url, phone access...) can join, no knocking required. (Subject to organization policies)", + "Members of the Host's organization, invited external users, and dial-in users can join without knocking, everyone else must knock. (Subject to organization policies)", + "Only participants invited by a host can automatically join, everyone else must knock and be admitted. (Subject to organization policies) Participants cannot dial out from the meeting. And only hosts can accept knocks." + ], + "type": "string" + }, + "allowJoiningBeforeHost": { + "description": "Whether users can join this conference before a host (Host or Cohost).", + "type": "boolean" + }, "attendanceReportEnabled": { "description": "Indicates whether the attendance report is currently enabled or disabled.", "type": "boolean" @@ -5617,7 +5891,7 @@ "type": "boolean" }, "moderationEnabled": { - "description": "Indicates whether the current call is moderated.", + "description": "Indicates whether moderation is currently on or off.", "type": "boolean" }, "presentLock": { @@ -5764,6 +6038,12 @@ }, "type": "object" }, + "ChatClientActionMarkup": { + "description": "Actions handled by Chat Clients.", + "id": "ChatClientActionMarkup", + "properties": {}, + "type": "object" + }, "ChatConfig": { "description": "Configuration of the in meeting chat.", "id": "ChatConfig", @@ -6277,6 +6557,21 @@ }, "type": "object" }, + "CustomFunctionReturnValueMarkup": { + "description": "The result of a user running a custom function.", + "id": "CustomFunctionReturnValueMarkup", + "properties": { + "errorMessage": { + "description": "The error message to show to the user if something went wrong.", + "type": "string" + }, + "value": { + "description": "The value that resulted from running the custom function.", + "type": "any" + } + }, + "type": "object" + }, "CustomerId": { "description": "Represents a GSuite customer ID. Obfuscated with CustomerIdObfuscator.", "id": "CustomerId", @@ -6836,6 +7131,15 @@ }, "type": "object" }, + "DriveClientActionMarkup": { + "id": "DriveClientActionMarkup", + "properties": { + "requestFileScope": { + "$ref": "RequestFileScope" + } + }, + "type": "object" + }, "DriveFollowUpRestrict": { "description": "Drive follow-up search restricts (e.g. \"followup:suggestions\").", "id": "DriveFollowUpRestrict", @@ -7158,6 +7462,15 @@ "properties": {}, "type": "object" }, + "EditorClientActionMarkup": { + "id": "EditorClientActionMarkup", + "properties": { + "requestFileScopeForActiveDocument": { + "$ref": "RequestFileScopeForActiveDocument" + } + }, + "type": "object" + }, "EmailAddress": { "description": "A person's email address.", "id": "EmailAddress", @@ -8696,6 +9009,24 @@ }, "type": "object" }, + "GmailClientActionMarkup": { + "id": "GmailClientActionMarkup", + "properties": { + "addonComposeUiActionMarkup": { + "$ref": "AddonComposeUiActionMarkup" + }, + "openCreatedDraftActionMarkup": { + "$ref": "OpenCreatedDraftActionMarkup" + }, + "taskAction": { + "$ref": "TaskActionMarkup" + }, + "updateDraftActionMarkup": { + "$ref": "UpdateDraftActionMarkup" + } + }, + "type": "object" + }, "GoogleChatConfig": { "description": "Configuration of the Google Chat in Meet.", "id": "GoogleChatConfig", @@ -8751,7 +9082,7 @@ "type": "object" }, "GoogleChatV1ContextualAddOnMarkupCardCardAction": { - "description": "A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser.", + "description": "A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. Not supported by Google Chat apps.", "id": "GoogleChatV1ContextualAddOnMarkupCardCardAction", "properties": { "actionLabel": { @@ -9533,6 +9864,37 @@ }, "type": "object" }, + "HostAppActionMarkup": { + "description": "Actions handled by individual host apps.", + "id": "HostAppActionMarkup", + "properties": { + "calendarAction": { + "$ref": "CalendarClientActionMarkup", + "description": "Actions handled by Calendar." + }, + "chatAction": { + "$ref": "ChatClientActionMarkup", + "description": "Actions handled by Chat." + }, + "driveAction": { + "$ref": "DriveClientActionMarkup", + "description": "Actions handled by Drive." + }, + "editorAction": { + "$ref": "EditorClientActionMarkup", + "description": "Actions handled by Docs, Sheets, or Slides." + }, + "gmailAction": { + "$ref": "GmailClientActionMarkup", + "description": "Actions handled by Gmail." + }, + "sheetsAction": { + "$ref": "SheetsClientActionMarkup", + "description": "Actions handled by Sheets." + } + }, + "type": "object" + }, "HostProto": { "description": "Represents a single host. Optionally, the MDB owner of the host can be specified.", "id": "HostProto", @@ -10067,6 +10429,45 @@ "properties": {}, "type": "object" }, + "InsertContent": { + "id": "InsertContent", + "properties": { + "content": { + "description": "The content to be inserted.", + "type": "string" + }, + "contentType": { + "description": "The type of inserted content.", + "enum": [ + "UNSPECIFIED_CONTENT_TYPE", + "TEXT", + "MUTABLE_HTML", + "IMMUTABLE_HTML" + ], + "enumDescriptions": [ + "Default value when nothing is set for ContentType.", + "Specifies that the content is in plain text.", + "Specifies that the content is in HTML and is mutable (can be edited).", + "Specifies that the content is in HTML and is immutable (cannot be edited)." + ], + "type": "string" + }, + "mimeType": { + "enum": [ + "UNSPECIFIED_EMAIL_MIME_TYPE", + "PLAIN_TEXT", + "HTML" + ], + "enumDescriptions": [ + "Default value when nothing is set for EmailMimeType.", + "Specifies that the inserted content is in plain text.", + "Specifies that the inserted content is in HTML." + ], + "type": "string" + } + }, + "type": "object" + }, "IntegerOperatorOptions": { "description": "Used to provide a search operator for integer properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched.", "id": "IntegerOperatorOptions", @@ -11079,7 +11480,7 @@ "type": "object" }, "MembershipChangedMetadata": { - "description": "Annotation metadata to display system messages for membership changes.", + "description": "Annotation metadata to display system messages for membership changes. Next Tag: 8", "id": "MembershipChangedMetadata", "properties": { "affectedMemberProfiles": { @@ -11109,6 +11510,20 @@ "$ref": "User", "description": "Complete member profiles, when ListTopicsRequest FetchOptions.USER is set. Otherwise, only the id will be filled in." }, + "initiatorType": { + "description": "The type of the user who initiated this membership change.", + "enum": [ + "INITIATOR_TYPE_UNSPECIFIED", + "INITIATOR_TYPE_END_USER", + "INITIATOR_TYPE_ADMIN" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "type": { "enum": [ "TYPE_UNSPECIFIED", @@ -11814,6 +12229,28 @@ }, "type": "object" }, + "OpenCreatedDraftActionMarkup": { + "id": "OpenCreatedDraftActionMarkup", + "properties": { + "draftId": { + "description": "The ID of the newly created draft in the form \"r123\".", + "type": "string" + }, + "draftStorageId": { + "description": "The server storage ID in hex format, for example,\"15e9fa622ce1029d\".", + "type": "string" + }, + "draftThreadId": { + "description": "The ID of the thread containing the newly created draft, for example, \"15e9fa622ce1029d\".", + "type": "string" + }, + "draftThreadServerPermId": { + "description": "The server permanent ID for the draft's thread. This field isn't set anywhere, and it's ignored when processing OpenCreatedDraftActionMarkup. Supply and use draftThreadStorageId instead.", + "type": "string" + } + }, + "type": "object" + }, "OpenLink": { "id": "OpenLink", "properties": { @@ -13062,6 +13499,15 @@ }, "type": "object" }, + "Recipient": { + "id": "Recipient", + "properties": { + "email": { + "type": "string" + } + }, + "type": "object" + }, "RecordingEvent": { "description": "A recording event is something that happens to the recording in a conference.", "id": "RecordingEvent", @@ -13233,6 +13679,20 @@ }, "type": "object" }, + "RequestFileScope": { + "id": "RequestFileScope", + "properties": { + "itemId": { + "type": "string" + } + }, + "type": "object" + }, + "RequestFileScopeForActiveDocument": { + "id": "RequestFileScopeForActiveDocument", + "properties": {}, + "type": "object" + }, "RequestOptions": { "description": "Shared request options for all RPC methods.", "id": "RequestOptions", @@ -13313,14 +13773,6 @@ "description": "Debugging information about the response.", "id": "ResponseDebugInfo", "properties": { - "enabledExperiments": { - "description": "Experiments enabled in QAPI.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, "formattedDebugInfo": { "description": "General debug info formatted for display.", "type": "string" @@ -13514,6 +13966,10 @@ "id": { "$ref": "RosterId" }, + "isMembershipVisibleToCaller": { + "description": "Whether caller has visibility into members of the roster.", + "type": "boolean" + }, "membershipCount": { "format": "int32", "type": "integer" @@ -14160,11 +14616,31 @@ "type": "object" }, "Settings": { - "description": "Settings of a meeting space that can be viewed and edited by users with permissions. These settings are always populated for output.", + "description": "Settings of a meeting space that can be edited by users with corresponding manage privilege. These settings are always populated in responses.", "id": "Settings", "properties": { "accessLock": { - "description": "The access lock of the meeting space that lets owner control who can join the meeting. True if the access lock feature is enabled for the meeting space.", + "description": "The access lock of the meeting space that lets hosts control who can join the meeting.", + "type": "boolean" + }, + "accessType": { + "description": "The access type of the meeting space.", + "enum": [ + "ACCESS_TYPE_UNSPECIFIED", + "ACCESS_TYPE_OPEN", + "ACCESS_TYPE_TRUSTED", + "ACCESS_TYPE_RESTRICTED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Anyone with meeting join information (url, phone access...) can join, no knocking required. (Subject to organization policies)", + "Members of the Host's organization, invited external users, and dial-in users can join without knocking, everyone else must knock. (Subject to organization policies)", + "Only participants invited by a host can automatically join, everyone else must knock and be admitted. (Subject to organization policies) Participants cannot dial out from the meeting. And only hosts can accept knocks." + ], + "type": "string" + }, + "allowJoiningBeforeHost": { + "description": "Whether users can join before host in the conferences of this meeting space.", "type": "boolean" }, "attendanceReportEnabled": { @@ -14172,7 +14648,7 @@ "type": "boolean" }, "chatLock": { - "description": "The chat lock of the meeting space that lets owner control whether the participants can send chat messages. True if the chat lock feature is enabled for the meeting space.", + "description": "The chat lock of the meeting space that lets owner control whether the participants can send chat messages.", "type": "boolean" }, "cohostArtifactSharingEnabled": { @@ -14192,11 +14668,11 @@ "type": "boolean" }, "presentLock": { - "description": "The present lock of the meeting space that lets owner control whether the participants can present their screen. True if the present lock feature is enabled for the meeting space.", + "description": "The present lock of the meeting space that lets owner control whether the participants can present their screen.", "type": "boolean" }, "reactionsLock": { - "description": "The reactions lock of the meeting space that lets owner control whether the participants can send reactions. True if the reactions lock feature is enabled for the meeting space.", + "description": "The reactions lock of the meeting space that lets owner control whether the participants can send reactions.", "type": "boolean" } }, @@ -14232,6 +14708,15 @@ }, "type": "object" }, + "SheetsClientActionMarkup": { + "id": "SheetsClientActionMarkup", + "properties": { + "customFunctionReturnValueMarkup": { + "$ref": "CustomFunctionReturnValueMarkup" + } + }, + "type": "object" + }, "SigningKeyPossessorProto": { "description": "Represents a principal who possesses a signing key corresponding to the verification key or keyset described here.", "id": "SigningKeyPossessorProto", @@ -14861,6 +15346,15 @@ }, "type": "object" }, + "TaskActionMarkup": { + "id": "TaskActionMarkup", + "properties": { + "reloadTasks": { + "type": "boolean" + } + }, + "type": "object" + }, "TextButton": { "id": "TextButton", "properties": { @@ -15228,6 +15722,60 @@ }, "type": "object" }, + "UpdateBccRecipients": { + "id": "UpdateBccRecipients", + "properties": { + "bccRecipients": { + "items": { + "$ref": "Recipient" + }, + "type": "array" + } + }, + "type": "object" + }, + "UpdateBody": { + "id": "UpdateBody", + "properties": { + "insertContents": { + "description": "A repeated field that contains a series of content to insert into the draft that the user is currently editing. The content can contain HTML content or plain text content.", + "items": { + "$ref": "InsertContent" + }, + "type": "array" + }, + "type": { + "enum": [ + "UNSPECIFIED_ACTION_TYPE", + "IN_PLACE_INSERT", + "INSERT_AT_START", + "INSERT_AT_END", + "REPLACE" + ], + "enumDescriptions": [ + "Default value when nothing is set for Type.", + "Indicates this action is to perform an in-place insertion. By default the content is inserted at the current cursor position, if there is selected content, it replaces the selected content.", + "Indicates this action is to perform insert at the start of the message body.", + "Indicates this action is to perform insert at the end of the message body.", + "Indicates this action is to replace the message body." + ], + "type": "string" + } + }, + "type": "object" + }, + "UpdateCcRecipients": { + "id": "UpdateCcRecipients", + "properties": { + "ccRecipients": { + "items": { + "$ref": "Recipient" + }, + "type": "array" + } + }, + "type": "object" + }, "UpdateDataSourceRequest": { "id": "UpdateDataSourceRequest", "properties": { @@ -15239,13 +15787,39 @@ "$ref": "DataSource" }, "updateMask": { - "description": "Update mask to control which fields to update. If update_mask is non-empty then only the fields specified in the update_mask are updated. If you specify a field in the update_mask, but don't specify its value in the source that field will be cleared. If the update_mask is not present or empty or has the value * then all fields will be updated. Some example field paths: name, display_name", + "description": "Only applies to [`settings.datasources.patch`](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.datasources/patch). Update mask to control which fields to update. Example field paths: `name`, `displayName`. * If `update_mask` is non-empty, then only the fields specified in the `update_mask` are updated. * If you specify a field in the `update_mask`, but don't specify its value in the source, that field is cleared. * If the `update_mask` is not present or empty or has the value `*`, then all fields are updated.", "format": "google-fieldmask", "type": "string" } }, "type": "object" }, + "UpdateDraftActionMarkup": { + "id": "UpdateDraftActionMarkup", + "properties": { + "updateBccRecipients": { + "$ref": "UpdateBccRecipients", + "description": "If set, replaces the existing Bcc recipients of the draft the user is currently editing." + }, + "updateBody": { + "$ref": "UpdateBody", + "description": "A field that contains a series of update actions to perform on the draft body that the user is currently editing." + }, + "updateCcRecipients": { + "$ref": "UpdateCcRecipients", + "description": "If set, replaces the existing Cc recipients of the draft the user is currently editing." + }, + "updateSubject": { + "$ref": "UpdateSubject", + "description": "If set, replaces the existing subject of the draft the user is currently editing." + }, + "updateToRecipients": { + "$ref": "UpdateToRecipients", + "description": "If set, replaces the existing To recipients of the draft the user is currently editing." + } + }, + "type": "object" + }, "UpdateSchemaRequest": { "id": "UpdateSchemaRequest", "properties": { @@ -15264,6 +15838,27 @@ }, "type": "object" }, + "UpdateSubject": { + "id": "UpdateSubject", + "properties": { + "subject": { + "type": "string" + } + }, + "type": "object" + }, + "UpdateToRecipients": { + "id": "UpdateToRecipients", + "properties": { + "toRecipients": { + "items": { + "$ref": "Recipient" + }, + "type": "array" + } + }, + "type": "object" + }, "UploadItemRef": { "description": "Represents an upload session reference. This reference is created via upload method. This reference is valid for 30 days after its creation. Updating of item content may refer to this uploaded content via contentDataRef.", "id": "UploadItemRef", @@ -15397,6 +15992,24 @@ "format": "int32", "type": "integer" }, + "linkType": { + "description": "NEXT TAG : 18", + "enum": [ + "UNDEFINED", + "AUTO_DETECTED_PLAIN_TEXT", + "RICH_TEXT", + "MARKDOWN", + "NO_ASSOCIATED_TEXT" + ], + "enumDescriptions": [ + "", + "Set by the server, when it detects a URL in the message text", + "Set by the client, when the user adds a link via the rich-text editing (RTE) toolbar", + "Set by the server, when it detects a URL in markdown-syntax in the message text", + "Set by the server when a URL annotation received from client has 0 length and 0 start index" + ], + "type": "string" + }, "mimeType": { "description": "Mime type of the content (Currently mapped from Page Render Service ItemType) Note that this is not necessarily the mime type of the http resource. For example a text/html from youtube or vimeo may actually be classified as a video type. Then we shall mark it as video/* since we don't know exactly what type of video it is.", "type": "string" @@ -15422,7 +16035,6 @@ "description": "The original URL." }, "urlSource": { - "description": "NEXT TAG : 17", "enum": [ "URL_SOURCE_UNKNOWN", "USER_SUPPLIED_URL", diff --git a/cloudsearch/v1/cloudsearch-gen.go b/cloudsearch/v1/cloudsearch-gen.go index 29bba901e30..e9da0c81ee1 100644 --- a/cloudsearch/v1/cloudsearch-gen.go +++ b/cloudsearch/v1/cloudsearch-gen.go @@ -755,6 +755,35 @@ func (s *ActionParameter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type AddonComposeUiActionMarkup struct { + // Possible values: + // "UNSPECIFIED" - Default. When unspecified, no action is taken. + // "DISMISS" - Dismisses the add-on compose UI. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AddonComposeUiActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod AddonComposeUiActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AffectedMembership: Earlier we used to populate just the // affected_members list and inferred the new membership state (roles // didn't exist back then) from the Type. go/dynamite-finra required @@ -3684,6 +3713,11 @@ type AppsDynamiteSharedOnClick struct { // Action: If specified, an action is triggered by this onClick. Action *AppsDynamiteSharedAction `json:"action,omitempty"` + // HostAppAction: Triggers host app action on click directly without + // invoking form actions. This is currently not available to end-users + // and is used internal only. + HostAppAction *HostAppActionMarkup `json:"hostAppAction,omitempty"` + // OpenDynamicLinkAction: An add-on triggers this action when the action // needs to open a link. This differs from the open_link above in that // this needs to talk to server to get the link. Thus some preparation @@ -4984,6 +5018,342 @@ func (s *AppsDynamiteV1ApiCompatV1Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkup struct { + AddonAttachments []*AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkupAddonAttachment `json:"addonAttachments,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AddonAttachments") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddonAttachments") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkupAddonAttachment struct { + // IconUrl: Link to the resource's icon. + IconUrl string `json:"iconUrl,omitempty"` + + // MimeType: MIME type of the content in resource_url. + MimeType string `json:"mimeType,omitempty"` + + ResourceUrl string `json:"resourceUrl,omitempty"` + + // Title: Title of the attachment. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IconUrl") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IconUrl") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkupAddonAttachment) MarshalJSON() ([]byte, error) { + type NoMethod AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkupAddonAttachment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkup: +// Markup that defines conference data associated to a Google Calendar +// event. +type AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkup struct { + // ConferenceId: Unique identifier for this conference data. Maximum 512 + // characters long. + ConferenceId string `json:"conferenceId,omitempty"` + + // ConferenceSolutionId: An identifier of the conferencing solution. + // Must match a value from the deployment's + // `calendar.conferenceSolution.id` field. + ConferenceSolutionId string `json:"conferenceSolutionId,omitempty"` + + // EntryPoints: Entry points to the conference. Maximum 300 entry points + // are allowed. + EntryPoints []*AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupEntryPointMarkup `json:"entryPoints,omitempty"` + + // Error: If set, it means an error occurred during conference creation. + Error *AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupError `json:"error,omitempty"` + + // Note: Additional notes (such as instructions from the administrator, + // legal notices) to display to the user. Can contain HTML. Max length + // 2048 characters. + Note string `json:"note,omitempty"` + + // Parameters: Additional add-on parameters. Maximum 300 parameters are + // allowed. + Parameters []*AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupParameter `json:"parameters,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConferenceId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConferenceId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkup) MarshalJSON() ([]byte, error) { + type NoMethod AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupEntr +// yPointMarkup: A way to join the conference. +type AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupEntryPointMarkup struct { + // AccessCode: An access code for accessing the conference. Maximum 128 + // characters long. + AccessCode string `json:"accessCode,omitempty"` + + // Features: Features of the entry point, such as being toll or + // toll-free. One entry point can have multiple features. + // + // Possible values: + // "UNKNOWN_FEATURE" - Unknown feature. + // "TOLL" - Applies to `PHONE` entry point. A call to a toll number is + // charged to the calling party. A number can't be toll and toll-free at + // the same time. + // "TOLL_FREE" - Applies to `PHONE` entry point. For the calling + // party, a call to a toll-free number is free of charge. A number can't + // be toll and toll-free at the same time. + Features []string `json:"features,omitempty"` + + // Label: The label of the entry point to display to the user. Maximum + // 512 characters long. + Label string `json:"label,omitempty"` + + // MeetingCode: A meeting code for accessing the conference. Maximum 128 + // characters long. + MeetingCode string `json:"meetingCode,omitempty"` + + // Passcode: A passcode for accessing the conference. Maximum 128 + // characters long. + Passcode string `json:"passcode,omitempty"` + + // Password: A password for accessing the conference. Maximum 128 + // characters long. + Password string `json:"password,omitempty"` + + // Pin: A PIN for accessing the conference. Maximum 128 characters long. + Pin string `json:"pin,omitempty"` + + // RegionCode: The CLDR/ISO 3166 region code for the country associated + // with this entry point. Applicable only to `Type.PHONE`. + RegionCode string `json:"regionCode,omitempty"` + + // Type: The type of the entry point. Required. + // + // Possible values: + // "UNKNOWN" - Unknown conference type. + // "VIDEO" - A video conference. + // "PHONE" - A phone conference. + // "MORE" - Used to provide a link to further conference joining + // information. + // "SIP" - A conference using [Session Initiation + // Protocol](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) + Type string `json:"type,omitempty"` + + // Uri: A URI for joining the conference. Supports tel: and http(s): and + // should be at most 1300 characters long. Required. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessCode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupEntryPointMarkup) MarshalJSON() ([]byte, error) { + type NoMethod AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupEntryPointMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupErro +// r: Represents an error that occurred during conference creation. +type AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupError struct { + // AuthenticationUrl: If the error type is `AUTHENTICATION`, the add-on + // can provide a URL allowing users to log in. Maximum 1300 characters + // long. + AuthenticationUrl string `json:"authenticationUrl,omitempty"` + + // Type: The type of error. Required. + // + // Possible values: + // "UNKNOWN" - Unknown error. + // "AUTHENTICATION" - An authentication error. + // "TEMPORARY" - A temporary error. + // "PERMANENT" - A permanent error. + // "PERMISSION_DENIED" - The user isn't allowed to perform some action + // in the third-party conferencing system. + // "CONFERENCE_SOLUTION_FORBIDDEN" - The user isn't allowed to use the + // selected conference solution (but might be allowed to use other + // solutions offered by the add-on). + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuthenticationUrl") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthenticationUrl") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupError) MarshalJSON() ([]byte, error) { + type NoMethod AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupPara +// meter: Solution-specific parameters that are persisted with the event +// data and, if an update or delete is needed, are passed to the add-on. +// For example: `[{key: 'sessionKey', value: '123'}, {key: 'meetingId', +// value: '456'}]` +type AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupParameter struct { + // Key: The key of the parameter. Maximum 50 characters long. Required. + Key string `json:"key,omitempty"` + + // Value: The value of the parameter. Maximum 1024 characters long. + // Required. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupParameter) MarshalJSON() ([]byte, error) { + type NoMethod AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkupParameter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AppsExtensionsMarkupCalendarClientActionMarkupEditAttendeesActionMarkup struct { + // AddAttendeeEmails: A list of attendees to add to the Google Calendar + // event. + AddAttendeeEmails []string `json:"addAttendeeEmails,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AddAttendeeEmails") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddAttendeeEmails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppsExtensionsMarkupCalendarClientActionMarkupEditAttendeesActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod AppsExtensionsMarkupCalendarClientActionMarkupEditAttendeesActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AppsExtensionsMarkupCalendarClientActionMarkupEditConferenceDataActionMarkup struct { + // ConferenceData: The conference data to add to the Google Calendar + // event. + ConferenceData *AppsExtensionsMarkupCalendarClientActionMarkupConferenceDataMarkup `json:"conferenceData,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConferenceData") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConferenceData") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppsExtensionsMarkupCalendarClientActionMarkupEditConferenceDataActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod AppsExtensionsMarkupCalendarClientActionMarkupEditConferenceDataActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Attachment: Attachments that follow the message text. type Attachment struct { // AddOnData: Revised version of Gmail AddOn attachment approved by API @@ -5475,6 +5845,7 @@ type BotResponse struct { // "DISABLED_BY_DEVELOPER" - Bot fails to respond because it is // disabled by the bot's developer // "PRIVATE" - Message to bot should be permanently private. + // "APP_SUGGESTION" - A suggestion to promote an app. ResponseType string `json:"responseType,omitempty"` // SetupUrl: URL for setting up bot. @@ -5642,6 +6013,44 @@ func (s *Button) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type CalendarClientActionMarkup struct { + // AddAttachmentsActionMarkup: An action that adds attachments to the + // Google Calendar event. + AddAttachmentsActionMarkup *AppsExtensionsMarkupCalendarClientActionMarkupAddAttachmentsActionMarkup `json:"addAttachmentsActionMarkup,omitempty"` + + // EditAttendeesActionMarkup: An action that adds attendees to the + // Google Calendar event. + EditAttendeesActionMarkup *AppsExtensionsMarkupCalendarClientActionMarkupEditAttendeesActionMarkup `json:"editAttendeesActionMarkup,omitempty"` + + // EditConferenceDataActionMarkup: An action that adds conference data + // to the Google Calendar event. + EditConferenceDataActionMarkup *AppsExtensionsMarkupCalendarClientActionMarkupEditConferenceDataActionMarkup `json:"editConferenceDataActionMarkup,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AddAttachmentsActionMarkup") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AddAttachmentsActionMarkup") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CalendarClientActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod CalendarClientActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CallInfo: Contains information regarding an ongoing conference (aka // call) for a meeting space. type CallInfo struct { @@ -5800,6 +6209,26 @@ type CallSettings struct { // AccessLock: Indicates whether the access lock is currently on or off. AccessLock bool `json:"accessLock,omitempty"` + // AccessType: The current access type of the conference. + // + // Possible values: + // "ACCESS_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "ACCESS_TYPE_OPEN" - Anyone with meeting join information (url, + // phone access...) can join, no knocking required. (Subject to + // organization policies) + // "ACCESS_TYPE_TRUSTED" - Members of the Host's organization, invited + // external users, and dial-in users can join without knocking, everyone + // else must knock. (Subject to organization policies) + // "ACCESS_TYPE_RESTRICTED" - Only participants invited by a host can + // automatically join, everyone else must knock and be admitted. + // (Subject to organization policies) Participants cannot dial out from + // the meeting. And only hosts can accept knocks. + AccessType string `json:"accessType,omitempty"` + + // AllowJoiningBeforeHost: Whether users can join this conference before + // a host (Host or Cohost). + AllowJoiningBeforeHost bool `json:"allowJoiningBeforeHost,omitempty"` + // AttendanceReportEnabled: Indicates whether the attendance report is // currently enabled or disabled. AttendanceReportEnabled bool `json:"attendanceReportEnabled,omitempty"` @@ -5814,7 +6243,8 @@ type CallSettings struct { // conference. CseEnabled bool `json:"cseEnabled,omitempty"` - // ModerationEnabled: Indicates whether the current call is moderated. + // ModerationEnabled: Indicates whether moderation is currently on or + // off. ModerationEnabled bool `json:"moderationEnabled,omitempty"` // PresentLock: Indicates whether the present lock is currently on or @@ -6050,6 +6480,10 @@ func (s *CardHeader) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ChatClientActionMarkup: Actions handled by Chat Clients. +type ChatClientActionMarkup struct { +} + // ChatConfig: Configuration of the in meeting chat. type ChatConfig struct { // ChatType: The Type of chat this Conference is currently using. @@ -7072,6 +7506,39 @@ func (s *CustomEmojiMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CustomFunctionReturnValueMarkup: The result of a user running a +// custom function. +type CustomFunctionReturnValueMarkup struct { + // ErrorMessage: The error message to show to the user if something went + // wrong. + ErrorMessage string `json:"errorMessage,omitempty"` + + // Value: The value that resulted from running the custom function. + Value interface{} `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorMessage") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorMessage") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomFunctionReturnValueMarkup) MarshalJSON() ([]byte, error) { + type NoMethod CustomFunctionReturnValueMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CustomerId: Represents a GSuite customer ID. Obfuscated with // CustomerIdObfuscator. type CustomerId struct { @@ -8185,6 +8652,33 @@ func (s *DoubleValues) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type DriveClientActionMarkup struct { + RequestFileScope *RequestFileScope `json:"requestFileScope,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestFileScope") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestFileScope") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DriveClientActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod DriveClientActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DriveFollowUpRestrict: Drive follow-up search restricts (e.g. // "followup:suggestions"). type DriveFollowUpRestrict struct { @@ -8569,6 +9063,34 @@ func (s *DynamiteSpacesScoringInfo) UnmarshalJSON(data []byte) error { type EditMetadata struct { } +type EditorClientActionMarkup struct { + RequestFileScopeForActiveDocument *RequestFileScopeForActiveDocument `json:"requestFileScopeForActiveDocument,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "RequestFileScopeForActiveDocument") to unconditionally include in + // API requests. By default, fields with empty or default values are + // omitted from API requests. However, any non-pointer, non-interface + // field appearing in ForceSendFields will be sent to the server + // regardless of whether the field is empty or not. This may be used to + // include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "RequestFileScopeForActiveDocument") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EditorClientActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod EditorClientActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // EmailAddress: A person's email address. type EmailAddress struct { // CustomType: If the value of type is custom, this property contains @@ -10422,6 +10944,40 @@ func (s *GetSearchApplicationUserStatsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GmailClientActionMarkup struct { + AddonComposeUiActionMarkup *AddonComposeUiActionMarkup `json:"addonComposeUiActionMarkup,omitempty"` + + OpenCreatedDraftActionMarkup *OpenCreatedDraftActionMarkup `json:"openCreatedDraftActionMarkup,omitempty"` + + TaskAction *TaskActionMarkup `json:"taskAction,omitempty"` + + UpdateDraftActionMarkup *UpdateDraftActionMarkup `json:"updateDraftActionMarkup,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AddonComposeUiActionMarkup") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AddonComposeUiActionMarkup") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GmailClientActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod GmailClientActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChatConfig: Configuration of the Google Chat in Meet. type GoogleChatConfig struct { // ChatGroupId: ID of the Chat group. @@ -10522,7 +11078,7 @@ func (s *GoogleChatV1ContextualAddOnMarkupCard) MarshalJSON() ([]byte, error) { // GoogleChatV1ContextualAddOnMarkupCardCardAction: A card action is the // action associated with the card. For an invoice card, a typical // action would be: delete invoice, email invoice or open the invoice in -// browser. +// browser. Not supported by Google Chat apps. type GoogleChatV1ContextualAddOnMarkupCardCardAction struct { // ActionLabel: The label used to be displayed in the action menu item. ActionLabel string `json:"actionLabel,omitempty"` @@ -11634,6 +12190,50 @@ func (s *HashtagData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HostAppActionMarkup: Actions handled by individual host apps. +type HostAppActionMarkup struct { + // CalendarAction: Actions handled by Calendar. + CalendarAction *CalendarClientActionMarkup `json:"calendarAction,omitempty"` + + // ChatAction: Actions handled by Chat. + ChatAction *ChatClientActionMarkup `json:"chatAction,omitempty"` + + // DriveAction: Actions handled by Drive. + DriveAction *DriveClientActionMarkup `json:"driveAction,omitempty"` + + // EditorAction: Actions handled by Docs, Sheets, or Slides. + EditorAction *EditorClientActionMarkup `json:"editorAction,omitempty"` + + // GmailAction: Actions handled by Gmail. + GmailAction *GmailClientActionMarkup `json:"gmailAction,omitempty"` + + // SheetsAction: Actions handled by Sheets. + SheetsAction *SheetsClientActionMarkup `json:"sheetsAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CalendarAction") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CalendarAction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *HostAppActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod HostAppActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HostProto: Represents a single host. Optionally, the MDB owner of the // host can be specified. type HostProto struct { @@ -12324,6 +12924,53 @@ func (s *IndexItemRequest) MarshalJSON() ([]byte, error) { type InitializeCustomerRequest struct { } +type InsertContent struct { + // Content: The content to be inserted. + Content string `json:"content,omitempty"` + + // ContentType: The type of inserted content. + // + // Possible values: + // "UNSPECIFIED_CONTENT_TYPE" - Default value when nothing is set for + // ContentType. + // "TEXT" - Specifies that the content is in plain text. + // "MUTABLE_HTML" - Specifies that the content is in HTML and is + // mutable (can be edited). + // "IMMUTABLE_HTML" - Specifies that the content is in HTML and is + // immutable (cannot be edited). + ContentType string `json:"contentType,omitempty"` + + // Possible values: + // "UNSPECIFIED_EMAIL_MIME_TYPE" - Default value when nothing is set + // for EmailMimeType. + // "PLAIN_TEXT" - Specifies that the inserted content is in plain + // text. + // "HTML" - Specifies that the inserted content is in HTML. + MimeType string `json:"mimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InsertContent) MarshalJSON() ([]byte, error) { + type NoMethod InsertContent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IntegerOperatorOptions: Used to provide a search operator for integer // properties. This is optional. Search operators let users restrict the // query to specific fields relevant to the type of item being searched. @@ -13977,7 +14624,7 @@ func (s *MembershipChangeEvent) MarshalJSON() ([]byte, error) { } // MembershipChangedMetadata: Annotation metadata to display system -// messages for membership changes. +// messages for membership changes. Next Tag: 8 type MembershipChangedMetadata struct { AffectedMemberProfiles []*Member `json:"affectedMemberProfiles,omitempty"` @@ -13994,6 +14641,15 @@ type MembershipChangedMetadata struct { // FetchOptions.USER is set. Otherwise, only the id will be filled in. InitiatorProfile *User `json:"initiatorProfile,omitempty"` + // InitiatorType: The type of the user who initiated this membership + // change. + // + // Possible values: + // "INITIATOR_TYPE_UNSPECIFIED" + // "INITIATOR_TYPE_END_USER" + // "INITIATOR_TYPE_ADMIN" + InitiatorType string `json:"initiatorType,omitempty"` + // Possible values: // "TYPE_UNSPECIFIED" - Default value for the enum. DO NOT USE. // "INVITED" - Non-member -> Can join. Multiple groups and users. @@ -15028,6 +15684,47 @@ func (s *OnClick) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type OpenCreatedDraftActionMarkup struct { + // DraftId: The ID of the newly created draft in the form "r123". + DraftId string `json:"draftId,omitempty"` + + // DraftStorageId: The server storage ID in hex format, for + // example,"15e9fa622ce1029d". + DraftStorageId string `json:"draftStorageId,omitempty"` + + // DraftThreadId: The ID of the thread containing the newly created + // draft, for example, "15e9fa622ce1029d". + DraftThreadId string `json:"draftThreadId,omitempty"` + + // DraftThreadServerPermId: The server permanent ID for the draft's + // thread. This field isn't set anywhere, and it's ignored when + // processing OpenCreatedDraftActionMarkup. Supply and use + // draftThreadStorageId instead. + DraftThreadServerPermId string `json:"draftThreadServerPermId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DraftId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DraftId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OpenCreatedDraftActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod OpenCreatedDraftActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type OpenLink struct { // LoadIndicator: Next available ID: 5 // @@ -16867,6 +17564,32 @@ func (s *ReadReceiptsSettingsUpdatedMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type Recipient struct { + Email string `json:"email,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Recipient) MarshalJSON() ([]byte, error) { + type NoMethod Recipient + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RecordingEvent: A recording event is something that happens to the // recording in a conference. type RecordingEvent struct { @@ -17119,6 +17842,35 @@ func (s *RepositoryError) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RequestFileScope struct { + ItemId string `json:"itemId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ItemId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ItemId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RequestFileScope) MarshalJSON() ([]byte, error) { + type NoMethod RequestFileScope + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RequestFileScopeForActiveDocument struct { +} + // RequestOptions: Shared request options for all RPC methods. type RequestOptions struct { // DebugOptions: Debug options of the request @@ -17273,13 +18025,10 @@ func (s *ResourceRoleProto) MarshalJSON() ([]byte, error) { // ResponseDebugInfo: Debugging information about the response. type ResponseDebugInfo struct { - // EnabledExperiments: Experiments enabled in QAPI. - EnabledExperiments []int64 `json:"enabledExperiments,omitempty"` - // FormattedDebugInfo: General debug info formatted for display. FormattedDebugInfo string `json:"formattedDebugInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnabledExperiments") + // ForceSendFields is a list of field names (e.g. "FormattedDebugInfo") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -17287,7 +18036,7 @@ type ResponseDebugInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnabledExperiments") to + // NullFields is a list of field names (e.g. "FormattedDebugInfo") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -17619,6 +18368,10 @@ type Roster struct { Id *RosterId `json:"id,omitempty"` + // IsMembershipVisibleToCaller: Whether caller has visibility into + // members of the roster. + IsMembershipVisibleToCaller bool `json:"isMembershipVisibleToCaller,omitempty"` + MembershipCount int64 `json:"membershipCount,omitempty"` Name string `json:"name,omitempty"` @@ -18614,22 +19367,40 @@ func (s *SessionStateInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Settings: Settings of a meeting space that can be viewed and edited -// by users with permissions. These settings are always populated for -// output. +// Settings: Settings of a meeting space that can be edited by users +// with corresponding manage privilege. These settings are always +// populated in responses. type Settings struct { - // AccessLock: The access lock of the meeting space that lets owner - // control who can join the meeting. True if the access lock feature is - // enabled for the meeting space. + // AccessLock: The access lock of the meeting space that lets hosts + // control who can join the meeting. AccessLock bool `json:"accessLock,omitempty"` + // AccessType: The access type of the meeting space. + // + // Possible values: + // "ACCESS_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "ACCESS_TYPE_OPEN" - Anyone with meeting join information (url, + // phone access...) can join, no knocking required. (Subject to + // organization policies) + // "ACCESS_TYPE_TRUSTED" - Members of the Host's organization, invited + // external users, and dial-in users can join without knocking, everyone + // else must knock. (Subject to organization policies) + // "ACCESS_TYPE_RESTRICTED" - Only participants invited by a host can + // automatically join, everyone else must knock and be admitted. + // (Subject to organization policies) Participants cannot dial out from + // the meeting. And only hosts can accept knocks. + AccessType string `json:"accessType,omitempty"` + + // AllowJoiningBeforeHost: Whether users can join before host in the + // conferences of this meeting space. + AllowJoiningBeforeHost bool `json:"allowJoiningBeforeHost,omitempty"` + // AttendanceReportEnabled: Whether attendance report is enabled for the // meeting space. AttendanceReportEnabled bool `json:"attendanceReportEnabled,omitempty"` // ChatLock: The chat lock of the meeting space that lets owner control - // whether the participants can send chat messages. True if the chat - // lock feature is enabled for the meeting space. + // whether the participants can send chat messages. ChatLock bool `json:"chatLock,omitempty"` // CohostArtifactSharingEnabled: Whether meeting artifacts will be @@ -18647,13 +19418,11 @@ type Settings struct { ModerationEnabled bool `json:"moderationEnabled,omitempty"` // PresentLock: The present lock of the meeting space that lets owner - // control whether the participants can present their screen. True if - // the present lock feature is enabled for the meeting space. + // control whether the participants can present their screen. PresentLock bool `json:"presentLock,omitempty"` // ReactionsLock: The reactions lock of the meeting space that lets - // owner control whether the participants can send reactions. True if - // the reactions lock feature is enabled for the meeting space. + // owner control whether the participants can send reactions. ReactionsLock bool `json:"reactionsLock,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessLock") to @@ -18718,6 +19487,34 @@ func (s *ShareScope) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SheetsClientActionMarkup struct { + CustomFunctionReturnValueMarkup *CustomFunctionReturnValueMarkup `json:"customFunctionReturnValueMarkup,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CustomFunctionReturnValueMarkup") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "CustomFunctionReturnValueMarkup") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SheetsClientActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod SheetsClientActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SigningKeyPossessorProto: Represents a principal who possesses a // signing key corresponding to the verification key or keyset described // here. @@ -19870,6 +20667,32 @@ func (s *SwitchWidget) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TaskActionMarkup struct { + ReloadTasks bool `json:"reloadTasks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ReloadTasks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ReloadTasks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TaskActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod TaskActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TextButton struct { // AltText: The alternative text used for accessibility Next field // number: 7. @@ -20594,19 +21417,116 @@ func (s *UnreserveItemsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type UpdateBccRecipients struct { + BccRecipients []*Recipient `json:"bccRecipients,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BccRecipients") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BccRecipients") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateBccRecipients) MarshalJSON() ([]byte, error) { + type NoMethod UpdateBccRecipients + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UpdateBody struct { + // InsertContents: A repeated field that contains a series of content to + // insert into the draft that the user is currently editing. The content + // can contain HTML content or plain text content. + InsertContents []*InsertContent `json:"insertContents,omitempty"` + + // Possible values: + // "UNSPECIFIED_ACTION_TYPE" - Default value when nothing is set for + // Type. + // "IN_PLACE_INSERT" - Indicates this action is to perform an in-place + // insertion. By default the content is inserted at the current cursor + // position, if there is selected content, it replaces the selected + // content. + // "INSERT_AT_START" - Indicates this action is to perform insert at + // the start of the message body. + // "INSERT_AT_END" - Indicates this action is to perform insert at the + // end of the message body. + // "REPLACE" - Indicates this action is to replace the message body. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InsertContents") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InsertContents") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UpdateBody) MarshalJSON() ([]byte, error) { + type NoMethod UpdateBody + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UpdateCcRecipients struct { + CcRecipients []*Recipient `json:"ccRecipients,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CcRecipients") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CcRecipients") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateCcRecipients) MarshalJSON() ([]byte, error) { + type NoMethod UpdateCcRecipients + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type UpdateDataSourceRequest struct { // DebugOptions: Common debug options. DebugOptions *DebugOptions `json:"debugOptions,omitempty"` Source *DataSource `json:"source,omitempty"` - // UpdateMask: Update mask to control which fields to update. If - // update_mask is non-empty then only the fields specified in the - // update_mask are updated. If you specify a field in the update_mask, - // but don't specify its value in the source that field will be cleared. - // If the update_mask is not present or empty or has the value * then - // all fields will be updated. Some example field paths: name, - // display_name + // UpdateMask: Only applies to `settings.datasources.patch` + // (https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.datasources/patch). + // Update mask to control which fields to update. Example field paths: + // `name`, `displayName`. * If `update_mask` is non-empty, then only the + // fields specified in the `update_mask` are updated. * If you specify a + // field in the `update_mask`, but don't specify its value in the + // source, that field is cleared. * If the `update_mask` is not present + // or empty or has the value `*`, then all fields are updated. UpdateMask string `json:"updateMask,omitempty"` // ForceSendFields is a list of field names (e.g. "DebugOptions") to @@ -20632,6 +21552,51 @@ func (s *UpdateDataSourceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type UpdateDraftActionMarkup struct { + // UpdateBccRecipients: If set, replaces the existing Bcc recipients of + // the draft the user is currently editing. + UpdateBccRecipients *UpdateBccRecipients `json:"updateBccRecipients,omitempty"` + + // UpdateBody: A field that contains a series of update actions to + // perform on the draft body that the user is currently editing. + UpdateBody *UpdateBody `json:"updateBody,omitempty"` + + // UpdateCcRecipients: If set, replaces the existing Cc recipients of + // the draft the user is currently editing. + UpdateCcRecipients *UpdateCcRecipients `json:"updateCcRecipients,omitempty"` + + // UpdateSubject: If set, replaces the existing subject of the draft the + // user is currently editing. + UpdateSubject *UpdateSubject `json:"updateSubject,omitempty"` + + // UpdateToRecipients: If set, replaces the existing To recipients of + // the draft the user is currently editing. + UpdateToRecipients *UpdateToRecipients `json:"updateToRecipients,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UpdateBccRecipients") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UpdateBccRecipients") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UpdateDraftActionMarkup) MarshalJSON() ([]byte, error) { + type NoMethod UpdateDraftActionMarkup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type UpdateSchemaRequest struct { // DebugOptions: Common debug options. DebugOptions *DebugOptions `json:"debugOptions,omitempty"` @@ -20666,6 +21631,58 @@ func (s *UpdateSchemaRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type UpdateSubject struct { + Subject string `json:"subject,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Subject") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Subject") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateSubject) MarshalJSON() ([]byte, error) { + type NoMethod UpdateSubject + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UpdateToRecipients struct { + ToRecipients []*Recipient `json:"toRecipients,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ToRecipients") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ToRecipients") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateToRecipients) MarshalJSON() ([]byte, error) { + type NoMethod UpdateToRecipients + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UploadItemRef: Represents an upload session reference. This reference // is created via upload method. This reference is valid for 30 days // after its creation. Updating of item content may refer to this @@ -20840,6 +21857,20 @@ type UrlMetadata struct { // IntImageWidth: Dimensions of the image: width. IntImageWidth int64 `json:"intImageWidth,omitempty"` + // LinkType: NEXT TAG : 18 + // + // Possible values: + // "UNDEFINED" + // "AUTO_DETECTED_PLAIN_TEXT" - Set by the server, when it detects a + // URL in the message text + // "RICH_TEXT" - Set by the client, when the user adds a link via the + // rich-text editing (RTE) toolbar + // "MARKDOWN" - Set by the server, when it detects a URL in + // markdown-syntax in the message text + // "NO_ASSOCIATED_TEXT" - Set by the server when a URL annotation + // received from client has 0 length and 0 start index + LinkType string `json:"linkType,omitempty"` + // MimeType: Mime type of the content (Currently mapped from Page Render // Service ItemType) Note that this is not necessarily the mime type of // the http resource. For example a text/html from youtube or vimeo may @@ -20863,8 +21894,6 @@ type UrlMetadata struct { // Url: The original URL. Url *SafeUrlProto `json:"url,omitempty"` - // UrlSource: NEXT TAG : 17 - // // Possible values: // "URL_SOURCE_UNKNOWN" // "USER_SUPPLIED_URL" @@ -26962,13 +27991,15 @@ func (c *SettingsDatasourcesPatchCall) DebugOptionsEnableDebugging(debugOptionsE return c } -// UpdateMask sets the optional parameter "updateMask": Update mask to -// control which fields to update. If update_mask is non-empty then only -// the fields specified in the update_mask are updated. If you specify a -// field in the update_mask, but don't specify its value in the source -// that field will be cleared. If the update_mask is not present or -// empty or has the value * then all fields will be updated. Some -// example field paths: name, display_name +// UpdateMask sets the optional parameter "updateMask": Only applies to +// `settings.datasources.patch` +// (https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.datasources/patch). +// Update mask to control which fields to update. Example field paths: +// `name`, `displayName`. * If `update_mask` is non-empty, then only the +// fields specified in the `update_mask` are updated. * If you specify a +// field in the `update_mask`, but don't specify its value in the +// source, that field is cleared. * If the `update_mask` is not present +// or empty or has the value `*`, then all fields are updated. func (c *SettingsDatasourcesPatchCall) UpdateMask(updateMask string) *SettingsDatasourcesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -27086,7 +28117,7 @@ func (c *SettingsDatasourcesPatchCall) Do(opts ...googleapi.CallOption) (*Operat // "type": "string" // }, // "updateMask": { - // "description": "Update mask to control which fields to update. If update_mask is non-empty then only the fields specified in the update_mask are updated. If you specify a field in the update_mask, but don't specify its value in the source that field will be cleared. If the update_mask is not present or empty or has the value * then all fields will be updated. Some example field paths: name, display_name", + // "description": "Only applies to [`settings.datasources.patch`](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.datasources/patch). Update mask to control which fields to update. Example field paths: `name`, `displayName`. * If `update_mask` is non-empty, then only the fields specified in the `update_mask` are updated. * If you specify a field in the `update_mask`, but don't specify its value in the source, that field is cleared. * If the `update_mask` is not present or empty or has the value `*`, then all fields are updated.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -27911,14 +28942,17 @@ func (r *SettingsSearchapplicationsService) Patch(name string, searchapplication return c } -// UpdateMask sets the optional parameter "updateMask": Update mask to -// control which fields to update. If update_mask is non-empty then only -// the fields specified in the update_mask are updated. If you specify a -// field in the update_mask, but don't specify its value in the -// search_application then that field will be cleared. If the -// update_mask is not present or empty or has the value * then all -// fields will be updated. Some example field paths: -// search_application.name, search_application.display_name +// UpdateMask sets the optional parameter "updateMask": Only applies to +// `settings.searchapplications.patch` +// (https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch). +// Update mask to control which fields to update. Example field paths: +// `search_application.name`, `search_application.displayName`. * If +// `update_mask` is non-empty, then only the fields specified in the +// `update_mask` are updated. * If you specify a field in the +// `update_mask`, but don't specify its value in the +// `search_application`, then that field is cleared. * If the +// `update_mask` is not present or empty or has the value `*`, then all +// fields are updated. func (c *SettingsSearchapplicationsPatchCall) UpdateMask(updateMask string) *SettingsSearchapplicationsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -28031,7 +29065,7 @@ func (c *SettingsSearchapplicationsPatchCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "updateMask": { - // "description": "Update mask to control which fields to update. If update_mask is non-empty then only the fields specified in the update_mask are updated. If you specify a field in the update_mask, but don't specify its value in the search_application then that field will be cleared. If the update_mask is not present or empty or has the value * then all fields will be updated. Some example field paths: search_application.name, search_application.display_name", + // "description": "Only applies to [`settings.searchapplications.patch`](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch). Update mask to control which fields to update. Example field paths: `search_application.name`, `search_application.displayName`. * If `update_mask` is non-empty, then only the fields specified in the `update_mask` are updated. * If you specify a field in the `update_mask`, but don't specify its value in the `search_application`, then that field is cleared. * If the `update_mask` is not present or empty or has the value `*`, then all fields are updated.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -28223,14 +29257,17 @@ func (r *SettingsSearchapplicationsService) Update(name string, searchapplicatio return c } -// UpdateMask sets the optional parameter "updateMask": Update mask to -// control which fields to update. If update_mask is non-empty then only -// the fields specified in the update_mask are updated. If you specify a -// field in the update_mask, but don't specify its value in the -// search_application then that field will be cleared. If the -// update_mask is not present or empty or has the value * then all -// fields will be updated. Some example field paths: -// search_application.name, search_application.display_name +// UpdateMask sets the optional parameter "updateMask": Only applies to +// `settings.searchapplications.patch` +// (https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch). +// Update mask to control which fields to update. Example field paths: +// `search_application.name`, `search_application.displayName`. * If +// `update_mask` is non-empty, then only the fields specified in the +// `update_mask` are updated. * If you specify a field in the +// `update_mask`, but don't specify its value in the +// `search_application`, then that field is cleared. * If the +// `update_mask` is not present or empty or has the value `*`, then all +// fields are updated. func (c *SettingsSearchapplicationsUpdateCall) UpdateMask(updateMask string) *SettingsSearchapplicationsUpdateCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -28343,7 +29380,7 @@ func (c *SettingsSearchapplicationsUpdateCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "updateMask": { - // "description": "Update mask to control which fields to update. If update_mask is non-empty then only the fields specified in the update_mask are updated. If you specify a field in the update_mask, but don't specify its value in the search_application then that field will be cleared. If the update_mask is not present or empty or has the value * then all fields will be updated. Some example field paths: search_application.name, search_application.display_name", + // "description": "Only applies to [`settings.searchapplications.patch`](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch). Update mask to control which fields to update. Example field paths: `search_application.name`, `search_application.displayName`. * If `update_mask` is non-empty, then only the fields specified in the `update_mask` are updated. * If you specify a field in the `update_mask`, but don't specify its value in the `search_application`, then that field is cleared. * If the `update_mask` is not present or empty or has the value `*`, then all fields are updated.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 713ebfbe4b0..988e421a4ab 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -40082,7 +40082,7 @@ } } }, - "revision": "20221011", + "revision": "20221018", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -45054,7 +45054,7 @@ "type": "array" }, "allowOriginRegexes": { - "description": "Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.", + "description": "Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.", "items": { "type": "string" }, @@ -50613,7 +50613,7 @@ "description": "The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL." }, "regexMatch": { - "description": "The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. regexMatch only applies to load balancers that have loadBalancingScheme set to INTERNAL_SELF_MANAGED.", + "description": "The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.", "type": "string" }, "suffixMatch": { @@ -50850,7 +50850,7 @@ "type": "boolean" }, "regexMatch": { - "description": "The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For more information about regular expression syntax, see Syntax. Only one of presentMatch, exactMatch, or regexMatch must be set. regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. ", + "description": "The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For more information about regular expression syntax, see Syntax. Only one of presentMatch, exactMatch, or regexMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. ", "type": "string" } }, @@ -51064,7 +51064,7 @@ "type": "array" }, "regexMatch": { - "description": "For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For more information about regular expression syntax, see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. regexMatch only applies to load balancers that have loadBalancingScheme set to INTERNAL_SELF_MANAGED.", + "description": "For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For more information about regular expression syntax, see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.", "type": "string" } }, @@ -58619,6 +58619,13 @@ "$ref": "LocationPolicyLocationConstraints", "description": "Constraints that the caller requires on the result distribution in this zone." }, + "names": { + "description": "Names of resources to be put in the location. Must contain unique, correct resource names. If used, targetShape must be left unset.", + "items": { + "type": "string" + }, + "type": "array" + }, "preference": { "description": "Preference for a given location. Set to either ALLOW or DENY.", "enum": [ @@ -66857,10 +66864,6 @@ "$ref": "QueuingPolicy", "description": "Queuing parameters for the requested capacity." }, - "region": { - "description": "[Output Only] URL of the region where the resource resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", - "type": "string" - }, "selfLink": { "description": "[Output only] Server-defined URL for the resource.", "type": "string" @@ -81579,7 +81582,7 @@ "type": "string" }, "stackType": { - "description": "The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used.", + "description": "The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6. If not specified, IPV4_ONLY will be used.", "enum": [ "IPV4_IPV6", "IPV4_ONLY" @@ -82132,7 +82135,7 @@ "type": "string" }, "peerExternalGatewayInterface": { - "description": "The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created.", + "description": "The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use depends on the external VPN gateway redundancy type.", "format": "int32", "type": "integer" }, @@ -82214,7 +82217,7 @@ "type": "string" }, "vpnGatewayInterface": { - "description": "The interface ID of the VPN gateway with which this VPN tunnel is associated.", + "description": "The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.", "format": "int32", "type": "integer" } diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 1d979a81a0f..d8350b37eaa 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -9211,7 +9211,9 @@ type CorsPolicy struct { // AllowOriginRegexes: Specifies a regular expression that matches // allowed origins. For more information about the regular expression // syntax, see Syntax. An origin is allowed if it matches either an item - // in allowOrigins or an item in allowOriginRegexes. + // in allowOrigins or an item in allowOriginRegexes. Regular expressions + // can only be used when the loadBalancingScheme is set to + // INTERNAL_SELF_MANAGED. AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` // AllowOrigins: Specifies the list of origins that is allowed to do @@ -18269,8 +18271,8 @@ type HttpHeaderMatch struct { // in the HTTP request, use a headerMatch with headerName set to PORT // and a regular expression that satisfies the RFC2616 Host header's // port specifier. Only one of exactMatch, prefixMatch, suffixMatch, - // regexMatch, presentMatch or rangeMatch must be set. regexMatch only - // applies to load balancers that have loadBalancingScheme set to + // regexMatch, presentMatch or rangeMatch must be set. Regular + // expressions can only be used when the loadBalancingScheme is set to // INTERNAL_SELF_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` @@ -18649,8 +18651,8 @@ type HttpQueryParameterMatch struct { // RegexMatch: The queryParameterMatch matches if the value of the // parameter matches the regular expression specified by regexMatch. For // more information about regular expression syntax, see Syntax. Only - // one of presentMatch, exactMatch, or regexMatch must be set. - // regexMatch only applies when the loadBalancingScheme is set to + // one of presentMatch, exactMatch, or regexMatch must be set. Regular + // expressions can only be used when the loadBalancingScheme is set to // INTERNAL_SELF_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` @@ -19127,8 +19129,8 @@ type HttpRouteRuleMatch struct { // after removing any query parameters and anchor supplied with the // original URL. For more information about regular expression syntax, // see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must - // be specified. regexMatch only applies to load balancers that have - // loadBalancingScheme set to INTERNAL_SELF_MANAGED. + // be specified. Regular expressions can only be used when the + // loadBalancingScheme is set to INTERNAL_SELF_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` // ForceSendFields is a list of field names (e.g. "FullPathMatch") to @@ -31009,6 +31011,11 @@ type LocationPolicyLocation struct { // distribution in this zone. Constraints *LocationPolicyLocationConstraints `json:"constraints,omitempty"` + // Names: Names of resources to be put in the location. Must contain + // unique, correct resource names. If used, targetShape must be left + // unset. + Names []string `json:"names,omitempty"` + // Preference: Preference for a given location. Set to either ALLOW or // DENY. // @@ -43813,12 +43820,6 @@ type QueuedResource struct { // QueuingPolicy: Queuing parameters for the requested capacity. QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` - // Region: [Output Only] URL of the region where the resource resides. - // Only applicable for regional resources. You must specify this field - // as part of the HTTP request URL. It is not settable as a field in the - // request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -66738,7 +66739,8 @@ type VpnGateway struct { SelfLink string `json:"selfLink,omitempty"` // StackType: The stack type for this VPN gateway to identify the IP - // protocols that are enabled. If not specified, IPV4_ONLY will be used. + // protocols that are enabled. Possible values are: IPV4_ONLY, + // IPV4_IPV6. If not specified, IPV4_ONLY will be used. // // Possible values: // "IPV4_IPV6" - Enable VPN gateway with both IPv4 and IPv6 protocols. @@ -67635,7 +67637,9 @@ type VpnTunnel struct { // PeerExternalGatewayInterface: The interface ID of the external VPN // gateway to which this VPN tunnel is connected. Provided by the client - // when the VPN tunnel is created. + // when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, + // `3`. The number of IDs in use depends on the external VPN gateway + // redundancy type. PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this @@ -67732,7 +67736,7 @@ type VpnTunnel struct { VpnGateway string `json:"vpnGateway,omitempty"` // VpnGatewayInterface: The interface ID of the VPN gateway with which - // this VPN tunnel is associated. + // this VPN tunnel is associated. Possible values are: `0`, `1`. VpnGatewayInterface int64 `json:"vpnGatewayInterface,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 2f7ef8575b0..8b3bcd3ae22 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -32223,7 +32223,7 @@ } } }, - "revision": "20221011", + "revision": "20221018", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -36720,7 +36720,7 @@ "type": "array" }, "allowOriginRegexes": { - "description": "Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.", + "description": "Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.", "items": { "type": "string" }, @@ -41037,7 +41037,7 @@ "description": "The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL." }, "regexMatch": { - "description": "The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. regexMatch only applies to load balancers that have loadBalancingScheme set to INTERNAL_SELF_MANAGED.", + "description": "The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.", "type": "string" }, "suffixMatch": { @@ -41270,7 +41270,7 @@ "type": "boolean" }, "regexMatch": { - "description": "The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For more information about regular expression syntax, see Syntax. Only one of presentMatch, exactMatch, or regexMatch must be set. regexMatch only applies when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. ", + "description": "The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For more information about regular expression syntax, see Syntax. Only one of presentMatch, exactMatch, or regexMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. ", "type": "string" } }, @@ -41462,7 +41462,7 @@ "type": "array" }, "regexMatch": { - "description": "For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For more information about regular expression syntax, see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. regexMatch only applies to load balancers that have loadBalancingScheme set to INTERNAL_SELF_MANAGED.", + "description": "For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For more information about regular expression syntax, see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.", "type": "string" } }, @@ -66250,7 +66250,7 @@ "type": "string" }, "stackType": { - "description": "The stack type for this VPN gateway to identify the IP protocols that are enabled. If not specified, IPV4_ONLY will be used.", + "description": "The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY, IPV4_IPV6. If not specified, IPV4_ONLY will be used.", "enum": [ "IPV4_IPV6", "IPV4_ONLY" @@ -66791,7 +66791,7 @@ "type": "string" }, "peerExternalGatewayInterface": { - "description": "The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created.", + "description": "The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use depends on the external VPN gateway redundancy type.", "format": "int32", "type": "integer" }, @@ -66873,7 +66873,7 @@ "type": "string" }, "vpnGatewayInterface": { - "description": "The interface ID of the VPN gateway with which this VPN tunnel is associated.", + "description": "The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.", "format": "int32", "type": "integer" } diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 1d5ea449471..88d99a4b225 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -8396,7 +8396,9 @@ type CorsPolicy struct { // AllowOriginRegexes: Specifies a regular expression that matches // allowed origins. For more information about the regular expression // syntax, see Syntax. An origin is allowed if it matches either an item - // in allowOrigins or an item in allowOriginRegexes. + // in allowOrigins or an item in allowOriginRegexes. Regular expressions + // can only be used when the loadBalancingScheme is set to + // INTERNAL_SELF_MANAGED. AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` // AllowOrigins: Specifies the list of origins that is allowed to do @@ -15482,8 +15484,8 @@ type HttpHeaderMatch struct { // in the HTTP request, use a headerMatch with headerName set to PORT // and a regular expression that satisfies the RFC2616 Host header's // port specifier. Only one of exactMatch, prefixMatch, suffixMatch, - // regexMatch, presentMatch or rangeMatch must be set. regexMatch only - // applies to load balancers that have loadBalancingScheme set to + // regexMatch, presentMatch or rangeMatch must be set. Regular + // expressions can only be used when the loadBalancingScheme is set to // INTERNAL_SELF_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` @@ -15858,8 +15860,8 @@ type HttpQueryParameterMatch struct { // RegexMatch: The queryParameterMatch matches if the value of the // parameter matches the regular expression specified by regexMatch. For // more information about regular expression syntax, see Syntax. Only - // one of presentMatch, exactMatch, or regexMatch must be set. - // regexMatch only applies when the loadBalancingScheme is set to + // one of presentMatch, exactMatch, or regexMatch must be set. Regular + // expressions can only be used when the loadBalancingScheme is set to // INTERNAL_SELF_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` @@ -16277,8 +16279,8 @@ type HttpRouteRuleMatch struct { // after removing any query parameters and anchor supplied with the // original URL. For more information about regular expression syntax, // see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must - // be specified. regexMatch only applies to load balancers that have - // loadBalancingScheme set to INTERNAL_SELF_MANAGED. + // be specified. Regular expressions can only be used when the + // loadBalancingScheme is set to INTERNAL_SELF_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` // ForceSendFields is a list of field names (e.g. "FullPathMatch") to @@ -54919,7 +54921,8 @@ type VpnGateway struct { SelfLink string `json:"selfLink,omitempty"` // StackType: The stack type for this VPN gateway to identify the IP - // protocols that are enabled. If not specified, IPV4_ONLY will be used. + // protocols that are enabled. Possible values are: IPV4_ONLY, + // IPV4_IPV6. If not specified, IPV4_ONLY will be used. // // Possible values: // "IPV4_IPV6" - Enable VPN gateway with both IPv4 and IPv6 protocols. @@ -55801,7 +55804,9 @@ type VpnTunnel struct { // PeerExternalGatewayInterface: The interface ID of the external VPN // gateway to which this VPN tunnel is connected. Provided by the client - // when the VPN tunnel is created. + // when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, + // `3`. The number of IDs in use depends on the external VPN gateway + // redundancy type. PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this @@ -55898,7 +55903,7 @@ type VpnTunnel struct { VpnGateway string `json:"vpnGateway,omitempty"` // VpnGatewayInterface: The interface ID of the VPN gateway with which - // this VPN tunnel is associated. + // this VPN tunnel is associated. Possible values are: `0`, `1`. VpnGatewayInterface int64 `json:"vpnGatewayInterface,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 96dc589807c..f1abd67310b 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -4455,7 +4455,7 @@ "promotions": { "methods": { "create": { - "description": "Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead.", + "description": "Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed.", "flatPath": "{merchantId}/promotions", "httpMethod": "POST", "id": "content.promotions.create", @@ -4573,6 +4573,46 @@ } } }, + "quotas": { + "methods": { + "list": { + "description": "Lists the quota limit and quota usage per method for your Merchant Center account.", + "flatPath": "{merchantId}/quotas", + "httpMethod": "GET", + "id": "content.quotas.list", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "merchantId": { + "description": "Required. The ID of the account that has quota. This account must be an admin.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "path": "{merchantId}/quotas", + "response": { + "$ref": "ListMethodQuotasResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, "regionalinventory": { "methods": { "custombatch": { @@ -5908,7 +5948,7 @@ } } }, - "revision": "20220905", + "revision": "20221024", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -9126,6 +9166,24 @@ }, "type": "object" }, + "ListMethodQuotasResponse": { + "description": "Response message for the ListMethodQuotas method.", + "id": "ListMethodQuotasResponse", + "properties": { + "methodQuotas": { + "description": "The current quota usage and limits per each method.", + "items": { + "$ref": "MethodQuota" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "ListRegionsResponse": { "description": "Response message for the `ListRegions` method.", "id": "ListRegionsResponse", @@ -9487,6 +9545,27 @@ }, "type": "object" }, + "MethodQuota": { + "description": "The quota information per method in the Content API.", + "id": "MethodQuota", + "properties": { + "method": { + "description": "The method name, for example “products.list”. Method name does not contain version because quota can be shared between different API versions of the same method.", + "type": "string" + }, + "quotaLimit": { + "description": "The current quota limit, for example the maximum number of calls for the method.", + "format": "int64", + "type": "string" + }, + "quotaUsage": { + "description": "The current quota usage, for example the number of calls for the method.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Metrics": { "description": "Performance metrics. Values are only set for metrics requested explicitly in the request's search query.", "id": "Metrics", @@ -13298,7 +13377,7 @@ "type": "object" }, "ProductView": { - "description": "Product fields. Values are only set for fields requested explicitly in the request's search query.", + "description": "Product fields. Values are only set for fields requested explicitly in the request's search query. Available only to selected merchants. Submit the [interest form](https://forms.gle/7Uy8htzAN8oNokz9A) to request access.", "id": "ProductView", "properties": { "aggregatedDestinationStatus": { @@ -14281,7 +14360,7 @@ }, "productView": { "$ref": "ProductView", - "description": "Product fields requested by the merchant in the query. Field values are only set if the merchant queries `ProductView`. `product_view` field is available only to allowlisted users who can query the `ProductView` table." + "description": "Product fields requested by the merchant in the query. Field values are only set if the merchant queries `ProductView`. Available only to selected merchants. Submit the [interest form](https://forms.gle/7Uy8htzAN8oNokz9A) to request access." }, "segments": { "$ref": "Segments", diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index b022dfab948..483e995fc7e 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -140,6 +140,7 @@ func New(client *http.Client) (*APIService, error) { s.Productstatuses = NewProductstatusesService(s) s.Promotions = NewPromotionsService(s) s.Pubsubnotificationsettings = NewPubsubnotificationsettingsService(s) + s.Quotas = NewQuotasService(s) s.Regionalinventory = NewRegionalinventoryService(s) s.Regions = NewRegionsService(s) s.Reports = NewReportsService(s) @@ -205,6 +206,8 @@ type APIService struct { Pubsubnotificationsettings *PubsubnotificationsettingsService + Quotas *QuotasService + Regionalinventory *RegionalinventoryService Regions *RegionsService @@ -502,6 +505,15 @@ type PubsubnotificationsettingsService struct { s *APIService } +func NewQuotasService(s *APIService) *QuotasService { + rs := &QuotasService{s: s} + return rs +} + +type QuotasService struct { + s *APIService +} + func NewRegionalinventoryService(s *APIService) *RegionalinventoryService { rs := &RegionalinventoryService{s: s} return rs @@ -6087,6 +6099,44 @@ func (s *ListCssesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListMethodQuotasResponse: Response message for the ListMethodQuotas +// method. +type ListMethodQuotasResponse struct { + // MethodQuotas: The current quota usage and limits per each method. + MethodQuotas []*MethodQuota `json:"methodQuotas,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "MethodQuotas") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MethodQuotas") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListMethodQuotasResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMethodQuotasResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListRegionsResponse: Response message for the `ListRegions` method. type ListRegionsResponse struct { // NextPageToken: A token, which can be sent as `page_token` to retrieve @@ -6717,6 +6767,44 @@ func (s *MerchantRejectionReason) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodQuota: The quota information per method in the Content API. +type MethodQuota struct { + // Method: The method name, for example “products.list”. Method name + // does not contain version because quota can be shared between + // different API versions of the same method. + Method string `json:"method,omitempty"` + + // QuotaLimit: The current quota limit, for example the maximum number + // of calls for the method. + QuotaLimit int64 `json:"quotaLimit,omitempty,string"` + + // QuotaUsage: The current quota usage, for example the number of calls + // for the method. + QuotaUsage int64 `json:"quotaUsage,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Method") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Method") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MethodQuota) MarshalJSON() ([]byte, error) { + type NoMethod MethodQuota + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Metrics: Performance metrics. Values are only set for metrics // requested explicitly in the request's search query. type Metrics struct { @@ -13139,7 +13227,9 @@ func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { } // ProductView: Product fields. Values are only set for fields requested -// explicitly in the request's search query. +// explicitly in the request's search query. Available only to selected +// merchants. Submit the interest form +// (https://forms.gle/7Uy8htzAN8oNokz9A) to request access. type ProductView struct { // AggregatedDestinationStatus: Aggregated destination status. // @@ -14559,8 +14649,8 @@ type ReportRow struct { // ProductView: Product fields requested by the merchant in the query. // Field values are only set if the merchant queries `ProductView`. - // `product_view` field is available only to allowlisted users who can - // query the `ProductView` table. + // Available only to selected merchants. Submit the interest form + // (https://forms.gle/7Uy8htzAN8oNokz9A) to request access. ProductView *ProductView `json:"productView,omitempty"` // Segments: Segmentation dimensions requested by the merchant in the @@ -38231,7 +38321,11 @@ type PromotionsCreateCall struct { } // Create: Inserts a promotion for your Merchant Center account. If the -// promotion already exists, then it updates the promotion instead. +// promotion already exists, then it updates the promotion instead. To +// [end or delete] +// (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) +// a promotion update the time period of the promotion to a time that +// has already passed. // // - merchantId: The ID of the account that contains the collection. func (r *PromotionsService) Create(merchantId int64, promotion *Promotion) *PromotionsCreateCall { @@ -38332,7 +38426,7 @@ func (c *PromotionsCreateCall) Do(opts ...googleapi.CallOption) (*Promotion, err } return ret, nil // { - // "description": "Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead.", + // "description": "Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed.", // "flatPath": "{merchantId}/promotions", // "httpMethod": "POST", // "id": "content.promotions.create", @@ -38811,6 +38905,202 @@ func (c *PubsubnotificationsettingsUpdateCall) Do(opts ...googleapi.CallOption) } +// method id "content.quotas.list": + +type QuotasListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the quota limit and quota usage per method for your +// Merchant Center account. +// +// - merchantId: The ID of the account that has quota. This account must +// be an admin. +func (r *QuotasService) List(merchantId int64) *QuotasListCall { + c := &QuotasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of quotas to return in the response, used for paging. Defaults to +// 500; values above 1000 will be coerced to 1000. +func (c *QuotasListCall) PageSize(pageSize int64) *QuotasListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token (if +// provided) to retrieve the subsequent page. All other parameters must +// match the original call that provided the page token. +func (c *QuotasListCall) PageToken(pageToken string) *QuotasListCall { + 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 *QuotasListCall) Fields(s ...googleapi.Field) *QuotasListCall { + 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 *QuotasListCall) IfNoneMatch(entityTag string) *QuotasListCall { + 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 *QuotasListCall) Context(ctx context.Context) *QuotasListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *QuotasListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *QuotasListCall) doRequest(alt string) (*http.Response, 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, "{merchantId}/quotas") + 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{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.quotas.list" call. +// Exactly one of *ListMethodQuotasResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListMethodQuotasResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *QuotasListCall) Do(opts ...googleapi.CallOption) (*ListMethodQuotasResponse, error) { + gensupport.SetOptions(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 := &ListMethodQuotasResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the quota limit and quota usage per method for your Merchant Center account.", + // "flatPath": "{merchantId}/quotas", + // "httpMethod": "GET", + // "id": "content.quotas.list", + // "parameterOrder": [ + // "merchantId" + // ], + // "parameters": { + // "merchantId": { + // "description": "Required. The ID of the account that has quota. This account must be an admin.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{merchantId}/quotas", + // "response": { + // "$ref": "ListMethodQuotasResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/content" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *QuotasListCall) Pages(ctx context.Context, f func(*ListMethodQuotasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "content.regionalinventory.custombatch": type RegionalinventoryCustombatchCall struct { diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index 682fcefa64a..bfe6797c764 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -1854,6 +1854,295 @@ "resources": { "assignedTargetingOptions": { "methods": { + "create": { + "description": "Assigns a targeting option to an insertion order. Returns the assigned targeting option if successful. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + "httpMethod": "POST", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order the assigned targeting option will belong to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + "request": { + "$ref": "AssignedTargetingOption" + }, + "response": { + "$ref": "AssignedTargetingOption" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "delete": { + "description": "Deletes an assigned targeting option from an insertion order. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + "httpMethod": "DELETE", + "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete", + "parameterOrder": [ + "advertiserId", + "insertionOrderId", + "targetingType", + "assignedTargetingOptionId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the insertion order belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "assignedTargetingOptionId": { + "description": "Required. The ID of the assigned targeting option to delete.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE", + "TARGETING_TYPE_POI", + "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", + "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + "TARGETING_TYPE_OMID", + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts \u0026 entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges.", + "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", + "Target ads to a specific native content position.", + "Target ads in an Open Measurement enabled inventory.", + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, "get": { "description": "Gets a single targeting option assigned to an insertion order.", "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", @@ -2436,6 +2725,44 @@ "https://www.googleapis.com/auth/display-video" ] }, + "duplicate": { + "description": "Duplicates a line item. Returns the newly created line item id if successful.", + "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", + "httpMethod": "POST", + "id": "displayvideo.advertisers.lineItems.duplicate", + "parameterOrder": [ + "advertiserId", + "lineItemId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser this line item belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "lineItemId": { + "description": "Required. The ID of the line item to duplicate.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}:duplicate", + "request": { + "$ref": "DuplicateLineItemRequest" + }, + "response": { + "$ref": "DuplicateLineItemResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, "generateDefault": { "description": "Creates a new line item with settings (including targeting) inherited from the insertion order and an `ENTITY_STATUS_DRAFT` entity_status. Returns the newly created line item if successful. There are default values based on the three fields: * The insertion order's insertion_order_type * The insertion order's automation_type * The given line_item_type", "flatPath": "v2/advertisers/{advertisersId}/lineItems:generateDefault", @@ -8161,7 +8488,7 @@ } } }, - "revision": "20220926", + "revision": "20221020", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -12423,6 +12750,29 @@ }, "type": "object" }, + "DuplicateLineItemRequest": { + "description": "Request message for LineItemService.DuplicateLineItem.", + "id": "DuplicateLineItemRequest", + "properties": { + "targetDisplayName": { + "description": "The display name of the resulting line item. Must be UTF-8 encoded with a maximum size of 240 bytes.", + "type": "string" + } + }, + "type": "object" + }, + "DuplicateLineItemResponse": { + "description": "Response message for LineItemService.DuplicateLineItem.", + "id": "DuplicateLineItemResponse", + "properties": { + "duplicateLineItemId": { + "description": "The ID of the successfully created line item.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "EditCustomerMatchMembersRequest": { "description": "Request message for FirstAndThirdPartyAudienceService.EditCustomerMatchMembers.", "id": "EditCustomerMatchMembersRequest", diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index fec36568e2d..663272481cf 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -7268,6 +7268,71 @@ func (s *DoubleVerifyVideoViewability) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DuplicateLineItemRequest: Request message for +// LineItemService.DuplicateLineItem. +type DuplicateLineItemRequest struct { + // TargetDisplayName: The display name of the resulting line item. Must + // be UTF-8 encoded with a maximum size of 240 bytes. + TargetDisplayName string `json:"targetDisplayName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetDisplayName") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetDisplayName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DuplicateLineItemRequest) MarshalJSON() ([]byte, error) { + type NoMethod DuplicateLineItemRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DuplicateLineItemResponse: Response message for +// LineItemService.DuplicateLineItem. +type DuplicateLineItemResponse struct { + // DuplicateLineItemId: The ID of the successfully created line item. + DuplicateLineItemId int64 `json:"duplicateLineItemId,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DuplicateLineItemId") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DuplicateLineItemId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DuplicateLineItemResponse) MarshalJSON() ([]byte, error) { + type NoMethod DuplicateLineItemResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // EditCustomerMatchMembersRequest: Request message for // FirstAndThirdPartyAudienceService.EditCustomerMatchMembers. type EditCustomerMatchMembersRequest struct { @@ -23824,112 +23889,120 @@ func (c *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) ( } -// method id "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get": +// method id "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create": -type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall struct { - s *Service - advertiserId int64 - insertionOrderId int64 - targetingType string - assignedTargetingOptionId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedtargetingoption *AssignedTargetingOption + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a single targeting option assigned to an insertion order. +// Create: Assigns a targeting option to an insertion order. Returns the +// assigned targeting option if successful. Supported targeting types: * +// `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * +// `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * +// `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * +// `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` +// * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_VIEWABILITY` // // - advertiserId: The ID of the advertiser the insertion order belongs // to. -// - assignedTargetingOptionId: An identifier unique to the targeting -// type in this insertion order that identifies the assigned targeting -// option being requested. // - insertionOrderId: The ID of the insertion order the assigned -// targeting option belongs to. +// targeting option will belong to. // - targetingType: Identifies the type of this assigned targeting -// option. -func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { - c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * +// `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, insertionOrderId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.insertionOrderId = insertionOrderId c.targetingType = targetingType - c.assignedTargetingOptionId = assignedTargetingOptionId + c.assignedtargetingoption = assignedtargetingoption return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { - 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), - "targetingType": c.targetingType, - "assignedTargetingOptionId": c.assignedTargetingOptionId, + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get" call. +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create" call. // Exactly one of *AssignedTargetingOption or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *AssignedTargetingOption.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23960,15 +24033,14 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall } return ret, nil // { - // "description": "Gets a single targeting option assigned to an insertion order.", - // "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", - // "httpMethod": "GET", - // "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", + // "description": "Assigns a targeting option to an insertion order. Returns the assigned targeting option if successful. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + // "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + // "httpMethod": "POST", + // "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.create", // "parameterOrder": [ // "advertiserId", // "insertionOrderId", - // "targetingType", - // "assignedTargetingOptionId" + // "targetingType" // ], // "parameters": { // "advertiserId": { @@ -23979,15 +24051,8 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall // "required": true, // "type": "string" // }, - // "assignedTargetingOptionId": { - // "description": "Required. An identifier unique to the targeting type in this insertion order that identifies the assigned targeting option being requested.", - // "location": "path", - // "pattern": "^[^/]+$", - // "required": true, - // "type": "string" - // }, // "insertionOrderId": { - // "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", + // "description": "Required. The ID of the insertion order the assigned targeting option will belong to.", // "format": "int64", // "location": "path", // "pattern": "^[^/]+$", @@ -23995,7 +24060,7 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall // "type": "string" // }, // "targetingType": { - // "description": "Required. Identifies the type of this assigned targeting option.", + // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", // "enum": [ // "TARGETING_TYPE_UNSPECIFIED", // "TARGETING_TYPE_CHANNEL", @@ -24098,7 +24163,10 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall // "type": "string" // } // }, - // "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + // "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + // "request": { + // "$ref": "AssignedTargetingOption" + // }, // "response": { // "$ref": "AssignedTargetingOption" // }, @@ -24109,150 +24177,725 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall } -// method id "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list": +// method id "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete": -type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall struct { - s *Service - advertiserId int64 - insertionOrderId int64 - targetingType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedTargetingOptionId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the targeting options assigned to an insertion order. +// Delete: Deletes an assigned targeting option from an insertion order. +// Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * +// `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` +// * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_VIEWABILITY` // // - advertiserId: The ID of the advertiser the insertion order belongs // to. -// - insertionOrderId: The ID of the insertion order to list assigned -// targeting options for. -// - targetingType: Identifies the type of assigned targeting options to -// list. -func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, insertionOrderId int64, targetingType string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { - c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - assignedTargetingOptionId: The ID of the assigned targeting option +// to delete. +// - insertionOrderId: The ID of the insertion order the assigned +// targeting option belongs to. +// - targetingType: Identifies the type of this assigned targeting +// option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * +// `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * +// `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * +// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * +// `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * +// `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * +// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * +// `TARGETING_TYPE_OPERATING_SYSTEM` * +// `TARGETING_TYPE_PARENTAL_STATUS` * +// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * +// `TARGETING_TYPE_VIEWABILITY`. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiserId = advertiserId c.insertionOrderId = insertionOrderId c.targetingType = targetingType - return c -} - -// Filter sets the optional parameter "filter": Allows filtering by -// assigned targeting option properties. Supported syntax: * Filter -// expressions are made up of one or more restrictions. * Restrictions -// can be combined by the logical operator `OR`. * A restriction has the -// form of `{field} {operator} {value}`. * The operator must be `EQUALS -// (=)`. * Supported fields: - `assignedTargetingOptionId` - -// `inheritance` Examples: * AssignedTargetingOptions with ID 1 or 2 -// `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * -// AssignedTargetingOptions with inheritance status of NOT_INHERITED or -// INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED" OR -// inheritance="INHERITED_FROM_PARTNER" The length of this field should -// be no more than 500 characters. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Field by which to sort -// the list. Acceptable values are: * `assignedTargetingOptionId` -// (default) The default sorting order is ascending. To specify -// descending order for a field, a suffix "desc" should be added to the -// field name. Example: `assignedTargetingOptionId desc`. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `5000`. If unspecified will default to `100`. -// Returns error code `INVALID_ARGUMENT` if an invalid value is -// specified. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results the server should return. Typically, -// this is the value of next_page_token returned from the previous call -// to `ListInsertionOrderAssignedTargetingOptions` method. If not -// specified, the first page of results will be returned. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.assignedTargetingOptionId = assignedTargetingOptionId return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { - 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "advertiserId": strconv.FormatInt(c.advertiserId, 10), - "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), - "targetingType": c.targetingType, + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, + "assignedTargetingOptionId": c.assignedTargetingOptionId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list" call. -// Exactly one of *ListInsertionOrderAssignedTargetingOptionsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListInsertionOrderAssignedTargetingOptionsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an assigned targeting option from an insertion order. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + // "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + // "httpMethod": "DELETE", + // "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.delete", + // "parameterOrder": [ + // "advertiserId", + // "insertionOrderId", + // "targetingType", + // "assignedTargetingOptionId" + // ], + // "parameters": { + // "advertiserId": { + // "description": "Required. The ID of the advertiser the insertion order belongs to.", + // "format": "int64", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // }, + // "assignedTargetingOptionId": { + // "description": "Required. The ID of the assigned targeting option to delete.", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // }, + // "insertionOrderId": { + // "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", + // "format": "int64", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // }, + // "targetingType": { + // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIEWABILITY`", + // "enum": [ + // "TARGETING_TYPE_UNSPECIFIED", + // "TARGETING_TYPE_CHANNEL", + // "TARGETING_TYPE_APP_CATEGORY", + // "TARGETING_TYPE_APP", + // "TARGETING_TYPE_URL", + // "TARGETING_TYPE_DAY_AND_TIME", + // "TARGETING_TYPE_AGE_RANGE", + // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + // "TARGETING_TYPE_GENDER", + // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + // "TARGETING_TYPE_USER_REWARDED_CONTENT", + // "TARGETING_TYPE_PARENTAL_STATUS", + // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + // "TARGETING_TYPE_DEVICE_TYPE", + // "TARGETING_TYPE_AUDIENCE_GROUP", + // "TARGETING_TYPE_BROWSER", + // "TARGETING_TYPE_HOUSEHOLD_INCOME", + // "TARGETING_TYPE_ON_SCREEN_POSITION", + // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + // "TARGETING_TYPE_ENVIRONMENT", + // "TARGETING_TYPE_CARRIER_AND_ISP", + // "TARGETING_TYPE_OPERATING_SYSTEM", + // "TARGETING_TYPE_DEVICE_MAKE_MODEL", + // "TARGETING_TYPE_KEYWORD", + // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + // "TARGETING_TYPE_VIEWABILITY", + // "TARGETING_TYPE_CATEGORY", + // "TARGETING_TYPE_INVENTORY_SOURCE", + // "TARGETING_TYPE_LANGUAGE", + // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + // "TARGETING_TYPE_GEO_REGION", + // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + // "TARGETING_TYPE_EXCHANGE", + // "TARGETING_TYPE_SUB_EXCHANGE", + // "TARGETING_TYPE_POI", + // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", + // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + // "TARGETING_TYPE_OMID", + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" + // ], + // "enumDescriptions": [ + // "Default value when type is not specified or is unknown in this version.", + // "Target a channel (a custom group of related websites or apps).", + // "Target an app category (for example, education or puzzle games).", + // "Target a specific app (for example, Angry Birds).", + // "Target a specific url (for example, quora.com).", + // "Target ads during a chosen time period on a specific day.", + // "Target ads to a specific age range (for example, 18-24).", + // "Target ads to the specified regions on a regional location list.", + // "Target ads to the specified points of interest on a proximity location list.", + // "Target ads to a specific gender (for example, female or male).", + // "Target a specific video player size for video ads.", + // "Target user rewarded content for video ads.", + // "Target ads to a specific parental status (for example, parent or not a parent).", + // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + // "Target ads in a specific content outstream position.", + // "Target ads to a specific device type (for example, tablet or connected TV).", + // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + // "Target ads to specific web browsers (for example, Chrome).", + // "Target ads to a specific household income range (for example, top 10%).", + // "Target ads in a specific on screen position.", + // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + // "Filter website content by sensitive categories (for example, adult).", + // "Target ads to a specific environment (for example, web or app).", + // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + // "Target ads to a specific operating system (for example, macOS).", + // "Target ads to a specific device make or model (for example, Roku or Samsung).", + // "Target ads to a specific keyword (for example, dog or retriever).", + // "Target ads to a specific negative keyword list.", + // "Target ads to a specific viewability (for example, 80% viewable).", + // "Target ads to a specific content category (for example, arts \u0026 entertainment).", + // "Purchase impressions from specific deals and auction packages.", + // "Target ads to a specific language (for example, English or Japanese).", + // "Target ads to ads.txt authorized sellers.", + // "Target ads to a specific regional location (for example, a city or state).", + // "Purchase impressions from a group of deals and auction packages.", + // "Purchase impressions from specific exchanges.", + // "Purchase impressions from specific sub-exchanges.", + // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", + // "Target ads to a specific native content position.", + // "Target ads in an Open Measurement enabled inventory.", + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." + // ], + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/display-video" + // ] + // } + +} + +// method id "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get": + +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + assignedTargetingOptionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a single targeting option assigned to an insertion order. +// +// - advertiserId: The ID of the advertiser the insertion order belongs +// to. +// - assignedTargetingOptionId: An identifier unique to the targeting +// type in this insertion order that identifies the assigned targeting +// option being requested. +// - insertionOrderId: The ID of the insertion order the assigned +// targeting option belongs to. +// - targetingType: Identifies the type of this assigned targeting +// option. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.insertionOrderId = insertionOrderId + c.targetingType = targetingType + c.assignedTargetingOptionId = assignedTargetingOptionId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { + 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { + 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, + "assignedTargetingOptionId": c.assignedTargetingOptionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get" call. +// Exactly one of *AssignedTargetingOption or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AssignedTargetingOption.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { + gensupport.SetOptions(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 := &AssignedTargetingOption{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a single targeting option assigned to an insertion order.", + // "flatPath": "v2/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + // "httpMethod": "GET", + // "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", + // "parameterOrder": [ + // "advertiserId", + // "insertionOrderId", + // "targetingType", + // "assignedTargetingOptionId" + // ], + // "parameters": { + // "advertiserId": { + // "description": "Required. The ID of the advertiser the insertion order belongs to.", + // "format": "int64", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // }, + // "assignedTargetingOptionId": { + // "description": "Required. An identifier unique to the targeting type in this insertion order that identifies the assigned targeting option being requested.", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // }, + // "insertionOrderId": { + // "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", + // "format": "int64", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // }, + // "targetingType": { + // "description": "Required. Identifies the type of this assigned targeting option.", + // "enum": [ + // "TARGETING_TYPE_UNSPECIFIED", + // "TARGETING_TYPE_CHANNEL", + // "TARGETING_TYPE_APP_CATEGORY", + // "TARGETING_TYPE_APP", + // "TARGETING_TYPE_URL", + // "TARGETING_TYPE_DAY_AND_TIME", + // "TARGETING_TYPE_AGE_RANGE", + // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + // "TARGETING_TYPE_GENDER", + // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + // "TARGETING_TYPE_USER_REWARDED_CONTENT", + // "TARGETING_TYPE_PARENTAL_STATUS", + // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + // "TARGETING_TYPE_DEVICE_TYPE", + // "TARGETING_TYPE_AUDIENCE_GROUP", + // "TARGETING_TYPE_BROWSER", + // "TARGETING_TYPE_HOUSEHOLD_INCOME", + // "TARGETING_TYPE_ON_SCREEN_POSITION", + // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + // "TARGETING_TYPE_ENVIRONMENT", + // "TARGETING_TYPE_CARRIER_AND_ISP", + // "TARGETING_TYPE_OPERATING_SYSTEM", + // "TARGETING_TYPE_DEVICE_MAKE_MODEL", + // "TARGETING_TYPE_KEYWORD", + // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + // "TARGETING_TYPE_VIEWABILITY", + // "TARGETING_TYPE_CATEGORY", + // "TARGETING_TYPE_INVENTORY_SOURCE", + // "TARGETING_TYPE_LANGUAGE", + // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + // "TARGETING_TYPE_GEO_REGION", + // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + // "TARGETING_TYPE_EXCHANGE", + // "TARGETING_TYPE_SUB_EXCHANGE", + // "TARGETING_TYPE_POI", + // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", + // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", + // "TARGETING_TYPE_OMID", + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" + // ], + // "enumDescriptions": [ + // "Default value when type is not specified or is unknown in this version.", + // "Target a channel (a custom group of related websites or apps).", + // "Target an app category (for example, education or puzzle games).", + // "Target a specific app (for example, Angry Birds).", + // "Target a specific url (for example, quora.com).", + // "Target ads during a chosen time period on a specific day.", + // "Target ads to a specific age range (for example, 18-24).", + // "Target ads to the specified regions on a regional location list.", + // "Target ads to the specified points of interest on a proximity location list.", + // "Target ads to a specific gender (for example, female or male).", + // "Target a specific video player size for video ads.", + // "Target user rewarded content for video ads.", + // "Target ads to a specific parental status (for example, parent or not a parent).", + // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + // "Target ads in a specific content outstream position.", + // "Target ads to a specific device type (for example, tablet or connected TV).", + // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + // "Target ads to specific web browsers (for example, Chrome).", + // "Target ads to a specific household income range (for example, top 10%).", + // "Target ads in a specific on screen position.", + // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + // "Filter website content by sensitive categories (for example, adult).", + // "Target ads to a specific environment (for example, web or app).", + // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + // "Target ads to a specific operating system (for example, macOS).", + // "Target ads to a specific device make or model (for example, Roku or Samsung).", + // "Target ads to a specific keyword (for example, dog or retriever).", + // "Target ads to a specific negative keyword list.", + // "Target ads to a specific viewability (for example, 80% viewable).", + // "Target ads to a specific content category (for example, arts \u0026 entertainment).", + // "Purchase impressions from specific deals and auction packages.", + // "Target ads to a specific language (for example, English or Japanese).", + // "Target ads to ads.txt authorized sellers.", + // "Target ads to a specific regional location (for example, a city or state).", + // "Purchase impressions from a group of deals and auction packages.", + // "Purchase impressions from specific exchanges.", + // "Purchase impressions from specific sub-exchanges.", + // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", + // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", + // "Target ads to a specific native content position.", + // "Target ads in an Open Measurement enabled inventory.", + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." + // ], + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + // "response": { + // "$ref": "AssignedTargetingOption" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/display-video" + // ] + // } + +} + +// method id "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list": + +type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall struct { + s *Service + advertiserId int64 + insertionOrderId int64 + targetingType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the targeting options assigned to an insertion order. +// +// - advertiserId: The ID of the advertiser the insertion order belongs +// to. +// - insertionOrderId: The ID of the insertion order to list assigned +// targeting options for. +// - targetingType: Identifies the type of assigned targeting options to +// list. +func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, insertionOrderId int64, targetingType string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.insertionOrderId = insertionOrderId + c.targetingType = targetingType + return c +} + +// Filter sets the optional parameter "filter": Allows filtering by +// assigned targeting option properties. Supported syntax: * Filter +// expressions are made up of one or more restrictions. * Restrictions +// can be combined by the logical operator `OR`. * A restriction has the +// form of `{field} {operator} {value}`. * The operator must be `EQUALS +// (=)`. * Supported fields: - `assignedTargetingOptionId` - +// `inheritance` Examples: * AssignedTargetingOptions with ID 1 or 2 +// `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * +// AssignedTargetingOptions with inheritance status of NOT_INHERITED or +// INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED" OR +// inheritance="INHERITED_FROM_PARTNER" The length of this field should +// be no more than 500 characters. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field by which to sort +// the list. Acceptable values are: * `assignedTargetingOptionId` +// (default) The default sorting order is ascending. To specify +// descending order for a field, a suffix "desc" should be added to the +// field name. Example: `assignedTargetingOptionId desc`. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Must be between `1` and `5000`. If unspecified will default to `100`. +// Returns error code `INVALID_ARGUMENT` if an invalid value is +// specified. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. Typically, +// this is the value of next_page_token returned from the previous call +// to `ListInsertionOrderAssignedTargetingOptions` method. If not +// specified, the first page of results will be returned. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + 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 *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions") + 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{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), + "targetingType": c.targetingType, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list" call. +// Exactly one of *ListInsertionOrderAssignedTargetingOptionsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListInsertionOrderAssignedTargetingOptionsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. @@ -25718,6 +26361,163 @@ func (c *AdvertisersLineItemsDeleteCall) Do(opts ...googleapi.CallOption) (*Empt } +// method id "displayvideo.advertisers.lineItems.duplicate": + +type AdvertisersLineItemsDuplicateCall struct { + s *Service + advertiserId int64 + lineItemId int64 + duplicatelineitemrequest *DuplicateLineItemRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Duplicate: Duplicates a line item. Returns the newly created line +// item id if successful. +// +// - advertiserId: The ID of the advertiser this line item belongs to. +// - lineItemId: The ID of the line item to duplicate. +func (r *AdvertisersLineItemsService) Duplicate(advertiserId int64, lineItemId int64, duplicatelineitemrequest *DuplicateLineItemRequest) *AdvertisersLineItemsDuplicateCall { + c := &AdvertisersLineItemsDuplicateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.advertiserId = advertiserId + c.lineItemId = lineItemId + c.duplicatelineitemrequest = duplicatelineitemrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AdvertisersLineItemsDuplicateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsDuplicateCall { + 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 *AdvertisersLineItemsDuplicateCall) Context(ctx context.Context) *AdvertisersLineItemsDuplicateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AdvertisersLineItemsDuplicateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AdvertisersLineItemsDuplicateCall) doRequest(alt string) (*http.Response, 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.duplicatelineitemrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}:duplicate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "lineItemId": strconv.FormatInt(c.lineItemId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "displayvideo.advertisers.lineItems.duplicate" call. +// Exactly one of *DuplicateLineItemResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *DuplicateLineItemResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AdvertisersLineItemsDuplicateCall) Do(opts ...googleapi.CallOption) (*DuplicateLineItemResponse, error) { + gensupport.SetOptions(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 := &DuplicateLineItemResponse{ + ServerResponse: 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": "Duplicates a line item. Returns the newly created line item id if successful.", + // "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", + // "httpMethod": "POST", + // "id": "displayvideo.advertisers.lineItems.duplicate", + // "parameterOrder": [ + // "advertiserId", + // "lineItemId" + // ], + // "parameters": { + // "advertiserId": { + // "description": "Required. The ID of the advertiser this line item belongs to.", + // "format": "int64", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // }, + // "lineItemId": { + // "description": "Required. The ID of the line item to duplicate.", + // "format": "int64", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}:duplicate", + // "request": { + // "$ref": "DuplicateLineItemRequest" + // }, + // "response": { + // "$ref": "DuplicateLineItemResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/display-video" + // ] + // } + +} + // method id "displayvideo.advertisers.lineItems.generateDefault": type AdvertisersLineItemsGenerateDefaultCall struct { diff --git a/doubleclicksearch/v2/doubleclicksearch-api.json b/doubleclicksearch/v2/doubleclicksearch-api.json index b4aaf8c0230..4b3059570f5 100644 --- a/doubleclicksearch/v2/doubleclicksearch-api.json +++ b/doubleclicksearch/v2/doubleclicksearch-api.json @@ -106,6 +106,218 @@ "resources": { "conversion": { "methods": { + "GetCustomerId": { + "description": "Retrieves a list of conversions from a DoubleClick Search engine account.", + "flatPath": "doubleclicksearch/v2/customer/{customerId}/conversion", + "httpMethod": "GET", + "id": "doubleclicksearch.conversion.GetCustomerId", + "parameterOrder": [ + "customerId", + "endDate", + "rowCount", + "startDate", + "startRow" + ], + "parameters": { + "adGroupId": { + "description": "Numeric ID of the ad group.", + "format": "int64", + "location": "query", + "type": "string" + }, + "adId": { + "description": "Numeric ID of the ad.", + "format": "int64", + "location": "query", + "type": "string" + }, + "advertiserId": { + "description": "Numeric ID of the advertiser.", + "format": "int64", + "location": "query", + "type": "string" + }, + "agencyId": { + "description": "Numeric ID of the agency.", + "format": "int64", + "location": "query", + "type": "string" + }, + "campaignId": { + "description": "Numeric ID of the campaign.", + "format": "int64", + "location": "query", + "type": "string" + }, + "criterionId": { + "description": "Numeric ID of the criterion.", + "format": "int64", + "location": "query", + "type": "string" + }, + "customerId": { + "description": "Customer ID of a client account in the new Search Ads 360 experience.", + "location": "path", + "required": true, + "type": "string" + }, + "endDate": { + "description": "Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd.", + "format": "int32", + "location": "query", + "maximum": "99991231", + "minimum": "20091101", + "required": true, + "type": "integer" + }, + "engineAccountId": { + "description": "Numeric ID of the engine account.", + "format": "int64", + "location": "query", + "type": "string" + }, + "rowCount": { + "description": "The number of conversions to return per call.", + "format": "int32", + "location": "query", + "maximum": "1000", + "minimum": "1", + "required": true, + "type": "integer" + }, + "startDate": { + "description": "First date (inclusive) on which to retrieve conversions. Format is yyyymmdd.", + "format": "int32", + "location": "query", + "maximum": "99991231", + "minimum": "20091101", + "required": true, + "type": "integer" + }, + "startRow": { + "description": "The 0-based starting index for retrieving conversions results.", + "format": "uint32", + "location": "query", + "required": true, + "type": "integer" + } + }, + "path": "doubleclicksearch/v2/customer/{customerId}/conversion", + "response": { + "$ref": "ConversionList" + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclicksearch" + ] + }, + "get": { + "description": "Retrieves a list of conversions from a DoubleClick Search engine account.", + "flatPath": "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion", + "httpMethod": "GET", + "id": "doubleclicksearch.conversion.get", + "parameterOrder": [ + "agencyId", + "advertiserId", + "engineAccountId", + "endDate", + "rowCount", + "startDate", + "startRow" + ], + "parameters": { + "adGroupId": { + "description": "Numeric ID of the ad group.", + "format": "int64", + "location": "query", + "type": "string" + }, + "adId": { + "description": "Numeric ID of the ad.", + "format": "int64", + "location": "query", + "type": "string" + }, + "advertiserId": { + "description": "Numeric ID of the advertiser.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "agencyId": { + "description": "Numeric ID of the agency.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "campaignId": { + "description": "Numeric ID of the campaign.", + "format": "int64", + "location": "query", + "type": "string" + }, + "criterionId": { + "description": "Numeric ID of the criterion.", + "format": "int64", + "location": "query", + "type": "string" + }, + "customerId": { + "description": "Customer ID of a client account in the new Search Ads 360 experience.", + "location": "query", + "type": "string" + }, + "endDate": { + "description": "Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd.", + "format": "int32", + "location": "query", + "maximum": "99991231", + "minimum": "20091101", + "required": true, + "type": "integer" + }, + "engineAccountId": { + "description": "Numeric ID of the engine account.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "rowCount": { + "description": "The number of conversions to return per call.", + "format": "int32", + "location": "query", + "maximum": "1000", + "minimum": "1", + "required": true, + "type": "integer" + }, + "startDate": { + "description": "First date (inclusive) on which to retrieve conversions. Format is yyyymmdd.", + "format": "int32", + "location": "query", + "maximum": "99991231", + "minimum": "20091101", + "required": true, + "type": "integer" + }, + "startRow": { + "description": "The 0-based starting index for retrieving conversions results.", + "format": "uint32", + "location": "query", + "required": true, + "type": "integer" + } + }, + "path": "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion", + "response": { + "$ref": "ConversionList" + }, + "scopes": [ + "https://www.googleapis.com/auth/doubleclicksearch" + ] + }, "insert": { "description": "Inserts a batch of new conversions into DoubleClick Search.", "flatPath": "doubleclicksearch/v2/conversion", @@ -331,7 +543,7 @@ } } }, - "revision": "20221011", + "revision": "20221025", "rootUrl": "https://doubleclicksearch.googleapis.com/", "schemas": { "Availability": { diff --git a/doubleclicksearch/v2/doubleclicksearch-gen.go b/doubleclicksearch/v2/doubleclicksearch-gen.go index c4d12885136..b723e274493 100644 --- a/doubleclicksearch/v2/doubleclicksearch-gen.go +++ b/doubleclicksearch/v2/doubleclicksearch-gen.go @@ -1081,6 +1081,575 @@ func (s *UpdateAvailabilityResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "doubleclicksearch.conversion.GetCustomerId": + +type ConversionGetCustomerIdCall struct { + s *Service + customerId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCustomerId: Retrieves a list of conversions from a DoubleClick +// Search engine account. +// +// - customerId: Customer ID of a client account in the new Search Ads +// 360 experience. +// - endDate: Last date (inclusive) on which to retrieve conversions. +// Format is yyyymmdd. +// - rowCount: The number of conversions to return per call. +// - startDate: First date (inclusive) on which to retrieve conversions. +// Format is yyyymmdd. +// - startRow: The 0-based starting index for retrieving conversions +// results. +func (r *ConversionService) GetCustomerId(customerId string, endDate int64, rowCount int64, startDate int64, startRow int64) *ConversionGetCustomerIdCall { + c := &ConversionGetCustomerIdCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customerId = customerId + c.urlParams_.Set("endDate", fmt.Sprint(endDate)) + c.urlParams_.Set("rowCount", fmt.Sprint(rowCount)) + c.urlParams_.Set("startDate", fmt.Sprint(startDate)) + c.urlParams_.Set("startRow", fmt.Sprint(startRow)) + return c +} + +// AdGroupId sets the optional parameter "adGroupId": Numeric ID of the +// ad group. +func (c *ConversionGetCustomerIdCall) AdGroupId(adGroupId int64) *ConversionGetCustomerIdCall { + c.urlParams_.Set("adGroupId", fmt.Sprint(adGroupId)) + return c +} + +// AdId sets the optional parameter "adId": Numeric ID of the ad. +func (c *ConversionGetCustomerIdCall) AdId(adId int64) *ConversionGetCustomerIdCall { + c.urlParams_.Set("adId", fmt.Sprint(adId)) + return c +} + +// AdvertiserId sets the optional parameter "advertiserId": Numeric ID +// of the advertiser. +func (c *ConversionGetCustomerIdCall) AdvertiserId(advertiserId int64) *ConversionGetCustomerIdCall { + c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) + return c +} + +// AgencyId sets the optional parameter "agencyId": Numeric ID of the +// agency. +func (c *ConversionGetCustomerIdCall) AgencyId(agencyId int64) *ConversionGetCustomerIdCall { + c.urlParams_.Set("agencyId", fmt.Sprint(agencyId)) + return c +} + +// CampaignId sets the optional parameter "campaignId": Numeric ID of +// the campaign. +func (c *ConversionGetCustomerIdCall) CampaignId(campaignId int64) *ConversionGetCustomerIdCall { + c.urlParams_.Set("campaignId", fmt.Sprint(campaignId)) + return c +} + +// CriterionId sets the optional parameter "criterionId": Numeric ID of +// the criterion. +func (c *ConversionGetCustomerIdCall) CriterionId(criterionId int64) *ConversionGetCustomerIdCall { + c.urlParams_.Set("criterionId", fmt.Sprint(criterionId)) + return c +} + +// EngineAccountId sets the optional parameter "engineAccountId": +// Numeric ID of the engine account. +func (c *ConversionGetCustomerIdCall) EngineAccountId(engineAccountId int64) *ConversionGetCustomerIdCall { + c.urlParams_.Set("engineAccountId", fmt.Sprint(engineAccountId)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ConversionGetCustomerIdCall) Fields(s ...googleapi.Field) *ConversionGetCustomerIdCall { + 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 *ConversionGetCustomerIdCall) IfNoneMatch(entityTag string) *ConversionGetCustomerIdCall { + 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 *ConversionGetCustomerIdCall) Context(ctx context.Context) *ConversionGetCustomerIdCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ConversionGetCustomerIdCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ConversionGetCustomerIdCall) doRequest(alt string) (*http.Response, 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, "doubleclicksearch/v2/customer/{customerId}/conversion") + 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{ + "customerId": c.customerId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "doubleclicksearch.conversion.GetCustomerId" call. +// Exactly one of *ConversionList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ConversionList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ConversionGetCustomerIdCall) Do(opts ...googleapi.CallOption) (*ConversionList, error) { + gensupport.SetOptions(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 := &ConversionList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of conversions from a DoubleClick Search engine account.", + // "flatPath": "doubleclicksearch/v2/customer/{customerId}/conversion", + // "httpMethod": "GET", + // "id": "doubleclicksearch.conversion.GetCustomerId", + // "parameterOrder": [ + // "customerId", + // "endDate", + // "rowCount", + // "startDate", + // "startRow" + // ], + // "parameters": { + // "adGroupId": { + // "description": "Numeric ID of the ad group.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "adId": { + // "description": "Numeric ID of the ad.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "advertiserId": { + // "description": "Numeric ID of the advertiser.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "agencyId": { + // "description": "Numeric ID of the agency.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "campaignId": { + // "description": "Numeric ID of the campaign.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "criterionId": { + // "description": "Numeric ID of the criterion.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "customerId": { + // "description": "Customer ID of a client account in the new Search Ads 360 experience.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "endDate": { + // "description": "Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd.", + // "format": "int32", + // "location": "query", + // "maximum": "99991231", + // "minimum": "20091101", + // "required": true, + // "type": "integer" + // }, + // "engineAccountId": { + // "description": "Numeric ID of the engine account.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "rowCount": { + // "description": "The number of conversions to return per call.", + // "format": "int32", + // "location": "query", + // "maximum": "1000", + // "minimum": "1", + // "required": true, + // "type": "integer" + // }, + // "startDate": { + // "description": "First date (inclusive) on which to retrieve conversions. Format is yyyymmdd.", + // "format": "int32", + // "location": "query", + // "maximum": "99991231", + // "minimum": "20091101", + // "required": true, + // "type": "integer" + // }, + // "startRow": { + // "description": "The 0-based starting index for retrieving conversions results.", + // "format": "uint32", + // "location": "query", + // "required": true, + // "type": "integer" + // } + // }, + // "path": "doubleclicksearch/v2/customer/{customerId}/conversion", + // "response": { + // "$ref": "ConversionList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/doubleclicksearch" + // ] + // } + +} + +// method id "doubleclicksearch.conversion.get": + +type ConversionGetCall struct { + s *Service + agencyId int64 + advertiserId int64 + engineAccountId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a list of conversions from a DoubleClick Search engine +// account. +// +// - advertiserId: Numeric ID of the advertiser. +// - agencyId: Numeric ID of the agency. +// - endDate: Last date (inclusive) on which to retrieve conversions. +// Format is yyyymmdd. +// - engineAccountId: Numeric ID of the engine account. +// - rowCount: The number of conversions to return per call. +// - startDate: First date (inclusive) on which to retrieve conversions. +// Format is yyyymmdd. +// - startRow: The 0-based starting index for retrieving conversions +// results. +func (r *ConversionService) Get(agencyId int64, advertiserId int64, engineAccountId int64, endDate int64, rowCount int64, startDate int64, startRow int64) *ConversionGetCall { + c := &ConversionGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.agencyId = agencyId + c.advertiserId = advertiserId + c.engineAccountId = engineAccountId + c.urlParams_.Set("endDate", fmt.Sprint(endDate)) + c.urlParams_.Set("rowCount", fmt.Sprint(rowCount)) + c.urlParams_.Set("startDate", fmt.Sprint(startDate)) + c.urlParams_.Set("startRow", fmt.Sprint(startRow)) + return c +} + +// AdGroupId sets the optional parameter "adGroupId": Numeric ID of the +// ad group. +func (c *ConversionGetCall) AdGroupId(adGroupId int64) *ConversionGetCall { + c.urlParams_.Set("adGroupId", fmt.Sprint(adGroupId)) + return c +} + +// AdId sets the optional parameter "adId": Numeric ID of the ad. +func (c *ConversionGetCall) AdId(adId int64) *ConversionGetCall { + c.urlParams_.Set("adId", fmt.Sprint(adId)) + return c +} + +// CampaignId sets the optional parameter "campaignId": Numeric ID of +// the campaign. +func (c *ConversionGetCall) CampaignId(campaignId int64) *ConversionGetCall { + c.urlParams_.Set("campaignId", fmt.Sprint(campaignId)) + return c +} + +// CriterionId sets the optional parameter "criterionId": Numeric ID of +// the criterion. +func (c *ConversionGetCall) CriterionId(criterionId int64) *ConversionGetCall { + c.urlParams_.Set("criterionId", fmt.Sprint(criterionId)) + return c +} + +// CustomerId sets the optional parameter "customerId": Customer ID of a +// client account in the new Search Ads 360 experience. +func (c *ConversionGetCall) CustomerId(customerId string) *ConversionGetCall { + c.urlParams_.Set("customerId", customerId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ConversionGetCall) Fields(s ...googleapi.Field) *ConversionGetCall { + 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 *ConversionGetCall) IfNoneMatch(entityTag string) *ConversionGetCall { + 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 *ConversionGetCall) Context(ctx context.Context) *ConversionGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ConversionGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ConversionGetCall) doRequest(alt string) (*http.Response, 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, "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion") + 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{ + "agencyId": strconv.FormatInt(c.agencyId, 10), + "advertiserId": strconv.FormatInt(c.advertiserId, 10), + "engineAccountId": strconv.FormatInt(c.engineAccountId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "doubleclicksearch.conversion.get" call. +// Exactly one of *ConversionList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ConversionList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ConversionGetCall) Do(opts ...googleapi.CallOption) (*ConversionList, error) { + gensupport.SetOptions(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 := &ConversionList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of conversions from a DoubleClick Search engine account.", + // "flatPath": "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion", + // "httpMethod": "GET", + // "id": "doubleclicksearch.conversion.get", + // "parameterOrder": [ + // "agencyId", + // "advertiserId", + // "engineAccountId", + // "endDate", + // "rowCount", + // "startDate", + // "startRow" + // ], + // "parameters": { + // "adGroupId": { + // "description": "Numeric ID of the ad group.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "adId": { + // "description": "Numeric ID of the ad.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "advertiserId": { + // "description": "Numeric ID of the advertiser.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "agencyId": { + // "description": "Numeric ID of the agency.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "campaignId": { + // "description": "Numeric ID of the campaign.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "criterionId": { + // "description": "Numeric ID of the criterion.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "customerId": { + // "description": "Customer ID of a client account in the new Search Ads 360 experience.", + // "location": "query", + // "type": "string" + // }, + // "endDate": { + // "description": "Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd.", + // "format": "int32", + // "location": "query", + // "maximum": "99991231", + // "minimum": "20091101", + // "required": true, + // "type": "integer" + // }, + // "engineAccountId": { + // "description": "Numeric ID of the engine account.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "rowCount": { + // "description": "The number of conversions to return per call.", + // "format": "int32", + // "location": "query", + // "maximum": "1000", + // "minimum": "1", + // "required": true, + // "type": "integer" + // }, + // "startDate": { + // "description": "First date (inclusive) on which to retrieve conversions. Format is yyyymmdd.", + // "format": "int32", + // "location": "query", + // "maximum": "99991231", + // "minimum": "20091101", + // "required": true, + // "type": "integer" + // }, + // "startRow": { + // "description": "The 0-based starting index for retrieving conversions results.", + // "format": "uint32", + // "location": "query", + // "required": true, + // "type": "integer" + // } + // }, + // "path": "doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion", + // "response": { + // "$ref": "ConversionList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/doubleclicksearch" + // ] + // } + +} + // method id "doubleclicksearch.conversion.insert": type ConversionInsertCall struct { diff --git a/drivelabels/v2beta/drivelabels-api.json b/drivelabels/v2beta/drivelabels-api.json index 9522006fdb0..3e250332973 100644 --- a/drivelabels/v2beta/drivelabels-api.json +++ b/drivelabels/v2beta/drivelabels-api.json @@ -396,6 +396,36 @@ "response": { "$ref": "GoogleAppsDriveLabelsV2betaLabel" } + }, + "updatePermissions": { + "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + "flatPath": "v2beta/labels/{labelsId}/permissions", + "httpMethod": "PATCH", + "id": "drivelabels.labels.updatePermissions", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent Label resource name.", + "location": "path", + "pattern": "^labels/[^/]+$", + "required": true, + "type": "string" + }, + "useAdminAccess": { + "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2beta/{+parent}/permissions", + "request": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + }, + "response": { + "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + } } }, "resources": { @@ -444,16 +474,18 @@ "httpMethod": "POST", "id": "drivelabels.labels.permissions.batchDelete", "parameterOrder": [ - "labelsId" + "parent" ], "parameters": { - "labelsId": { + "parent": { + "description": "Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", "location": "path", + "pattern": "^labels/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta/labels/{labelsId}/permissions:batchDelete", + "path": "v2beta/{+parent}/permissions:batchDelete", "request": { "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" }, @@ -580,12 +612,16 @@ "response": { "$ref": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse" } - }, - "patch": { + } + } + }, + "revisions": { + "methods": { + "updatePermissions": { "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", - "flatPath": "v2beta/labels/{labelsId}/permissions/{permissionsId}", + "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions", "httpMethod": "PATCH", - "id": "drivelabels.labels.permissions.patch", + "id": "drivelabels.labels.revisions.updatePermissions", "parameterOrder": [ "parent" ], @@ -593,7 +629,7 @@ "parent": { "description": "Required. The parent Label resource name.", "location": "path", - "pattern": "^labels/[^/]+/permissions/[^/]+$", + "pattern": "^labels/[^/]+/revisions/[^/]+$", "required": true, "type": "string" }, @@ -603,7 +639,7 @@ "type": "boolean" } }, - "path": "v2beta/{+parent}", + "path": "v2beta/{+parent}/permissions", "request": { "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" }, @@ -611,9 +647,7 @@ "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" } } - } - }, - "revisions": { + }, "resources": { "locks": { "methods": { @@ -660,22 +694,18 @@ "httpMethod": "POST", "id": "drivelabels.labels.revisions.permissions.batchDelete", "parameterOrder": [ - "labelsId", - "revisionsId" + "parent" ], "parameters": { - "labelsId": { - "location": "path", - "required": true, - "type": "string" - }, - "revisionsId": { + "parent": { + "description": "Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", "location": "path", + "pattern": "^labels/[^/]+/revisions/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + "path": "v2beta/{+parent}/permissions:batchDelete", "request": { "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" }, @@ -802,36 +832,6 @@ "response": { "$ref": "GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse" } - }, - "patch": { - "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", - "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions/{permissionsId}", - "httpMethod": "PATCH", - "id": "drivelabels.labels.revisions.permissions.patch", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent Label resource name.", - "location": "path", - "pattern": "^labels/[^/]+/revisions/[^/]+/permissions/[^/]+$", - "required": true, - "type": "string" - }, - "useAdminAccess": { - "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", - "location": "query", - "type": "boolean" - } - }, - "path": "v2beta/{+parent}", - "request": { - "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" - }, - "response": { - "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" - } } } } @@ -888,7 +888,7 @@ } } }, - "revision": "20220802", + "revision": "20221024", "rootUrl": "https://drivelabels.googleapis.com/", "schemas": { "GoogleAppsDriveLabelsV2betaBadgeColors": { diff --git a/drivelabels/v2beta/drivelabels-gen.go b/drivelabels/v2beta/drivelabels-gen.go index 791c3511697..9472fc8fd66 100644 --- a/drivelabels/v2beta/drivelabels-gen.go +++ b/drivelabels/v2beta/drivelabels-gen.go @@ -5105,6 +5105,164 @@ func (c *LabelsUpdateLabelCopyModeCall) Do(opts ...googleapi.CallOption) (*Googl } +// method id "drivelabels.labels.updatePermissions": + +type LabelsUpdatePermissionsCall struct { + s *Service + parent string + googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdatePermissions: Updates a Label's permissions. If a permission for +// the indicated principal doesn't exist, a new Label Permission is +// created, otherwise the existing permission is updated. Permissions +// affect the Label resource as a whole, are not revisioned, and do not +// require publishing. +// +// - parent: The parent Label resource name. +func (r *LabelsService) UpdatePermissions(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsUpdatePermissionsCall { + c := &LabelsUpdatePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": Set to +// `true` in order to use the user's admin credentials. The server will +// verify the user is an admin for the Label before allowing access. +func (c *LabelsUpdatePermissionsCall) UseAdminAccess(useAdminAccess bool) *LabelsUpdatePermissionsCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LabelsUpdatePermissionsCall) Fields(s ...googleapi.Field) *LabelsUpdatePermissionsCall { + 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 *LabelsUpdatePermissionsCall) Context(ctx context.Context) *LabelsUpdatePermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LabelsUpdatePermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LabelsUpdatePermissionsCall) doRequest(alt string) (*http.Response, 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.googleappsdrivelabelsv2betalabelpermission) + 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, "v2beta/{+parent}/permissions") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drivelabels.labels.updatePermissions" call. +// Exactly one of *GoogleAppsDriveLabelsV2betaLabelPermission or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAppsDriveLabelsV2betaLabelPermission.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LabelsUpdatePermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, error) { + gensupport.SetOptions(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 := &GoogleAppsDriveLabelsV2betaLabelPermission{ + ServerResponse: 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 Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", + // "flatPath": "v2beta/labels/{labelsId}/permissions", + // "httpMethod": "PATCH", + // "id": "drivelabels.labels.updatePermissions", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent Label resource name.", + // "location": "path", + // "pattern": "^labels/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "useAdminAccess": { + // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2beta/{+parent}/permissions", + // "request": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // }, + // "response": { + // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" + // } + // } + +} + // method id "drivelabels.labels.locks.list": type LabelsLocksListCall struct { @@ -5300,7 +5458,7 @@ func (c *LabelsLocksListCall) Pages(ctx context.Context, f func(*GoogleAppsDrive type LabelsPermissionsBatchDeleteCall struct { s *Service - labelsId string + parent string googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context @@ -5311,10 +5469,13 @@ type LabelsPermissionsBatchDeleteCall struct { // resource as a whole, are not revisioned, and do not require // publishing. // -// - labelsId: . -func (r *LabelsPermissionsService) BatchDelete(labelsId string, googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) *LabelsPermissionsBatchDeleteCall { +// - parent: The parent Label resource name shared by all permissions +// being deleted. Format: labels/{label} If this is set, the parent +// field in the UpdateLabelPermissionRequest messages must either be +// empty or match this field. +func (r *LabelsPermissionsService) BatchDelete(parent string, googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) *LabelsPermissionsBatchDeleteCall { c := &LabelsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.labelsId = labelsId + c.parent = parent c.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest = googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest return c } @@ -5359,7 +5520,7 @@ func (c *LabelsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/labels/{labelsId}/permissions:batchDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions:batchDelete") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5367,7 +5528,7 @@ func (c *LabelsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "labelsId": c.labelsId, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -5415,16 +5576,18 @@ func (c *LabelsPermissionsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Go // "httpMethod": "POST", // "id": "drivelabels.labels.permissions.batchDelete", // "parameterOrder": [ - // "labelsId" + // "parent" // ], // "parameters": { - // "labelsId": { + // "parent": { + // "description": "Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", // "location": "path", + // "pattern": "^labels/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2beta/labels/{labelsId}/permissions:batchDelete", + // "path": "v2beta/{+parent}/permissions:batchDelete", // "request": { // "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" // }, @@ -6093,9 +6256,9 @@ func (c *LabelsPermissionsListCall) Pages(ctx context.Context, f func(*GoogleApp } } -// method id "drivelabels.labels.permissions.patch": +// method id "drivelabels.labels.revisions.updatePermissions": -type LabelsPermissionsPatchCall struct { +type LabelsRevisionsUpdatePermissionsCall struct { s *Service parent string googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission @@ -6104,15 +6267,15 @@ type LabelsPermissionsPatchCall struct { header_ http.Header } -// Patch: Updates a Label's permissions. If a permission for the -// indicated principal doesn't exist, a new Label Permission is created, -// otherwise the existing permission is updated. Permissions affect the -// Label resource as a whole, are not revisioned, and do not require -// publishing. +// UpdatePermissions: Updates a Label's permissions. If a permission for +// the indicated principal doesn't exist, a new Label Permission is +// created, otherwise the existing permission is updated. Permissions +// affect the Label resource as a whole, are not revisioned, and do not +// require publishing. // // - parent: The parent Label resource name. -func (r *LabelsPermissionsService) Patch(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsPermissionsPatchCall { - c := &LabelsPermissionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LabelsRevisionsService) UpdatePermissions(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsRevisionsUpdatePermissionsCall { + c := &LabelsRevisionsUpdatePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission return c @@ -6121,7 +6284,7 @@ func (r *LabelsPermissionsService) Patch(parent string, googleappsdrivelabelsv2b // UseAdminAccess sets the optional parameter "useAdminAccess": Set to // `true` in order to use the user's admin credentials. The server will // verify the user is an admin for the Label before allowing access. -func (c *LabelsPermissionsPatchCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsPatchCall { +func (c *LabelsRevisionsUpdatePermissionsCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsUpdatePermissionsCall { c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) return c } @@ -6129,7 +6292,7 @@ func (c *LabelsPermissionsPatchCall) UseAdminAccess(useAdminAccess bool) *Labels // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *LabelsPermissionsPatchCall) Fields(s ...googleapi.Field) *LabelsPermissionsPatchCall { +func (c *LabelsRevisionsUpdatePermissionsCall) Fields(s ...googleapi.Field) *LabelsRevisionsUpdatePermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6137,21 +6300,21 @@ func (c *LabelsPermissionsPatchCall) Fields(s ...googleapi.Field) *LabelsPermiss // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *LabelsPermissionsPatchCall) Context(ctx context.Context) *LabelsPermissionsPatchCall { +func (c *LabelsRevisionsUpdatePermissionsCall) Context(ctx context.Context) *LabelsRevisionsUpdatePermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *LabelsPermissionsPatchCall) Header() http.Header { +func (c *LabelsRevisionsUpdatePermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LabelsPermissionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *LabelsRevisionsUpdatePermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6166,7 +6329,7 @@ func (c *LabelsPermissionsPatchCall) doRequest(alt string) (*http.Response, erro reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -6179,7 +6342,7 @@ func (c *LabelsPermissionsPatchCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "drivelabels.labels.permissions.patch" call. +// Do executes the "drivelabels.labels.revisions.updatePermissions" call. // Exactly one of *GoogleAppsDriveLabelsV2betaLabelPermission or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -6188,7 +6351,7 @@ func (c *LabelsPermissionsPatchCall) doRequest(alt string) (*http.Response, erro // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *LabelsPermissionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, error) { +func (c *LabelsRevisionsUpdatePermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6220,9 +6383,9 @@ func (c *LabelsPermissionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAp return ret, nil // { // "description": "Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", - // "flatPath": "v2beta/labels/{labelsId}/permissions/{permissionsId}", + // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions", // "httpMethod": "PATCH", - // "id": "drivelabels.labels.permissions.patch", + // "id": "drivelabels.labels.revisions.updatePermissions", // "parameterOrder": [ // "parent" // ], @@ -6230,7 +6393,7 @@ func (c *LabelsPermissionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAp // "parent": { // "description": "Required. The parent Label resource name.", // "location": "path", - // "pattern": "^labels/[^/]+/permissions/[^/]+$", + // "pattern": "^labels/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // }, @@ -6240,7 +6403,7 @@ func (c *LabelsPermissionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAp // "type": "boolean" // } // }, - // "path": "v2beta/{+parent}", + // "path": "v2beta/{+parent}/permissions", // "request": { // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" // }, @@ -6446,8 +6609,7 @@ func (c *LabelsRevisionsLocksListCall) Pages(ctx context.Context, f func(*Google type LabelsRevisionsPermissionsBatchDeleteCall struct { s *Service - labelsId string - revisionsId string + parent string googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context @@ -6458,12 +6620,13 @@ type LabelsRevisionsPermissionsBatchDeleteCall struct { // resource as a whole, are not revisioned, and do not require // publishing. // -// - labelsId: . -// - revisionsId: . -func (r *LabelsRevisionsPermissionsService) BatchDelete(labelsId string, revisionsId string, googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchDeleteCall { +// - parent: The parent Label resource name shared by all permissions +// being deleted. Format: labels/{label} If this is set, the parent +// field in the UpdateLabelPermissionRequest messages must either be +// empty or match this field. +func (r *LabelsRevisionsPermissionsService) BatchDelete(parent string, googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchDeleteCall { c := &LabelsRevisionsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.labelsId = labelsId - c.revisionsId = revisionsId + c.parent = parent c.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest = googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest return c } @@ -6508,7 +6671,7 @@ func (c *LabelsRevisionsPermissionsBatchDeleteCall) doRequest(alt string) (*http reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions:batchDelete") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6516,8 +6679,7 @@ func (c *LabelsRevisionsPermissionsBatchDeleteCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "labelsId": c.labelsId, - "revisionsId": c.revisionsId, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -6565,22 +6727,18 @@ func (c *LabelsRevisionsPermissionsBatchDeleteCall) Do(opts ...googleapi.CallOpt // "httpMethod": "POST", // "id": "drivelabels.labels.revisions.permissions.batchDelete", // "parameterOrder": [ - // "labelsId", - // "revisionsId" + // "parent" // ], // "parameters": { - // "labelsId": { - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "revisionsId": { + // "parent": { + // "description": "Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.", // "location": "path", + // "pattern": "^labels/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete", + // "path": "v2beta/{+parent}/permissions:batchDelete", // "request": { // "$ref": "GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest" // }, @@ -7249,164 +7407,6 @@ func (c *LabelsRevisionsPermissionsListCall) Pages(ctx context.Context, f func(* } } -// method id "drivelabels.labels.revisions.permissions.patch": - -type LabelsRevisionsPermissionsPatchCall struct { - s *Service - parent string - googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a Label's permissions. If a permission for the -// indicated principal doesn't exist, a new Label Permission is created, -// otherwise the existing permission is updated. Permissions affect the -// Label resource as a whole, are not revisioned, and do not require -// publishing. -// -// - parent: The parent Label resource name. -func (r *LabelsRevisionsPermissionsService) Patch(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsRevisionsPermissionsPatchCall { - c := &LabelsRevisionsPermissionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission - return c -} - -// UseAdminAccess sets the optional parameter "useAdminAccess": Set to -// `true` in order to use the user's admin credentials. The server will -// verify the user is an admin for the Label before allowing access. -func (c *LabelsRevisionsPermissionsPatchCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsPatchCall { - c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LabelsRevisionsPermissionsPatchCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsPatchCall { - 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 *LabelsRevisionsPermissionsPatchCall) Context(ctx context.Context) *LabelsRevisionsPermissionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LabelsRevisionsPermissionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LabelsRevisionsPermissionsPatchCall) doRequest(alt string) (*http.Response, 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.googleappsdrivelabelsv2betalabelpermission) - 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, "v2beta/{+parent}") - 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{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "drivelabels.labels.revisions.permissions.patch" call. -// Exactly one of *GoogleAppsDriveLabelsV2betaLabelPermission or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleAppsDriveLabelsV2betaLabelPermission.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *LabelsRevisionsPermissionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, error) { - gensupport.SetOptions(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 := &GoogleAppsDriveLabelsV2betaLabelPermission{ - ServerResponse: 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 Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.", - // "flatPath": "v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions/{permissionsId}", - // "httpMethod": "PATCH", - // "id": "drivelabels.labels.revisions.permissions.patch", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The parent Label resource name.", - // "location": "path", - // "pattern": "^labels/[^/]+/revisions/[^/]+/permissions/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "useAdminAccess": { - // "description": "Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v2beta/{+parent}", - // "request": { - // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" - // }, - // "response": { - // "$ref": "GoogleAppsDriveLabelsV2betaLabelPermission" - // } - // } - -} - // method id "drivelabels.limits.getLabel": type LimitsGetLabelCall struct { diff --git a/ondemandscanning/v1/ondemandscanning-api.json b/ondemandscanning/v1/ondemandscanning-api.json index aacf1fa738d..862f2ae3847 100644 --- a/ondemandscanning/v1/ondemandscanning-api.json +++ b/ondemandscanning/v1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20220917", + "revision": "20221024", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -1704,11 +1704,11 @@ "type": "string" }, "os": { - "description": "The OS affected by a vulnerability This field is deprecated and the information is in cpe_uri", + "description": "The OS affected by a vulnerability Used to generate the cpe_uri for OS packages", "type": "string" }, "osVersion": { - "description": "The version of the OS This field is deprecated and the information is in cpe_uri", + "description": "The version of the OS Used to generate the cpe_uri for OS packages", "type": "string" }, "package": { diff --git a/ondemandscanning/v1/ondemandscanning-gen.go b/ondemandscanning/v1/ondemandscanning-gen.go index 8b4c51d613c..0186cef86d7 100644 --- a/ondemandscanning/v1/ondemandscanning-gen.go +++ b/ondemandscanning/v1/ondemandscanning-gen.go @@ -2327,12 +2327,12 @@ type PackageData struct { // Maven packages. HashDigest string `json:"hashDigest,omitempty"` - // Os: The OS affected by a vulnerability This field is deprecated and - // the information is in cpe_uri + // Os: The OS affected by a vulnerability Used to generate the cpe_uri + // for OS packages Os string `json:"os,omitempty"` - // OsVersion: The version of the OS This field is deprecated and the - // information is in cpe_uri + // OsVersion: The version of the OS Used to generate the cpe_uri for OS + // packages OsVersion string `json:"osVersion,omitempty"` // Package: The package being analysed for vulnerabilities diff --git a/ondemandscanning/v1beta1/ondemandscanning-api.json b/ondemandscanning/v1beta1/ondemandscanning-api.json index 2fdaf844561..99453a502e7 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-api.json +++ b/ondemandscanning/v1beta1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20220917", + "revision": "20221024", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -1700,11 +1700,11 @@ "type": "string" }, "os": { - "description": "The OS affected by a vulnerability This field is deprecated and the information is in cpe_uri", + "description": "The OS affected by a vulnerability Used to generate the cpe_uri for OS packages", "type": "string" }, "osVersion": { - "description": "The version of the OS This field is deprecated and the information is in cpe_uri", + "description": "The version of the OS Used to generate the cpe_uri for OS packages", "type": "string" }, "package": { diff --git a/ondemandscanning/v1beta1/ondemandscanning-gen.go b/ondemandscanning/v1beta1/ondemandscanning-gen.go index 38c1de40be1..700817fa732 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-gen.go +++ b/ondemandscanning/v1beta1/ondemandscanning-gen.go @@ -2321,12 +2321,12 @@ type PackageData struct { // Maven packages. HashDigest string `json:"hashDigest,omitempty"` - // Os: The OS affected by a vulnerability This field is deprecated and - // the information is in cpe_uri + // Os: The OS affected by a vulnerability Used to generate the cpe_uri + // for OS packages Os string `json:"os,omitempty"` - // OsVersion: The version of the OS This field is deprecated and the - // information is in cpe_uri + // OsVersion: The version of the OS Used to generate the cpe_uri for OS + // packages OsVersion string `json:"osVersion,omitempty"` // Package: The package being analysed for vulnerabilities diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index e06943bfdef..2fed752be7b 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -1424,7 +1424,7 @@ } } }, - "revision": "20220904", + "revision": "20221020", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -1857,7 +1857,7 @@ "id": "PullResponse", "properties": { "receivedMessages": { - "description": "Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog.", + "description": "Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog.", "items": { "$ref": "ReceivedMessage" }, diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go index e4e4626813a..c42085dbb15 100644 --- a/pubsub/v1/pubsub-gen.go +++ b/pubsub/v1/pubsub-gen.go @@ -1252,7 +1252,8 @@ func (s *PullRequest) MarshalJSON() ([]byte, error) { // PullResponse: Response for the `Pull` method. type PullResponse struct { // ReceivedMessages: Received Pub/Sub messages. The list will be empty - // if there are no more messages available in the backlog. For JSON, the + // if there are no more messages available in the backlog, or if no + // messages could be returned before the request timeout. For JSON, the // response can be entirely empty. The Pub/Sub system may return fewer // than the `maxMessages` requested even if there are more messages // available in the backlog. diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index e409011a3b9..0ed913267d3 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -1780,7 +1780,7 @@ } } }, - "revision": "20221014", + "revision": "20221024", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2939,7 +2939,7 @@ "additionalProperties": { "type": "any" }, - "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", + "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of a product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", "type": "object" }, "userEvent": { @@ -3962,7 +3962,7 @@ "description": "Required. The facet key specification." }, "limit": { - "description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", + "description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 50. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", "format": "int32", "type": "integer" } diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 30487fde4dd..78d086d6ad4 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -2546,7 +2546,7 @@ type GoogleCloudRetailV2PredictRequest struct { // field in the prediction response. * `returnScore`: Boolean. If set to // true, the prediction 'score' corresponding to each returned product // will be set in the `results.metadata` field in the prediction - // response. The given 'score' indicates the probability of an product + // response. The given 'score' indicates the probability of a product // being clicked/purchased given the user's context and history. * // `strictFiltering`: Boolean. True by default. If set to false, the // service will return generic (unfiltered) popular products instead of @@ -4663,7 +4663,7 @@ type GoogleCloudRetailV2SearchRequestFacetSpec struct { FacetKey *GoogleCloudRetailV2SearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` // Limit: Maximum of facet values that should be returned for this - // facet. If unspecified, defaults to 20. The maximum allowed value is + // facet. If unspecified, defaults to 50. The maximum allowed value is // 300. Values above 300 will be coerced to 300. If this field is // negative, an INVALID_ARGUMENT is returned. Limit int64 `json:"limit,omitempty"` diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 58ee3cdeb11..99654640737 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -137,6 +137,11 @@ "location": "query", "type": "string" }, + "enableAttributeSuggestions": { + "description": "If true, attribute suggestions are enabled and provided in response.", + "location": "query", + "type": "boolean" + }, "languageCodes": { "description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", "location": "query", @@ -2090,7 +2095,7 @@ } } }, - "revision": "20221014", + "revision": "20221024", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2841,6 +2846,13 @@ "description": "Response of the auto-complete query.", "id": "GoogleCloudRetailV2alphaCompleteQueryResponse", "properties": { + "attributeResults": { + "additionalProperties": { + "$ref": "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult" + }, + "description": "A map of matched attribute suggestions. Current supported keys: * `brands` * `categories`", + "type": "object" + }, "attributionToken": { "description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", "type": "string" @@ -2862,6 +2874,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult": { + "description": "Resource that represents attribute results.", + "id": "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult", + "properties": { + "suggestions": { + "description": "The list of suggestions for the attribute.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult": { "description": "Resource that represents completion results.", "id": "GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult", @@ -3971,7 +3997,7 @@ "additionalProperties": { "type": "any" }, - "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", + "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of a product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", "type": "object" }, "userEvent": { @@ -5079,7 +5105,7 @@ "description": "Required. The facet key specification." }, "limit": { - "description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", + "description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 50. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", "format": "int32", "type": "integer" } diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 3202f3fdc61..30a071de886 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -1730,6 +1730,10 @@ func (s *GoogleCloudRetailV2alphaColorInfo) MarshalJSON() ([]byte, error) { // GoogleCloudRetailV2alphaCompleteQueryResponse: Response of the // auto-complete query. type GoogleCloudRetailV2alphaCompleteQueryResponse struct { + // AttributeResults: A map of matched attribute suggestions. Current + // supported keys: * `brands` * `categories` + AttributeResults map[string]GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult `json:"attributeResults,omitempty"` + // AttributionToken: A unique complete token. This should be included in // the UserEvent.completion_detail for search events resulting from this // completion, which enables accurate attribution of complete model @@ -1757,7 +1761,7 @@ type GoogleCloudRetailV2alphaCompleteQueryResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttributionToken") to + // ForceSendFields is a list of field names (e.g. "AttributeResults") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1765,7 +1769,7 @@ type GoogleCloudRetailV2alphaCompleteQueryResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributionToken") to + // NullFields is a list of field names (e.g. "AttributeResults") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -1781,6 +1785,35 @@ func (s *GoogleCloudRetailV2alphaCompleteQueryResponse) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult: +// Resource that represents attribute results. +type GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult struct { + // Suggestions: The list of suggestions for the attribute. + Suggestions []string `json:"suggestions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Suggestions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Suggestions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult: // Resource that represents completion results. type GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult struct { @@ -3911,7 +3944,7 @@ type GoogleCloudRetailV2alphaPredictRequest struct { // field in the prediction response. * `returnScore`: Boolean. If set to // true, the prediction 'score' corresponding to each returned product // will be set in the `results.metadata` field in the prediction - // response. The given 'score' indicates the probability of an product + // response. The given 'score' indicates the probability of a product // being clicked/purchased given the user's context and history. * // `strictFiltering`: Boolean. True by default. If set to false, the // service will return generic (unfiltered) popular products instead of @@ -6177,7 +6210,7 @@ type GoogleCloudRetailV2alphaSearchRequestFacetSpec struct { FacetKey *GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` // Limit: Maximum of facet values that should be returned for this - // facet. If unspecified, defaults to 20. The maximum allowed value is + // facet. If unspecified, defaults to 50. The maximum allowed value is // 300. Values above 300 will be coerced to 300. If this field is // negative, an INVALID_ARGUMENT is returned. Limit int64 `json:"limit,omitempty"` @@ -8606,6 +8639,14 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) DeviceType(deviceType strin return c } +// EnableAttributeSuggestions sets the optional parameter +// "enableAttributeSuggestions": If true, attribute suggestions are +// enabled and provided in response. +func (c *ProjectsLocationsCatalogsCompleteQueryCall) EnableAttributeSuggestions(enableAttributeSuggestions bool) *ProjectsLocationsCatalogsCompleteQueryCall { + c.urlParams_.Set("enableAttributeSuggestions", fmt.Sprint(enableAttributeSuggestions)) + return c +} + // LanguageCodes sets the optional parameter "languageCodes": Note that // this field applies for `user-data` dataset only. For requests with // `cloud-retail` dataset, setting this field has no effect. The @@ -8777,6 +8818,11 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "location": "query", // "type": "string" // }, + // "enableAttributeSuggestions": { + // "description": "If true, attribute suggestions are enabled and provided in response.", + // "location": "query", + // "type": "boolean" + // }, // "languageCodes": { // "description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", // "location": "query", diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 566a1c9a0a0..1e68e9be6d1 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2024,7 +2024,7 @@ } } }, - "revision": "20221014", + "revision": "20221024", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4463,7 +4463,7 @@ "additionalProperties": { "type": "any" }, - "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of an product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", + "description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of a product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", "type": "object" }, "userEvent": { @@ -5492,7 +5492,7 @@ "description": "Required. The facet key specification." }, "limit": { - "description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", + "description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 50. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", "format": "int32", "type": "integer" } diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 02d87f33bdb..c5132936c05 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -4864,7 +4864,7 @@ type GoogleCloudRetailV2betaPredictRequest struct { // field in the prediction response. * `returnScore`: Boolean. If set to // true, the prediction 'score' corresponding to each returned product // will be set in the `results.metadata` field in the prediction - // response. The given 'score' indicates the probability of an product + // response. The given 'score' indicates the probability of a product // being clicked/purchased given the user's context and history. * // `strictFiltering`: Boolean. True by default. If set to false, the // service will return generic (unfiltered) popular products instead of @@ -6986,7 +6986,7 @@ type GoogleCloudRetailV2betaSearchRequestFacetSpec struct { FacetKey *GoogleCloudRetailV2betaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` // Limit: Maximum of facet values that should be returned for this - // facet. If unspecified, defaults to 20. The maximum allowed value is + // facet. If unspecified, defaults to 50. The maximum allowed value is // 300. Values above 300 will be coerced to 300. If this field is // negative, an INVALID_ARGUMENT is returned. Limit int64 `json:"limit,omitempty"` diff --git a/speech/v1/speech-api.json b/speech/v1/speech-api.json index a647e5c389f..1232e0b6e8c 100644 --- a/speech/v1/speech-api.json +++ b/speech/v1/speech-api.json @@ -524,7 +524,7 @@ } } }, - "revision": "20220825", + "revision": "20221020", "rootUrl": "https://speech.googleapis.com/", "schemas": { "ClassItem": { @@ -720,6 +720,10 @@ }, "type": "array" }, + "speechAdaptationInfo": { + "$ref": "SpeechAdaptationInfo", + "description": "Provides information on speech adaptation behavior in response" + }, "totalBilledTime": { "description": "When available, billed audio seconds for the corresponding request.", "format": "google-duration", @@ -834,7 +838,7 @@ "type": "array" }, "audioChannelCount": { - "description": "The number of channels in the input audio data. ONLY set this for MULTI-CHANNEL recognition. Valid values for LINEAR16 and FLAC are `1`-`8`. Valid values for OGG_OPUS are '1'-'254'. Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to one channel (mono). Note: We only recognize the first channel by default. To perform independent recognition on each channel set `enable_separate_recognition_per_channel` to 'true'.", + "description": "The number of channels in the input audio data. ONLY set this for MULTI-CHANNEL recognition. Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to one channel (mono). Note: We only recognize the first channel by default. To perform independent recognition on each channel set `enable_separate_recognition_per_channel` to 'true'.", "format": "int32", "type": "integer" }, @@ -1065,6 +1069,10 @@ }, "type": "array" }, + "speechAdaptationInfo": { + "$ref": "SpeechAdaptationInfo", + "description": "Provides information on adaptation behavior in response" + }, "totalBilledTime": { "description": "When available, billed audio seconds for the corresponding request.", "format": "google-duration", @@ -1128,6 +1136,21 @@ }, "type": "object" }, + "SpeechAdaptationInfo": { + "description": "Information on speech adaptation use in results", + "id": "SpeechAdaptationInfo", + "properties": { + "adaptationTimeout": { + "description": "Whether there was a timeout when applying speech adaptation. If true, adaptation had no effect in the response transcript.", + "type": "boolean" + }, + "timeoutMessage": { + "description": "If set, returns a message specifying which part of the speech adaptation request timed out.", + "type": "string" + } + }, + "type": "object" + }, "SpeechContext": { "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", "id": "SpeechContext", diff --git a/speech/v1/speech-gen.go b/speech/v1/speech-gen.go index 47c3ae721a6..d26092d6ec4 100644 --- a/speech/v1/speech-gen.go +++ b/speech/v1/speech-gen.go @@ -577,6 +577,10 @@ type LongRunningRecognizeResponse struct { // sequential portions of audio. Results []*SpeechRecognitionResult `json:"results,omitempty"` + // SpeechAdaptationInfo: Provides information on speech adaptation + // behavior in response + SpeechAdaptationInfo *SpeechAdaptationInfo `json:"speechAdaptationInfo,omitempty"` + // TotalBilledTime: When available, billed audio seconds for the // corresponding request. TotalBilledTime string `json:"totalBilledTime,omitempty"` @@ -874,12 +878,11 @@ type RecognitionConfig struct { // AudioChannelCount: The number of channels in the input audio data. // ONLY set this for MULTI-CHANNEL recognition. Valid values for - // LINEAR16 and FLAC are `1`-`8`. Valid values for OGG_OPUS are - // '1'-'254'. Valid value for MULAW, AMR, AMR_WB and - // SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to - // one channel (mono). Note: We only recognize the first channel by - // default. To perform independent recognition on each channel set - // `enable_separate_recognition_per_channel` to 'true'. + // LINEAR16, OGG_OPUS and FLAC are `1`-`8`. Valid value for MULAW, AMR, + // AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, + // defaults to one channel (mono). Note: We only recognize the first + // channel by default. To perform independent recognition on each + // channel set `enable_separate_recognition_per_channel` to 'true'. AudioChannelCount int64 `json:"audioChannelCount,omitempty"` // DiarizationConfig: Config to enable speaker diarization and set @@ -1221,6 +1224,10 @@ type RecognizeResponse struct { // sequential portions of audio. Results []*SpeechRecognitionResult `json:"results,omitempty"` + // SpeechAdaptationInfo: Provides information on adaptation behavior in + // response + SpeechAdaptationInfo *SpeechAdaptationInfo `json:"speechAdaptationInfo,omitempty"` + // TotalBilledTime: When available, billed audio seconds for the // corresponding request. TotalBilledTime string `json:"totalBilledTime,omitempty"` @@ -1339,6 +1346,41 @@ func (s *SpeechAdaptation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SpeechAdaptationInfo: Information on speech adaptation use in results +type SpeechAdaptationInfo struct { + // AdaptationTimeout: Whether there was a timeout when applying speech + // adaptation. If true, adaptation had no effect in the response + // transcript. + AdaptationTimeout bool `json:"adaptationTimeout,omitempty"` + + // TimeoutMessage: If set, returns a message specifying which part of + // the speech adaptation request timed out. + TimeoutMessage string `json:"timeoutMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdaptationTimeout") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdaptationTimeout") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SpeechAdaptationInfo) MarshalJSON() ([]byte, error) { + type NoMethod SpeechAdaptationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SpeechContext: Provides "hints" to the speech recognizer to favor // specific words and phrases in the results. type SpeechContext struct { diff --git a/speech/v1p1beta1/speech-api.json b/speech/v1p1beta1/speech-api.json index b2c9db3e73f..4c5c99b537b 100644 --- a/speech/v1p1beta1/speech-api.json +++ b/speech/v1p1beta1/speech-api.json @@ -524,7 +524,7 @@ } } }, - "revision": "20220825", + "revision": "20221020", "rootUrl": "https://speech.googleapis.com/", "schemas": { "ClassItem": { @@ -744,6 +744,10 @@ }, "type": "array" }, + "speechAdaptationInfo": { + "$ref": "SpeechAdaptationInfo", + "description": "Provides information on speech adaptation behavior in response" + }, "totalBilledTime": { "description": "When available, billed audio seconds for the corresponding request.", "format": "google-duration", @@ -858,7 +862,7 @@ "type": "array" }, "audioChannelCount": { - "description": "The number of channels in the input audio data. ONLY set this for MULTI-CHANNEL recognition. Valid values for LINEAR16 and FLAC are `1`-`8`. Valid values for OGG_OPUS are '1'-'254'. Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to one channel (mono). Note: We only recognize the first channel by default. To perform independent recognition on each channel set `enable_separate_recognition_per_channel` to 'true'.", + "description": "The number of channels in the input audio data. ONLY set this for MULTI-CHANNEL recognition. Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to one channel (mono). Note: We only recognize the first channel by default. To perform independent recognition on each channel set `enable_separate_recognition_per_channel` to 'true'.", "format": "int32", "type": "integer" }, @@ -1109,6 +1113,10 @@ }, "type": "array" }, + "speechAdaptationInfo": { + "$ref": "SpeechAdaptationInfo", + "description": "Provides information on adaptation behavior in response" + }, "totalBilledTime": { "description": "When available, billed audio seconds for the corresponding request.", "format": "google-duration", @@ -1172,6 +1180,21 @@ }, "type": "object" }, + "SpeechAdaptationInfo": { + "description": "Information on speech adaptation use in results", + "id": "SpeechAdaptationInfo", + "properties": { + "adaptationTimeout": { + "description": "Whether there was a timeout when applying speech adaptation. If true, adaptation had no effect in the response transcript.", + "type": "boolean" + }, + "timeoutMessage": { + "description": "If set, returns a message specifying which part of the speech adaptation request timed out.", + "type": "string" + } + }, + "type": "object" + }, "SpeechContext": { "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", "id": "SpeechContext", diff --git a/speech/v1p1beta1/speech-gen.go b/speech/v1p1beta1/speech-gen.go index bb9aa5184ab..6aac2945b5d 100644 --- a/speech/v1p1beta1/speech-gen.go +++ b/speech/v1p1beta1/speech-gen.go @@ -615,6 +615,10 @@ type LongRunningRecognizeResponse struct { // sequential portions of audio. Results []*SpeechRecognitionResult `json:"results,omitempty"` + // SpeechAdaptationInfo: Provides information on speech adaptation + // behavior in response + SpeechAdaptationInfo *SpeechAdaptationInfo `json:"speechAdaptationInfo,omitempty"` + // TotalBilledTime: When available, billed audio seconds for the // corresponding request. TotalBilledTime string `json:"totalBilledTime,omitempty"` @@ -912,12 +916,11 @@ type RecognitionConfig struct { // AudioChannelCount: The number of channels in the input audio data. // ONLY set this for MULTI-CHANNEL recognition. Valid values for - // LINEAR16 and FLAC are `1`-`8`. Valid values for OGG_OPUS are - // '1'-'254'. Valid value for MULAW, AMR, AMR_WB and - // SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to - // one channel (mono). Note: We only recognize the first channel by - // default. To perform independent recognition on each channel set - // `enable_separate_recognition_per_channel` to 'true'. + // LINEAR16, OGG_OPUS and FLAC are `1`-`8`. Valid value for MULAW, AMR, + // AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, + // defaults to one channel (mono). Note: We only recognize the first + // channel by default. To perform independent recognition on each + // channel set `enable_separate_recognition_per_channel` to 'true'. AudioChannelCount int64 `json:"audioChannelCount,omitempty"` // DiarizationConfig: Config to enable speaker diarization and set @@ -1286,6 +1289,10 @@ type RecognizeResponse struct { // sequential portions of audio. Results []*SpeechRecognitionResult `json:"results,omitempty"` + // SpeechAdaptationInfo: Provides information on adaptation behavior in + // response + SpeechAdaptationInfo *SpeechAdaptationInfo `json:"speechAdaptationInfo,omitempty"` + // TotalBilledTime: When available, billed audio seconds for the // corresponding request. TotalBilledTime string `json:"totalBilledTime,omitempty"` @@ -1404,6 +1411,41 @@ func (s *SpeechAdaptation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SpeechAdaptationInfo: Information on speech adaptation use in results +type SpeechAdaptationInfo struct { + // AdaptationTimeout: Whether there was a timeout when applying speech + // adaptation. If true, adaptation had no effect in the response + // transcript. + AdaptationTimeout bool `json:"adaptationTimeout,omitempty"` + + // TimeoutMessage: If set, returns a message specifying which part of + // the speech adaptation request timed out. + TimeoutMessage string `json:"timeoutMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdaptationTimeout") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdaptationTimeout") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SpeechAdaptationInfo) MarshalJSON() ([]byte, error) { + type NoMethod SpeechAdaptationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SpeechContext: Provides "hints" to the speech recognizer to favor // specific words and phrases in the results. type SpeechContext struct { diff --git a/tpu/v2/tpu-api.json b/tpu/v2/tpu-api.json new file mode 100644 index 00000000000..83becb9520a --- /dev/null +++ b/tpu/v2/tpu-api.json @@ -0,0 +1,1479 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://tpu.googleapis.com/", + "batchPath": "batch", + "canonicalName": "TPU", + "description": "TPU API provides customers with access to Google TPU technology.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/tpu/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "tpu:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://tpu.mtls.googleapis.com/", + "name": "tpu", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "generateServiceIdentity": { + "description": "Generates the Cloud TPU service identity for the project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}:generateServiceIdentity", + "httpMethod": "POST", + "id": "tpu.projects.locations.generateServiceIdentity", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}:generateServiceIdentity", + "request": { + "$ref": "GenerateServiceIdentityRequest" + }, + "response": { + "$ref": "GenerateServiceIdentityResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets information about a location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "tpu.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v2/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "tpu.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "acceleratorTypes": { + "methods": { + "get": { + "description": "Gets AcceleratorType.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/acceleratorTypes/{acceleratorTypesId}", + "httpMethod": "GET", + "id": "tpu.projects.locations.acceleratorTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "AcceleratorType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists accelerator types supported by this API.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/acceleratorTypes", + "httpMethod": "GET", + "id": "tpu.projects.locations.acceleratorTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/acceleratorTypes", + "response": { + "$ref": "ListAcceleratorTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "nodes": { + "methods": { + "create": { + "description": "Creates a node.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes", + "httpMethod": "POST", + "id": "tpu.projects.locations.nodes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "nodeId": { + "description": "The unqualified resource name.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/nodes", + "request": { + "$ref": "Node" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a node.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", + "httpMethod": "DELETE", + "id": "tpu.projects.locations.nodes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a node.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", + "httpMethod": "GET", + "id": "tpu.projects.locations.nodes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Node" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getGuestAttributes": { + "description": "Retrieves the guest attributes for the node.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:getGuestAttributes", + "httpMethod": "POST", + "id": "tpu.projects.locations.nodes.getGuestAttributes", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:getGuestAttributes", + "request": { + "$ref": "GetGuestAttributesRequest" + }, + "response": { + "$ref": "GetGuestAttributesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists nodes.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes", + "httpMethod": "GET", + "id": "tpu.projects.locations.nodes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/nodes", + "response": { + "$ref": "ListNodesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the configurations of a node.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", + "httpMethod": "PATCH", + "id": "tpu.projects.locations.nodes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Immutable. The name of the TPU.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "Node" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "start": { + "description": "Starts a node.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:start", + "httpMethod": "POST", + "id": "tpu.projects.locations.nodes.start", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:start", + "request": { + "$ref": "StartNodeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "stop": { + "description": "Stops a node. This operation is only available with single TPU nodes.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:stop", + "httpMethod": "POST", + "id": "tpu.projects.locations.nodes.stop", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:stop", + "request": { + "$ref": "StopNodeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "tpu.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:cancel", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "tpu.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "tpu.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "tpu.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "runtimeVersions": { + "methods": { + "get": { + "description": "Gets a runtime version.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/runtimeVersions/{runtimeVersionsId}", + "httpMethod": "GET", + "id": "tpu.projects.locations.runtimeVersions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/runtimeVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "RuntimeVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists runtime versions supported by this API.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/runtimeVersions", + "httpMethod": "GET", + "id": "tpu.projects.locations.runtimeVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/runtimeVersions", + "response": { + "$ref": "ListRuntimeVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20221004", + "rootUrl": "https://tpu.googleapis.com/", + "schemas": { + "AcceleratorType": { + "description": "A accelerator type that a Node can be configured with.", + "id": "AcceleratorType", + "properties": { + "name": { + "description": "The resource name.", + "type": "string" + }, + "type": { + "description": "the accelerator type.", + "type": "string" + } + }, + "type": "object" + }, + "AccessConfig": { + "description": "An access config attached to the TPU worker.", + "id": "AccessConfig", + "properties": { + "externalIp": { + "description": "Output only. An external IP address associated with the TPU worker.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AttachedDisk": { + "description": "A node-attached disk resource. Next ID: 8;", + "id": "AttachedDisk", + "properties": { + "mode": { + "description": "The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks.", + "enum": [ + "DISK_MODE_UNSPECIFIED", + "READ_WRITE", + "READ_ONLY" + ], + "enumDescriptions": [ + "The disk mode is not known/set.", + "Attaches the disk in read-write mode. Only one TPU node can attach a disk in read-write mode at a time.", + "Attaches the disk in read-only mode. Multiple TPU nodes can attach a disk in read-only mode at a time." + ], + "type": "string" + }, + "sourceDisk": { + "description": "Specifies the full path to an existing disk. For example: \"projects/my-project/zones/us-central1-c/disks/my-disk\".", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "GenerateServiceIdentityRequest": { + "description": "Request for GenerateServiceIdentity.", + "id": "GenerateServiceIdentityRequest", + "properties": {}, + "type": "object" + }, + "GenerateServiceIdentityResponse": { + "description": "Response for GenerateServiceIdentity.", + "id": "GenerateServiceIdentityResponse", + "properties": { + "identity": { + "$ref": "ServiceIdentity", + "description": "ServiceIdentity that was created or retrieved." + } + }, + "type": "object" + }, + "GetGuestAttributesRequest": { + "description": "Request for GetGuestAttributes.", + "id": "GetGuestAttributesRequest", + "properties": { + "queryPath": { + "description": "The guest attributes path to be queried.", + "type": "string" + }, + "workerIds": { + "description": "The 0-based worker ID. If it is empty, all workers' GuestAttributes will be returned.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GetGuestAttributesResponse": { + "description": "Response for GetGuestAttributes.", + "id": "GetGuestAttributesResponse", + "properties": { + "guestAttributes": { + "description": "The guest attributes for the TPU workers.", + "items": { + "$ref": "GuestAttributes" + }, + "type": "array" + } + }, + "type": "object" + }, + "GuestAttributes": { + "description": "A guest attributes.", + "id": "GuestAttributes", + "properties": { + "queryPath": { + "description": "The path to be queried. This can be the default namespace ('/') or a nested namespace ('/\\/') or a specified key ('/\\/\\')", + "type": "string" + }, + "queryValue": { + "$ref": "GuestAttributesValue", + "description": "The value of the requested queried path." + } + }, + "type": "object" + }, + "GuestAttributesEntry": { + "description": "A guest attributes namespace/key/value entry.", + "id": "GuestAttributesEntry", + "properties": { + "key": { + "description": "Key for the guest attribute entry.", + "type": "string" + }, + "namespace": { + "description": "Namespace for the guest attribute entry.", + "type": "string" + }, + "value": { + "description": "Value for the guest attribute entry.", + "type": "string" + } + }, + "type": "object" + }, + "GuestAttributesValue": { + "description": "Array of guest attribute namespace/key/value tuples.", + "id": "GuestAttributesValue", + "properties": { + "items": { + "description": "The list of guest attributes entries.", + "items": { + "$ref": "GuestAttributesEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListAcceleratorTypesResponse": { + "description": "Response for ListAcceleratorTypes.", + "id": "ListAcceleratorTypesResponse", + "properties": { + "acceleratorTypes": { + "description": "The listed nodes.", + "items": { + "$ref": "AcceleratorType" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The next page token or empty if none.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListNodesResponse": { + "description": "Response for ListNodes.", + "id": "ListNodesResponse", + "properties": { + "nextPageToken": { + "description": "The next page token or empty if none.", + "type": "string" + }, + "nodes": { + "description": "The listed nodes.", + "items": { + "$ref": "Node" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListRuntimeVersionsResponse": { + "description": "Response for ListRuntimeVersions.", + "id": "ListRuntimeVersionsResponse", + "properties": { + "nextPageToken": { + "description": "The next page token or empty if none.", + "type": "string" + }, + "runtimeVersions": { + "description": "The listed nodes.", + "items": { + "$ref": "RuntimeVersion" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "NetworkConfig": { + "description": "Network related configurations.", + "id": "NetworkConfig", + "properties": { + "canIpForward": { + "description": "Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.", + "type": "boolean" + }, + "enableExternalIps": { + "description": "Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.", + "type": "boolean" + }, + "network": { + "description": "The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, \"default\" will be used.", + "type": "string" + }, + "subnetwork": { + "description": "The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, \"default\" will be used.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkEndpoint": { + "description": "A network endpoint over which a TPU worker can be reached.", + "id": "NetworkEndpoint", + "properties": { + "accessConfig": { + "$ref": "AccessConfig", + "description": "The access config for the TPU worker." + }, + "ipAddress": { + "description": "The internal IP address of this network endpoint.", + "type": "string" + }, + "port": { + "description": "The port of this network endpoint.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Node": { + "description": "A TPU instance.", + "id": "Node", + "properties": { + "acceleratorType": { + "description": "Required. The type of hardware accelerators associated with this node.", + "type": "string" + }, + "apiVersion": { + "description": "Output only. The API version that created this Node.", + "enum": [ + "API_VERSION_UNSPECIFIED", + "V1_ALPHA1", + "V1", + "V2_ALPHA1", + "V2" + ], + "enumDescriptions": [ + "API version is unknown.", + "TPU API V1Alpha1 version.", + "TPU API V1 version.", + "TPU API V2Alpha1 version.", + "TPU API V2 version." + ], + "readOnly": true, + "type": "string" + }, + "cidrBlock": { + "description": "The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the node was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataDisks": { + "description": "The additional data disks for the Node.", + "items": { + "$ref": "AttachedDisk" + }, + "type": "array" + }, + "description": { + "description": "The user-supplied description of the TPU. Maximum of 512 characters.", + "type": "string" + }, + "health": { + "description": "The health status of the TPU node.", + "enum": [ + "HEALTH_UNSPECIFIED", + "HEALTHY", + "TIMEOUT", + "UNHEALTHY_TENSORFLOW", + "UNHEALTHY_MAINTENANCE" + ], + "enumDescriptions": [ + "Health status is unknown: not initialized or failed to retrieve.", + "The resource is healthy.", + "The resource is unresponsive.", + "The in-guest ML stack is unhealthy.", + "The node is under maintenance/priority boost caused rescheduling and will resume running once rescheduled." + ], + "type": "string" + }, + "healthDescription": { + "description": "Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.", + "readOnly": true, + "type": "string" + }, + "id": { + "description": "Output only. The unique identifier for the TPU Node.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource labels to represent user-provided metadata.", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script", + "type": "object" + }, + "name": { + "description": "Output only. Immutable. The name of the TPU.", + "readOnly": true, + "type": "string" + }, + "networkConfig": { + "$ref": "NetworkConfig", + "description": "Network configurations for the TPU node." + }, + "networkEndpoints": { + "description": "Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.", + "items": { + "$ref": "NetworkEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "runtimeVersion": { + "description": "Required. The runtime version running in the Node.", + "type": "string" + }, + "schedulingConfig": { + "$ref": "SchedulingConfig", + "description": "The scheduling options for this node." + }, + "serviceAccount": { + "$ref": "ServiceAccount", + "description": "The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used." + }, + "shieldedInstanceConfig": { + "$ref": "ShieldedInstanceConfig", + "description": "Shielded Instance options." + }, + "state": { + "description": "Output only. The current state for the TPU Node.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "RESTARTING", + "REIMAGING", + "DELETING", + "REPAIRING", + "STOPPED", + "STOPPING", + "STARTING", + "PREEMPTED", + "TERMINATED", + "HIDING", + "HIDDEN", + "UNHIDING" + ], + "enumDescriptions": [ + "TPU node state is not known/set.", + "TPU node is being created.", + "TPU node has been created.", + "TPU node is restarting.", + "TPU node is undergoing reimaging.", + "TPU node is being deleted.", + "TPU node is being repaired and may be unusable. Details can be found in the `help_description` field.", + "TPU node is stopped.", + "TPU node is currently stopping.", + "TPU node is currently starting.", + "TPU node has been preempted. Only applies to Preemptible TPU Nodes.", + "TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", + "TPU node is currently hiding.", + "TPU node has been hidden.", + "TPU node is currently unhiding." + ], + "readOnly": true, + "type": "string" + }, + "symptoms": { + "description": "Output only. The Symptoms that have occurred to the TPU Node.", + "items": { + "$ref": "Symptom" + }, + "readOnly": true, + "type": "array" + }, + "tags": { + "description": "Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Metadata describing an Operation", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "API version.", + "type": "string" + }, + "cancelRequested": { + "description": "Specifies if cancellation was requested for the operation.", + "type": "boolean" + }, + "createTime": { + "description": "The time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time the operation finished running.", + "format": "google-datetime", + "type": "string" + }, + "statusDetail": { + "description": "Human-readable status of the operation, if any.", + "type": "string" + }, + "target": { + "description": "Target of the operation - for example projects/project-1/connectivityTests/test-1", + "type": "string" + }, + "verb": { + "description": "Name of the verb executed by the operation.", + "type": "string" + } + }, + "type": "object" + }, + "RuntimeVersion": { + "description": "A runtime version that a Node can be configured with.", + "id": "RuntimeVersion", + "properties": { + "name": { + "description": "The resource name.", + "type": "string" + }, + "version": { + "description": "The runtime version.", + "type": "string" + } + }, + "type": "object" + }, + "SchedulingConfig": { + "description": "Sets the scheduling options for this node.", + "id": "SchedulingConfig", + "properties": { + "preemptible": { + "description": "Defines whether the node is preemptible.", + "type": "boolean" + }, + "reserved": { + "description": "Whether the node is created under a reservation.", + "type": "boolean" + } + }, + "type": "object" + }, + "ServiceAccount": { + "description": "A service account.", + "id": "ServiceAccount", + "properties": { + "email": { + "description": "Email address of the service account. If empty, default Compute service account will be used.", + "type": "string" + }, + "scope": { + "description": "The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ServiceIdentity": { + "description": "The per-product per-project service identity for Cloud TPU service.", + "id": "ServiceIdentity", + "properties": { + "email": { + "description": "The email address of the service identity.", + "type": "string" + } + }, + "type": "object" + }, + "ShieldedInstanceConfig": { + "description": "A set of Shielded Instance options.", + "id": "ShieldedInstanceConfig", + "properties": { + "enableSecureBoot": { + "description": "Defines whether the instance has Secure Boot enabled.", + "type": "boolean" + } + }, + "type": "object" + }, + "StartNodeRequest": { + "description": "Request for StartNode.", + "id": "StartNodeRequest", + "properties": {}, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StopNodeRequest": { + "description": "Request for StopNode.", + "id": "StopNodeRequest", + "properties": {}, + "type": "object" + }, + "Symptom": { + "description": "A Symptom instance.", + "id": "Symptom", + "properties": { + "createTime": { + "description": "Timestamp when the Symptom is created.", + "format": "google-datetime", + "type": "string" + }, + "details": { + "description": "Detailed information of the current Symptom.", + "type": "string" + }, + "symptomType": { + "description": "Type of the Symptom.", + "enum": [ + "SYMPTOM_TYPE_UNSPECIFIED", + "LOW_MEMORY", + "OUT_OF_MEMORY", + "EXECUTE_TIMED_OUT", + "MESH_BUILD_FAIL", + "HBM_OUT_OF_MEMORY", + "PROJECT_ABUSE" + ], + "enumDescriptions": [ + "Unspecified symptom.", + "TPU VM memory is low.", + "TPU runtime is out of memory.", + "TPU runtime execution has timed out.", + "TPU runtime fails to construct a mesh that recognizes each TPU device's neighbors.", + "TPU HBM is out of memory.", + "Abusive behaviors have been identified on the current project." + ], + "type": "string" + }, + "workerId": { + "description": "A string used to uniquely distinguish a worker within a TPU node.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud TPU API", + "version": "v2", + "version_module": true +} \ No newline at end of file diff --git a/tpu/v2/tpu-gen.go b/tpu/v2/tpu-gen.go new file mode 100644 index 00000000000..fc890e9e79b --- /dev/null +++ b/tpu/v2/tpu-gen.go @@ -0,0 +1,4416 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package tpu provides access to the Cloud TPU API. +// +// For product documentation, see: https://cloud.google.com/tpu/ +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/tpu/v2" +// ... +// ctx := context.Background() +// tpuService, err := tpu.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// tpuService, err := tpu.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// tpuService, err := tpu.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package tpu // import "google.golang.org/api/tpu/v2" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "tpu:v2" +const apiName = "tpu" +const apiVersion = "v2" +const basePath = "https://tpu.googleapis.com/" +const mtlsBasePath = "https://tpu.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.AcceleratorTypes = NewProjectsLocationsAcceleratorTypesService(s) + rs.Nodes = NewProjectsLocationsNodesService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.RuntimeVersions = NewProjectsLocationsRuntimeVersionsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + AcceleratorTypes *ProjectsLocationsAcceleratorTypesService + + Nodes *ProjectsLocationsNodesService + + Operations *ProjectsLocationsOperationsService + + RuntimeVersions *ProjectsLocationsRuntimeVersionsService +} + +func NewProjectsLocationsAcceleratorTypesService(s *Service) *ProjectsLocationsAcceleratorTypesService { + rs := &ProjectsLocationsAcceleratorTypesService{s: s} + return rs +} + +type ProjectsLocationsAcceleratorTypesService struct { + s *Service +} + +func NewProjectsLocationsNodesService(s *Service) *ProjectsLocationsNodesService { + rs := &ProjectsLocationsNodesService{s: s} + return rs +} + +type ProjectsLocationsNodesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsRuntimeVersionsService(s *Service) *ProjectsLocationsRuntimeVersionsService { + rs := &ProjectsLocationsRuntimeVersionsService{s: s} + return rs +} + +type ProjectsLocationsRuntimeVersionsService struct { + s *Service +} + +// AcceleratorType: A accelerator type that a Node can be configured +// with. +type AcceleratorType struct { + // Name: The resource name. + Name string `json:"name,omitempty"` + + // Type: the accelerator type. + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorType) MarshalJSON() ([]byte, error) { + type NoMethod AcceleratorType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AccessConfig: An access config attached to the TPU worker. +type AccessConfig struct { + // ExternalIp: Output only. An external IP address associated with the + // TPU worker. + ExternalIp string `json:"externalIp,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExternalIp") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExternalIp") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AccessConfig) MarshalJSON() ([]byte, error) { + type NoMethod AccessConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AttachedDisk: A node-attached disk resource. Next ID: 8; +type AttachedDisk struct { + // Mode: The mode in which to attach this disk. If not specified, the + // default is READ_WRITE mode. Only applicable to data_disks. + // + // Possible values: + // "DISK_MODE_UNSPECIFIED" - The disk mode is not known/set. + // "READ_WRITE" - Attaches the disk in read-write mode. Only one TPU + // node can attach a disk in read-write mode at a time. + // "READ_ONLY" - Attaches the disk in read-only mode. Multiple TPU + // nodes can attach a disk in read-only mode at a time. + Mode string `json:"mode,omitempty"` + + // SourceDisk: Specifies the full path to an existing disk. For example: + // "projects/my-project/zones/us-central1-c/disks/my-disk". + SourceDisk string `json:"sourceDisk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Mode") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AttachedDisk) MarshalJSON() ([]byte, error) { + type NoMethod AttachedDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GenerateServiceIdentityRequest: Request for GenerateServiceIdentity. +type GenerateServiceIdentityRequest struct { +} + +// GenerateServiceIdentityResponse: Response for +// GenerateServiceIdentity. +type GenerateServiceIdentityResponse struct { + // Identity: ServiceIdentity that was created or retrieved. + Identity *ServiceIdentity `json:"identity,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Identity") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Identity") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateServiceIdentityResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateServiceIdentityResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetGuestAttributesRequest: Request for GetGuestAttributes. +type GetGuestAttributesRequest struct { + // QueryPath: The guest attributes path to be queried. + QueryPath string `json:"queryPath,omitempty"` + + // WorkerIds: The 0-based worker ID. If it is empty, all workers' + // GuestAttributes will be returned. + WorkerIds []string `json:"workerIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QueryPath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "QueryPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GetGuestAttributesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GetGuestAttributesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetGuestAttributesResponse: Response for GetGuestAttributes. +type GetGuestAttributesResponse struct { + // GuestAttributes: The guest attributes for the TPU workers. + GuestAttributes []*GuestAttributes `json:"guestAttributes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "GuestAttributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GuestAttributes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GetGuestAttributesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GetGuestAttributesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestAttributes: A guest attributes. +type GuestAttributes struct { + // QueryPath: The path to be queried. This can be the default namespace + // ('/') or a nested namespace ('/\/') or a specified key ('/\/\') + QueryPath string `json:"queryPath,omitempty"` + + // QueryValue: The value of the requested queried path. + QueryValue *GuestAttributesValue `json:"queryValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QueryPath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "QueryPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GuestAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestAttributesEntry: A guest attributes namespace/key/value entry. +type GuestAttributesEntry struct { + // Key: Key for the guest attribute entry. + Key string `json:"key,omitempty"` + + // Namespace: Namespace for the guest attribute entry. + Namespace string `json:"namespace,omitempty"` + + // Value: Value for the guest attribute entry. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GuestAttributesEntry) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributesEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestAttributesValue: Array of guest attribute namespace/key/value +// tuples. +type GuestAttributesValue struct { + // Items: The list of guest attributes entries. + Items []*GuestAttributesEntry `json:"items,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GuestAttributesValue) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributesValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListAcceleratorTypesResponse: Response for ListAcceleratorTypes. +type ListAcceleratorTypesResponse struct { + // AcceleratorTypes: The listed nodes. + AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"` + + // NextPageToken: The next page token or empty if none. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AcceleratorTypes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListAcceleratorTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAcceleratorTypesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListNodesResponse: Response for ListNodes. +type ListNodesResponse struct { + // NextPageToken: The next page token or empty if none. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Nodes: The listed nodes. + Nodes []*Node `json:"nodes,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListNodesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNodesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListRuntimeVersionsResponse: Response for ListRuntimeVersions. +type ListRuntimeVersionsResponse struct { + // NextPageToken: The next page token or empty if none. + NextPageToken string `json:"nextPageToken,omitempty"` + + // RuntimeVersions: The listed nodes. + RuntimeVersions []*RuntimeVersion `json:"runtimeVersions,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListRuntimeVersionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRuntimeVersionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkConfig: Network related configurations. +type NetworkConfig struct { + // CanIpForward: Allows the TPU node to send and receive packets with + // non-matching destination or source IPs. This is required if you plan + // to use the TPU workers to forward routes. + CanIpForward bool `json:"canIpForward,omitempty"` + + // EnableExternalIps: Indicates that external IP addresses would be + // associated with the TPU workers. If set to false, the specified + // subnetwork or network should have Private Google Access enabled. + EnableExternalIps bool `json:"enableExternalIps,omitempty"` + + // Network: The name of the network for the TPU node. It must be a + // preexisting Google Compute Engine network. If none is provided, + // "default" will be used. + Network string `json:"network,omitempty"` + + // Subnetwork: The name of the subnetwork for the TPU node. It must be a + // preexisting Google Compute Engine subnetwork. If none is provided, + // "default" will be used. + Subnetwork string `json:"subnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanIpForward") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanIpForward") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpoint: A network endpoint over which a TPU worker can be +// reached. +type NetworkEndpoint struct { + // AccessConfig: The access config for the TPU worker. + AccessConfig *AccessConfig `json:"accessConfig,omitempty"` + + // IpAddress: The internal IP address of this network endpoint. + IpAddress string `json:"ipAddress,omitempty"` + + // Port: The port of this network endpoint. + Port int64 `json:"port,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Node: A TPU instance. +type Node struct { + // AcceleratorType: Required. The type of hardware accelerators + // associated with this node. + AcceleratorType string `json:"acceleratorType,omitempty"` + + // ApiVersion: Output only. The API version that created this Node. + // + // Possible values: + // "API_VERSION_UNSPECIFIED" - API version is unknown. + // "V1_ALPHA1" - TPU API V1Alpha1 version. + // "V1" - TPU API V1 version. + // "V2_ALPHA1" - TPU API V2Alpha1 version. + // "V2" - TPU API V2 version. + ApiVersion string `json:"apiVersion,omitempty"` + + // CidrBlock: The CIDR block that the TPU node will use when selecting + // an IP address. This CIDR block must be a /29 block; the Compute + // Engine networks API forbids a smaller block, and using a larger block + // would be wasteful (a node can only consume one IP address). Errors + // will occur if the CIDR block has already been used for a currently + // existing TPU node, the CIDR block conflicts with any subnetworks in + // the user's provided network, or the provided network is peered with + // another network that is using that CIDR block. + CidrBlock string `json:"cidrBlock,omitempty"` + + // CreateTime: Output only. The time when the node was created. + CreateTime string `json:"createTime,omitempty"` + + // DataDisks: The additional data disks for the Node. + DataDisks []*AttachedDisk `json:"dataDisks,omitempty"` + + // Description: The user-supplied description of the TPU. Maximum of 512 + // characters. + Description string `json:"description,omitempty"` + + // Health: The health status of the TPU node. + // + // Possible values: + // "HEALTH_UNSPECIFIED" - Health status is unknown: not initialized or + // failed to retrieve. + // "HEALTHY" - The resource is healthy. + // "TIMEOUT" - The resource is unresponsive. + // "UNHEALTHY_TENSORFLOW" - The in-guest ML stack is unhealthy. + // "UNHEALTHY_MAINTENANCE" - The node is under maintenance/priority + // boost caused rescheduling and will resume running once rescheduled. + Health string `json:"health,omitempty"` + + // HealthDescription: Output only. If this field is populated, it + // contains a description of why the TPU Node is unhealthy. + HealthDescription string `json:"healthDescription,omitempty"` + + // Id: Output only. The unique identifier for the TPU Node. + Id int64 `json:"id,omitempty,string"` + + // Labels: Resource labels to represent user-provided metadata. + Labels map[string]string `json:"labels,omitempty"` + + // Metadata: Custom metadata to apply to the TPU Node. Can set + // startup-script and shutdown-script + Metadata map[string]string `json:"metadata,omitempty"` + + // Name: Output only. Immutable. The name of the TPU. + Name string `json:"name,omitempty"` + + // NetworkConfig: Network configurations for the TPU node. + NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` + + // NetworkEndpoints: Output only. The network endpoints where TPU + // workers can be accessed and sent work. It is recommended that runtime + // clients of the node reach out to the 0th entry in this map first. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` + + // RuntimeVersion: Required. The runtime version running in the Node. + RuntimeVersion string `json:"runtimeVersion,omitempty"` + + // SchedulingConfig: The scheduling options for this node. + SchedulingConfig *SchedulingConfig `json:"schedulingConfig,omitempty"` + + // ServiceAccount: The Google Cloud Platform Service Account to be used + // by the TPU node VMs. If None is specified, the default compute + // service account will be used. + ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` + + // ShieldedInstanceConfig: Shielded Instance options. + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + + // State: Output only. The current state for the TPU Node. + // + // Possible values: + // "STATE_UNSPECIFIED" - TPU node state is not known/set. + // "CREATING" - TPU node is being created. + // "READY" - TPU node has been created. + // "RESTARTING" - TPU node is restarting. + // "REIMAGING" - TPU node is undergoing reimaging. + // "DELETING" - TPU node is being deleted. + // "REPAIRING" - TPU node is being repaired and may be unusable. + // Details can be found in the `help_description` field. + // "STOPPED" - TPU node is stopped. + // "STOPPING" - TPU node is currently stopping. + // "STARTING" - TPU node is currently starting. + // "PREEMPTED" - TPU node has been preempted. Only applies to + // Preemptible TPU Nodes. + // "TERMINATED" - TPU node has been terminated due to maintenance or + // has reached the end of its life cycle (for preemptible nodes). + // "HIDING" - TPU node is currently hiding. + // "HIDDEN" - TPU node has been hidden. + // "UNHIDING" - TPU node is currently unhiding. + State string `json:"state,omitempty"` + + // Symptoms: Output only. The Symptoms that have occurred to the TPU + // Node. + Symptoms []*Symptom `json:"symptoms,omitempty"` + + // Tags: Tags to apply to the TPU Node. Tags are used to identify valid + // sources or targets for network firewalls. + Tags []string `json:"tags,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AcceleratorType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AcceleratorType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Node) MarshalJSON() ([]byte, error) { + type NoMethod Node + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Metadata describing an Operation +type OperationMetadata struct { + // ApiVersion: API version. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Specifies if cancellation was requested for the + // operation. + CancelRequested bool `json:"cancelRequested,omitempty"` + + // CreateTime: The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // StatusDetail: Human-readable status of the operation, if any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Target of the operation - for example + // projects/project-1/connectivityTests/test-1 + Target string `json:"target,omitempty"` + + // Verb: Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RuntimeVersion: A runtime version that a Node can be configured with. +type RuntimeVersion struct { + // Name: The resource name. + Name string `json:"name,omitempty"` + + // Version: The runtime version. + Version string `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RuntimeVersion) MarshalJSON() ([]byte, error) { + type NoMethod RuntimeVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SchedulingConfig: Sets the scheduling options for this node. +type SchedulingConfig struct { + // Preemptible: Defines whether the node is preemptible. + Preemptible bool `json:"preemptible,omitempty"` + + // Reserved: Whether the node is created under a reservation. + Reserved bool `json:"reserved,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Preemptible") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Preemptible") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SchedulingConfig) MarshalJSON() ([]byte, error) { + type NoMethod SchedulingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceAccount: A service account. +type ServiceAccount struct { + // Email: Email address of the service account. If empty, default + // Compute service account will be used. + Email string `json:"email,omitempty"` + + // Scope: The list of scopes to be made available for this service + // account. If empty, access to all Cloud APIs will be allowed. + Scope []string `json:"scope,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceAccount) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAccount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceIdentity: The per-product per-project service identity for +// Cloud TPU service. +type ServiceIdentity struct { + // Email: The email address of the service identity. + Email string `json:"email,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceIdentity) MarshalJSON() ([]byte, error) { + type NoMethod ServiceIdentity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceConfig: A set of Shielded Instance options. +type ShieldedInstanceConfig struct { + // EnableSecureBoot: Defines whether the instance has Secure Boot + // enabled. + EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnableSecureBoot") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableSecureBoot") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StartNodeRequest: Request for StartNode. +type StartNodeRequest struct { +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StopNodeRequest: Request for StopNode. +type StopNodeRequest struct { +} + +// Symptom: A Symptom instance. +type Symptom struct { + // CreateTime: Timestamp when the Symptom is created. + CreateTime string `json:"createTime,omitempty"` + + // Details: Detailed information of the current Symptom. + Details string `json:"details,omitempty"` + + // SymptomType: Type of the Symptom. + // + // Possible values: + // "SYMPTOM_TYPE_UNSPECIFIED" - Unspecified symptom. + // "LOW_MEMORY" - TPU VM memory is low. + // "OUT_OF_MEMORY" - TPU runtime is out of memory. + // "EXECUTE_TIMED_OUT" - TPU runtime execution has timed out. + // "MESH_BUILD_FAIL" - TPU runtime fails to construct a mesh that + // recognizes each TPU device's neighbors. + // "HBM_OUT_OF_MEMORY" - TPU HBM is out of memory. + // "PROJECT_ABUSE" - Abusive behaviors have been identified on the + // current project. + SymptomType string `json:"symptomType,omitempty"` + + // WorkerId: A string used to uniquely distinguish a worker within a TPU + // node. + WorkerId string `json:"workerId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Symptom) MarshalJSON() ([]byte, error) { + type NoMethod Symptom + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "tpu.projects.locations.generateServiceIdentity": + +type ProjectsLocationsGenerateServiceIdentityCall struct { + s *Service + parent string + generateserviceidentityrequest *GenerateServiceIdentityRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateServiceIdentity: Generates the Cloud TPU service identity for +// the project. +// +// - parent: The parent resource name. +func (r *ProjectsLocationsService) GenerateServiceIdentity(parent string, generateserviceidentityrequest *GenerateServiceIdentityRequest) *ProjectsLocationsGenerateServiceIdentityCall { + c := &ProjectsLocationsGenerateServiceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.generateserviceidentityrequest = generateserviceidentityrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGenerateServiceIdentityCall) Fields(s ...googleapi.Field) *ProjectsLocationsGenerateServiceIdentityCall { + 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 *ProjectsLocationsGenerateServiceIdentityCall) Context(ctx context.Context) *ProjectsLocationsGenerateServiceIdentityCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGenerateServiceIdentityCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGenerateServiceIdentityCall) doRequest(alt string) (*http.Response, 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.generateserviceidentityrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}:generateServiceIdentity") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.generateServiceIdentity" call. +// Exactly one of *GenerateServiceIdentityResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GenerateServiceIdentityResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGenerateServiceIdentityCall) Do(opts ...googleapi.CallOption) (*GenerateServiceIdentityResponse, error) { + gensupport.SetOptions(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 := &GenerateServiceIdentityResponse{ + ServerResponse: 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": "Generates the Cloud TPU service identity for the project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}:generateServiceIdentity", + // "httpMethod": "POST", + // "id": "tpu.projects.locations.generateServiceIdentity", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}:generateServiceIdentity", + // "request": { + // "$ref": "GenerateServiceIdentityRequest" + // }, + // "response": { + // "$ref": "GenerateServiceIdentityResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: 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 := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: 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 := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v2/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "tpu.projects.locations.acceleratorTypes.get": + +type ProjectsLocationsAcceleratorTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets AcceleratorType. +// +// - name: The resource name. +func (r *ProjectsLocationsAcceleratorTypesService) Get(name string) *ProjectsLocationsAcceleratorTypesGetCall { + c := &ProjectsLocationsAcceleratorTypesGetCall{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 *ProjectsLocationsAcceleratorTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAcceleratorTypesGetCall { + 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 *ProjectsLocationsAcceleratorTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAcceleratorTypesGetCall { + 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 *ProjectsLocationsAcceleratorTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAcceleratorTypesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAcceleratorTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.acceleratorTypes.get" call. +// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AcceleratorType.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) { + gensupport.SetOptions(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 := &AcceleratorType{ + ServerResponse: 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 AcceleratorType.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/acceleratorTypes/{acceleratorTypesId}", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.acceleratorTypes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "AcceleratorType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.acceleratorTypes.list": + +type ProjectsLocationsAcceleratorTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists accelerator types supported by this API. +// +// - parent: The parent resource name. +func (r *ProjectsLocationsAcceleratorTypesService) List(parent string) *ProjectsLocationsAcceleratorTypesListCall { + c := &ProjectsLocationsAcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsAcceleratorTypesListCall) Filter(filter string) *ProjectsLocationsAcceleratorTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. +func (c *ProjectsLocationsAcceleratorTypesListCall) OrderBy(orderBy string) *ProjectsLocationsAcceleratorTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. +func (c *ProjectsLocationsAcceleratorTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAcceleratorTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous List request, if any. +func (c *ProjectsLocationsAcceleratorTypesListCall) PageToken(pageToken string) *ProjectsLocationsAcceleratorTypesListCall { + 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 *ProjectsLocationsAcceleratorTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAcceleratorTypesListCall { + 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 *ProjectsLocationsAcceleratorTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAcceleratorTypesListCall { + 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 *ProjectsLocationsAcceleratorTypesListCall) Context(ctx context.Context) *ProjectsLocationsAcceleratorTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAcceleratorTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/acceleratorTypes") + 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 "tpu.projects.locations.acceleratorTypes.list" call. +// Exactly one of *ListAcceleratorTypesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAcceleratorTypesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*ListAcceleratorTypesResponse, error) { + gensupport.SetOptions(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 := &ListAcceleratorTypesResponse{ + ServerResponse: 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 accelerator types supported by this API.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/acceleratorTypes", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.acceleratorTypes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/acceleratorTypes", + // "response": { + // "$ref": "ListAcceleratorTypesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsAcceleratorTypesListCall) Pages(ctx context.Context, f func(*ListAcceleratorTypesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "tpu.projects.locations.nodes.create": + +type ProjectsLocationsNodesCreateCall struct { + s *Service + parent string + node *Node + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a node. +// +// - parent: The parent resource name. +func (r *ProjectsLocationsNodesService) Create(parent string, node *Node) *ProjectsLocationsNodesCreateCall { + c := &ProjectsLocationsNodesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.node = node + return c +} + +// NodeId sets the optional parameter "nodeId": The unqualified resource +// name. +func (c *ProjectsLocationsNodesCreateCall) NodeId(nodeId string) *ProjectsLocationsNodesCreateCall { + c.urlParams_.Set("nodeId", nodeId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNodesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesCreateCall { + 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 *ProjectsLocationsNodesCreateCall) Context(ctx context.Context) *ProjectsLocationsNodesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNodesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesCreateCall) doRequest(alt string) (*http.Response, 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.node) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nodes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.nodes.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNodesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a node.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes", + // "httpMethod": "POST", + // "id": "tpu.projects.locations.nodes.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "nodeId": { + // "description": "The unqualified resource name.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/nodes", + // "request": { + // "$ref": "Node" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.nodes.delete": + +type ProjectsLocationsNodesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a node. +// +// - name: The resource name. +func (r *ProjectsLocationsNodesService) Delete(name string) *ProjectsLocationsNodesDeleteCall { + c := &ProjectsLocationsNodesDeleteCall{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 *ProjectsLocationsNodesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesDeleteCall { + 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 *ProjectsLocationsNodesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNodesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNodesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.nodes.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNodesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a node.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", + // "httpMethod": "DELETE", + // "id": "tpu.projects.locations.nodes.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.nodes.get": + +type ProjectsLocationsNodesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a node. +// +// - name: The resource name. +func (r *ProjectsLocationsNodesService) Get(name string) *ProjectsLocationsNodesGetCall { + c := &ProjectsLocationsNodesGetCall{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 *ProjectsLocationsNodesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesGetCall { + 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 *ProjectsLocationsNodesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodesGetCall { + 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 *ProjectsLocationsNodesGetCall) Context(ctx context.Context) *ProjectsLocationsNodesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNodesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.nodes.get" call. +// Exactly one of *Node or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Node.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsNodesGetCall) Do(opts ...googleapi.CallOption) (*Node, error) { + gensupport.SetOptions(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 := &Node{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a node.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.nodes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Node" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.nodes.getGuestAttributes": + +type ProjectsLocationsNodesGetGuestAttributesCall struct { + s *Service + name string + getguestattributesrequest *GetGuestAttributesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetGuestAttributes: Retrieves the guest attributes for the node. +// +// - name: The resource name. +func (r *ProjectsLocationsNodesService) GetGuestAttributes(name string, getguestattributesrequest *GetGuestAttributesRequest) *ProjectsLocationsNodesGetGuestAttributesCall { + c := &ProjectsLocationsNodesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.getguestattributesrequest = getguestattributesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNodesGetGuestAttributesCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesGetGuestAttributesCall { + 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 *ProjectsLocationsNodesGetGuestAttributesCall) Context(ctx context.Context) *ProjectsLocationsNodesGetGuestAttributesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNodesGetGuestAttributesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesGetGuestAttributesCall) doRequest(alt string) (*http.Response, 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.getguestattributesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:getGuestAttributes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.nodes.getGuestAttributes" call. +// Exactly one of *GetGuestAttributesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GetGuestAttributesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNodesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GetGuestAttributesResponse, error) { + gensupport.SetOptions(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 := &GetGuestAttributesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the guest attributes for the node.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:getGuestAttributes", + // "httpMethod": "POST", + // "id": "tpu.projects.locations.nodes.getGuestAttributes", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:getGuestAttributes", + // "request": { + // "$ref": "GetGuestAttributesRequest" + // }, + // "response": { + // "$ref": "GetGuestAttributesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.nodes.list": + +type ProjectsLocationsNodesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists nodes. +// +// - parent: The parent resource name. +func (r *ProjectsLocationsNodesService) List(parent string) *ProjectsLocationsNodesListCall { + c := &ProjectsLocationsNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. +func (c *ProjectsLocationsNodesListCall) PageSize(pageSize int64) *ProjectsLocationsNodesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous List request, if any. +func (c *ProjectsLocationsNodesListCall) PageToken(pageToken string) *ProjectsLocationsNodesListCall { + 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 *ProjectsLocationsNodesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesListCall { + 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 *ProjectsLocationsNodesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodesListCall { + 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 *ProjectsLocationsNodesListCall) Context(ctx context.Context) *ProjectsLocationsNodesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNodesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nodes") + 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 "tpu.projects.locations.nodes.list" call. +// Exactly one of *ListNodesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNodesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNodesListCall) Do(opts ...googleapi.CallOption) (*ListNodesResponse, error) { + gensupport.SetOptions(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 := &ListNodesResponse{ + ServerResponse: 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 nodes.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.nodes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/nodes", + // "response": { + // "$ref": "ListNodesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsNodesListCall) Pages(ctx context.Context, f func(*ListNodesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "tpu.projects.locations.nodes.patch": + +type ProjectsLocationsNodesPatchCall struct { + s *Service + name string + node *Node + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the configurations of a node. +// +// - name: Output only. Immutable. The name of the TPU. +func (r *ProjectsLocationsNodesService) Patch(name string, node *Node) *ProjectsLocationsNodesPatchCall { + c := &ProjectsLocationsNodesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.node = node + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields from Node to update. Supported fields: [description, tags, +// labels, metadata, network_config.enable_external_ips]. +func (c *ProjectsLocationsNodesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNodesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNodesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesPatchCall { + 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 *ProjectsLocationsNodesPatchCall) Context(ctx context.Context) *ProjectsLocationsNodesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNodesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesPatchCall) doRequest(alt string) (*http.Response, 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.node) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.nodes.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNodesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the configurations of a node.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", + // "httpMethod": "PATCH", + // "id": "tpu.projects.locations.nodes.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Immutable. The name of the TPU.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "Node" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.nodes.start": + +type ProjectsLocationsNodesStartCall struct { + s *Service + name string + startnoderequest *StartNodeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Start: Starts a node. +// +// - name: The resource name. +func (r *ProjectsLocationsNodesService) Start(name string, startnoderequest *StartNodeRequest) *ProjectsLocationsNodesStartCall { + c := &ProjectsLocationsNodesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.startnoderequest = startnoderequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNodesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesStartCall { + 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 *ProjectsLocationsNodesStartCall) Context(ctx context.Context) *ProjectsLocationsNodesStartCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNodesStartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesStartCall) doRequest(alt string) (*http.Response, 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.startnoderequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:start") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.nodes.start" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNodesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts a node.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:start", + // "httpMethod": "POST", + // "id": "tpu.projects.locations.nodes.start", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:start", + // "request": { + // "$ref": "StartNodeRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.nodes.stop": + +type ProjectsLocationsNodesStopCall struct { + s *Service + name string + stopnoderequest *StopNodeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stops a node. This operation is only available with single TPU +// nodes. +// +// - name: The resource name. +func (r *ProjectsLocationsNodesService) Stop(name string, stopnoderequest *StopNodeRequest) *ProjectsLocationsNodesStopCall { + c := &ProjectsLocationsNodesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.stopnoderequest = stopnoderequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNodesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesStopCall { + 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 *ProjectsLocationsNodesStopCall) Context(ctx context.Context) *ProjectsLocationsNodesStopCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNodesStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesStopCall) doRequest(alt string) (*http.Response, 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.stopnoderequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:stop") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.nodes.stop" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNodesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Stops a node. This operation is only available with single TPU nodes.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:stop", + // "httpMethod": "POST", + // "id": "tpu.projects.locations.nodes.stop", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:stop", + // "request": { + // "$ref": "StopNodeRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "tpu.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:cancel", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "tpu.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "tpu.projects.locations.runtimeVersions.get": + +type ProjectsLocationsRuntimeVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a runtime version. +// +// - name: The resource name. +func (r *ProjectsLocationsRuntimeVersionsService) Get(name string) *ProjectsLocationsRuntimeVersionsGetCall { + c := &ProjectsLocationsRuntimeVersionsGetCall{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 *ProjectsLocationsRuntimeVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeVersionsGetCall { + 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 *ProjectsLocationsRuntimeVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimeVersionsGetCall { + 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 *ProjectsLocationsRuntimeVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsRuntimeVersionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRuntimeVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRuntimeVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "tpu.projects.locations.runtimeVersions.get" call. +// Exactly one of *RuntimeVersion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *RuntimeVersion.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRuntimeVersionsGetCall) Do(opts ...googleapi.CallOption) (*RuntimeVersion, error) { + gensupport.SetOptions(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 := &RuntimeVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a runtime version.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/runtimeVersions/{runtimeVersionsId}", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.runtimeVersions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/runtimeVersions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "RuntimeVersion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "tpu.projects.locations.runtimeVersions.list": + +type ProjectsLocationsRuntimeVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists runtime versions supported by this API. +// +// - parent: The parent resource name. +func (r *ProjectsLocationsRuntimeVersionsService) List(parent string) *ProjectsLocationsRuntimeVersionsListCall { + c := &ProjectsLocationsRuntimeVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsRuntimeVersionsListCall) Filter(filter string) *ProjectsLocationsRuntimeVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. +func (c *ProjectsLocationsRuntimeVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsRuntimeVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. +func (c *ProjectsLocationsRuntimeVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsRuntimeVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous List request, if any. +func (c *ProjectsLocationsRuntimeVersionsListCall) PageToken(pageToken string) *ProjectsLocationsRuntimeVersionsListCall { + 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 *ProjectsLocationsRuntimeVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeVersionsListCall { + 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 *ProjectsLocationsRuntimeVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimeVersionsListCall { + 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 *ProjectsLocationsRuntimeVersionsListCall) Context(ctx context.Context) *ProjectsLocationsRuntimeVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRuntimeVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRuntimeVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/runtimeVersions") + 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 "tpu.projects.locations.runtimeVersions.list" call. +// Exactly one of *ListRuntimeVersionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListRuntimeVersionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRuntimeVersionsListCall) Do(opts ...googleapi.CallOption) (*ListRuntimeVersionsResponse, error) { + gensupport.SetOptions(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 := &ListRuntimeVersionsResponse{ + ServerResponse: 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 runtime versions supported by this API.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/runtimeVersions", + // "httpMethod": "GET", + // "id": "tpu.projects.locations.runtimeVersions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/runtimeVersions", + // "response": { + // "$ref": "ListRuntimeVersionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRuntimeVersionsListCall) Pages(ctx context.Context, f func(*ListRuntimeVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +}