From c3f4828eeedfb2d662e36ad6b37c2874de85885e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 16 May 2024 00:24:17 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2589) --- adsense/v2/adsense-api.json | 4 +- adsense/v2/adsense-gen.go | 3 +- androidpublisher/v3/androidpublisher-api.json | 20 +- androidpublisher/v3/androidpublisher-gen.go | 29 +++ compute/v1/compute-api.json | 31 +-- compute/v1/compute-gen.go | 50 +--- osconfig/v1/osconfig-api.json | 22 +- osconfig/v1/osconfig-gen.go | 32 +++ osconfig/v1alpha/osconfig-api.json | 22 +- osconfig/v1alpha/osconfig-gen.go | 32 +++ .../serviceconsumermanagement-api.json | 37 ++- .../v1beta1/serviceconsumermanagement-gen.go | 56 ++-- youtube/v3/youtube-api.json | 78 +++--- youtube/v3/youtube-gen.go | 240 ++++++++---------- 14 files changed, 374 insertions(+), 282 deletions(-) diff --git a/adsense/v2/adsense-api.json b/adsense/v2/adsense-api.json index 97998edb94e..af46f01358f 100644 --- a/adsense/v2/adsense-api.json +++ b/adsense/v2/adsense-api.json @@ -867,7 +867,7 @@ ] }, "list": { - "description": "Lists all the policy issues for the specified account.", + "description": "Lists all the policy issues where the specified account is involved, both directly and through any AFP child accounts.", "flatPath": "v2/accounts/{accountsId}/policyIssues", "httpMethod": "GET", "id": "adsense.accounts.policyIssues.list", @@ -1912,7 +1912,7 @@ } } }, - "revision": "20240324", + "revision": "20240515", "rootUrl": "https://adsense.googleapis.com/", "schemas": { "Account": { diff --git a/adsense/v2/adsense-gen.go b/adsense/v2/adsense-gen.go index 51fdb465f15..a71062fae0c 100644 --- a/adsense/v2/adsense-gen.go +++ b/adsense/v2/adsense-gen.go @@ -4465,7 +4465,8 @@ type AccountsPolicyIssuesListCall struct { header_ http.Header } -// List: Lists all the policy issues for the specified account. +// List: Lists all the policy issues where the specified account is involved, +// both directly and through any AFP child accounts. // // - parent: The account for which policy issues are being retrieved. Format: // accounts/{account}. diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 91b06b00e65..c918e3e3934 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -4731,7 +4731,7 @@ } } }, - "revision": "20240514", + "revision": "20240515", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -8145,6 +8145,20 @@ "properties": {}, "type": "object" }, + "RestrictedPaymentCountries": { + "description": "Countries where the purchase of this product is restricted to payment methods registered in the same country. If empty, no payment location restrictions are imposed.", + "id": "RestrictedPaymentCountries", + "properties": { + "regionCodes": { + "description": "Required. Region codes to impose payment restrictions on, as defined by ISO 3166-2, e.g. \"US\".", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Review": { "description": "An Android app review.", "id": "Review", @@ -8480,6 +8494,10 @@ "description": "Immutable. Unique product ID of the product. Unique within the parent app. Product IDs must be composed of lower-case letters (a-z), numbers (0-9), underscores (_) and dots (.). It must start with a lower-case letter or number, and be between 1 and 40 (inclusive) characters in length.", "type": "string" }, + "restrictedPaymentCountries": { + "$ref": "RestrictedPaymentCountries", + "description": "Optional. Countries where the purchase of this subscription is restricted to payment methods registered in the same country. If empty, no payment location restrictions are imposed." + }, "taxAndComplianceSettings": { "$ref": "SubscriptionTaxAndComplianceSettings", "description": "Details about taxes and legal compliance." diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 42d80aaf7db..ca5a40f3f77 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -5182,6 +5182,31 @@ func (s *RemoteInAppUpdateDataPerBundle) MarshalJSON() ([]byte, error) { type ReplacementCancellation struct { } +// RestrictedPaymentCountries: Countries where the purchase of this product is +// restricted to payment methods registered in the same country. If empty, no +// payment location restrictions are imposed. +type RestrictedPaymentCountries struct { + // RegionCodes: Required. Region codes to impose payment restrictions on, as + // defined by ISO 3166-2, e.g. "US". + RegionCodes []string `json:"regionCodes,omitempty"` + // ForceSendFields is a list of field names (e.g. "RegionCodes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RegionCodes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *RestrictedPaymentCountries) MarshalJSON() ([]byte, error) { + type NoMethod RestrictedPaymentCountries + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Review: An Android app review. type Review struct { // AuthorName: The name of the user who wrote the review. @@ -5641,6 +5666,10 @@ type Subscription struct { // numbers (0-9), underscores (_) and dots (.). It must start with a lower-case // letter or number, and be between 1 and 40 (inclusive) characters in length. ProductId string `json:"productId,omitempty"` + // RestrictedPaymentCountries: Optional. Countries where the purchase of this + // subscription is restricted to payment methods registered in the same + // country. If empty, no payment location restrictions are imposed. + RestrictedPaymentCountries *RestrictedPaymentCountries `json:"restrictedPaymentCountries,omitempty"` // TaxAndComplianceSettings: Details about taxes and legal compliance. TaxAndComplianceSettings *SubscriptionTaxAndComplianceSettings `json:"taxAndComplianceSettings,omitempty"` diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 73c60a07bcb..c31acb91571 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -37421,7 +37421,7 @@ } } }, - "revision": "20240430", + "revision": "20240507", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -39174,31 +39174,6 @@ }, "type": "object" }, - "AuthorizationLoggingOptions": { - "description": "This is deprecated and has no effect. Do not use.", - "id": "AuthorizationLoggingOptions", - "properties": { - "permissionType": { - "description": "This is deprecated and has no effect. Do not use.", - "enum": [ - "ADMIN_READ", - "ADMIN_WRITE", - "DATA_READ", - "DATA_WRITE", - "PERMISSION_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "This is deprecated and has no effect. Do not use.", - "This is deprecated and has no effect. Do not use.", - "This is deprecated and has no effect. Do not use.", - "This is deprecated and has no effect. Do not use.", - "This is deprecated and has no effect. Do not use." - ], - "type": "string" - } - }, - "type": "object" - }, "Autoscaler": { "description": "Represents an Autoscaler resource. Google Compute Engine has two Autoscaler resources: * [Zonal](/compute/docs/reference/rest/v1/autoscalers) * [Regional](/compute/docs/reference/rest/v1/regionAutoscalers) Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances. For zonal managed instance groups resource, use the autoscaler resource. For regional managed instance groups, use the regionAutoscalers resource.", "id": "Autoscaler", @@ -56603,10 +56578,6 @@ "description": "This is deprecated and has no effect. Do not use.", "id": "LogConfigCloudAuditOptions", "properties": { - "authorizationLoggingOptions": { - "$ref": "AuthorizationLoggingOptions", - "description": "This is deprecated and has no effect. Do not use." - }, "logName": { "description": "This is deprecated and has no effect. Do not use.", "enum": [ diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index a9a05148d53..91bbf8a8720 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -3305,37 +3305,6 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// AuthorizationLoggingOptions: This is deprecated and has no effect. Do not -// use. -type AuthorizationLoggingOptions struct { - // PermissionType: This is deprecated and has no effect. Do not use. - // - // Possible values: - // "ADMIN_READ" - This is deprecated and has no effect. Do not use. - // "ADMIN_WRITE" - This is deprecated and has no effect. Do not use. - // "DATA_READ" - This is deprecated and has no effect. Do not use. - // "DATA_WRITE" - This is deprecated and has no effect. Do not use. - // "PERMISSION_TYPE_UNSPECIFIED" - This is deprecated and has no effect. Do - // not use. - PermissionType string `json:"permissionType,omitempty"` - // ForceSendFields is a list of field names (e.g. "PermissionType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PermissionType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { - type NoMethod AuthorizationLoggingOptions - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // Autoscaler: Represents an Autoscaler resource. Google Compute Engine has two // Autoscaler resources: * Zonal (/compute/docs/reference/rest/v1/autoscalers) // * Regional (/compute/docs/reference/rest/v1/regionAutoscalers) Use @@ -23600,9 +23569,6 @@ func (s *LogConfig) MarshalJSON() ([]byte, error) { // LogConfigCloudAuditOptions: This is deprecated and has no effect. Do not // use. type LogConfigCloudAuditOptions struct { - // AuthorizationLoggingOptions: This is deprecated and has no effect. Do not - // use. - AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` // LogName: This is deprecated and has no effect. Do not use. // // Possible values: @@ -23610,15 +23576,15 @@ type LogConfigCloudAuditOptions struct { // "DATA_ACCESS" - This is deprecated and has no effect. Do not use. // "UNSPECIFIED_LOG_NAME" - This is deprecated and has no effect. Do not use. LogName string `json:"logName,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AuthorizationLoggingOptions") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. + // ForceSendFields is a list of field names (e.g. "LogName") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthorizationLoggingOptions") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "LogName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/osconfig/v1/osconfig-api.json b/osconfig/v1/osconfig-api.json index 772dad842e9..bbafaa49e23 100644 --- a/osconfig/v1/osconfig-api.json +++ b/osconfig/v1/osconfig-api.json @@ -442,6 +442,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/osPolicyAssignments", @@ -470,6 +475,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -586,6 +596,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the OS policy assignment is not found, a new OS policy assignment will be created. In this situation, `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.", "location": "path", @@ -593,6 +608,11 @@ "required": true, "type": "string" }, + "requestId": { + "description": "Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", + "location": "query", + "type": "string" + }, "updateMask": { "description": "Optional. Field mask that controls which fields of the assignment should be updated.", "format": "google-fieldmask", @@ -1063,7 +1083,7 @@ } } }, - "revision": "20240407", + "revision": "20240512", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptSettings": { diff --git a/osconfig/v1/osconfig-gen.go b/osconfig/v1/osconfig-gen.go index 24b16dab1dc..1a820c9d6c2 100644 --- a/osconfig/v1/osconfig-gen.go +++ b/osconfig/v1/osconfig-gen.go @@ -4842,6 +4842,14 @@ func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) OsPolicyAssignmentId(os return c } +// RequestId sets the optional parameter "requestId": A unique identifier for +// this request. Restricted to 36 ASCII characters. A random UUID is +// recommended. This request is only idempotent if a `request_id` is provided. +func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -4947,6 +4955,14 @@ func (r *ProjectsLocationsOsPolicyAssignmentsService) Delete(name string) *Proje return c } +// RequestId sets the optional parameter "requestId": A unique identifier for +// this request. Restricted to 36 ASCII characters. A random UUID is +// recommended. This request is only idempotent if a `request_id` is provided. +func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -5454,6 +5470,22 @@ func (r *ProjectsLocationsOsPolicyAssignmentsService) Patch(name string, ospolic return c } +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the OS policy assignment is not found, a new OS policy assignment will be +// created. In this situation, `update_mask` is ignored. +func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsOsPolicyAssignmentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": A unique identifier for +// this request. Restricted to 36 ASCII characters. A random UUID is +// recommended. This request is only idempotent if a `request_id` is provided. +func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // UpdateMask sets the optional parameter "updateMask": Field mask that // controls which fields of the assignment should be updated. func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsOsPolicyAssignmentsPatchCall { diff --git a/osconfig/v1alpha/osconfig-api.json b/osconfig/v1alpha/osconfig-api.json index 60831a39ed0..ba01f35510e 100644 --- a/osconfig/v1alpha/osconfig-api.json +++ b/osconfig/v1alpha/osconfig-api.json @@ -452,6 +452,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", + "location": "query", + "type": "string" } }, "path": "v1alpha/{+parent}/osPolicyAssignments", @@ -480,6 +485,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", + "location": "query", + "type": "string" } }, "path": "v1alpha/{+name}", @@ -596,6 +606,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the OS policy assignment is not found, a new OS policy assignment will be created. In this situation, `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.", "location": "path", @@ -603,6 +618,11 @@ "required": true, "type": "string" }, + "requestId": { + "description": "Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", + "location": "query", + "type": "string" + }, "updateMask": { "description": "Optional. Field mask that controls which fields of the assignment should be updated.", "format": "google-fieldmask", @@ -687,7 +707,7 @@ } } }, - "revision": "20230806", + "revision": "20240512", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "CVSSv3": { diff --git a/osconfig/v1alpha/osconfig-gen.go b/osconfig/v1alpha/osconfig-gen.go index 7884fcf597a..29ecdc4afe9 100644 --- a/osconfig/v1alpha/osconfig-gen.go +++ b/osconfig/v1alpha/osconfig-gen.go @@ -4000,6 +4000,14 @@ func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) OsPolicyAssignmentId(os return c } +// RequestId sets the optional parameter "requestId": A unique identifier for +// this request. Restricted to 36 ASCII characters. A random UUID is +// recommended. This request is only idempotent if a `request_id` is provided. +func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -4105,6 +4113,14 @@ func (r *ProjectsLocationsOsPolicyAssignmentsService) Delete(name string) *Proje return c } +// RequestId sets the optional parameter "requestId": A unique identifier for +// this request. Restricted to 36 ASCII characters. A random UUID is +// recommended. This request is only idempotent if a `request_id` is provided. +func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -4612,6 +4628,22 @@ func (r *ProjectsLocationsOsPolicyAssignmentsService) Patch(name string, ospolic return c } +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the OS policy assignment is not found, a new OS policy assignment will be +// created. In this situation, `update_mask` is ignored. +func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsOsPolicyAssignmentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": A unique identifier for +// this request. Restricted to 36 ASCII characters. A random UUID is +// recommended. This request is only idempotent if a `request_id` is provided. +func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // UpdateMask sets the optional parameter "updateMask": Field mask that // controls which fields of the assignment should be updated. func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsOsPolicyAssignmentsPatchCall { diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index c53e83f60fc..145023d92a3 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -315,12 +315,17 @@ ], "parameters": { "force": { - "description": "Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", + "description": "Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations.", "location": "query", "type": "boolean" }, + "forceJustification": { + "description": "If force option is set to true, force_justification is suggested to be set to log the reason in audit logs.", + "location": "query", + "type": "string" + }, "forceOnly": { - "description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", + "description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set.", "enum": [ "QUOTA_SAFETY_CHECK_UNSPECIFIED", "LIMIT_DECREASE_BELOW_USAGE", @@ -364,12 +369,17 @@ ], "parameters": { "force": { - "description": "Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", + "description": "Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations.", "location": "query", "type": "boolean" }, + "forceJustification": { + "description": "If force option is set to true, force_justification is suggested to be set to log the reason in audit logs.", + "location": "query", + "type": "string" + }, "forceOnly": { - "description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", + "description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set.", "enum": [ "QUOTA_SAFETY_CHECK_UNSPECIFIED", "LIMIT_DECREASE_BELOW_USAGE", @@ -446,12 +456,17 @@ ], "parameters": { "force": { - "description": "Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", + "description": "Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations.", "location": "query", "type": "boolean" }, + "forceJustification": { + "description": "If force option is set to true, force_justification is suggested to be set to log the reason in audit logs.", + "location": "query", + "type": "string" + }, "forceOnly": { - "description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", + "description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set.", "enum": [ "QUOTA_SAFETY_CHECK_UNSPECIFIED", "LIMIT_DECREASE_BELOW_USAGE", @@ -500,7 +515,7 @@ } } }, - "revision": "20240429", + "revision": "20240512", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -2695,11 +2710,15 @@ "id": "V1Beta1ImportProducerOverridesRequest", "properties": { "force": { - "description": "Whether to force the creation of the quota overrides. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", + "description": "Whether to force the creation of the quota overrides. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations.", "type": "boolean" }, + "forceJustification": { + "description": "If force option is set to true, force_justification is suggested to be set to log the reason in audit logs.", + "type": "string" + }, "forceOnly": { - "description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", + "description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set.", "items": { "enum": [ "QUOTA_SAFETY_CHECK_UNSPECIFIED", diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index 5cee4045683..f1b702ff2a0 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -3440,16 +3440,15 @@ func (s *V1Beta1GenerateServiceIdentityResponse) MarshalJSON() ([]byte, error) { type V1Beta1ImportProducerOverridesRequest struct { // Force: Whether to force the creation of the quota overrides. Setting the // force parameter to 'true' ignores all quota safety checks that would fail - // the request. QuotaSafetyCheck lists all such validations. If force is set to - // true, it is recommended to include a case id in "X-Goog-Request-Reason" - // header when sending the request. + // the request. QuotaSafetyCheck lists all such validations. Force bool `json:"force,omitempty"` + // ForceJustification: If force option is set to true, force_justification is + // suggested to be set to log the reason in audit logs. + ForceJustification string `json:"forceJustification,omitempty"` // ForceOnly: The list of quota safety checks to ignore before the override // mutation. Unlike 'force' field that ignores all the quota safety checks, the // 'force_only' field ignores only the specified checks; other checks are still - // enforced. The 'force' and 'force_only' fields cannot both be set. If - // force_only is specified, it is recommended to include a case id in - // "X-Goog-Request-Reason" header when sending the request. + // enforced. The 'force' and 'force_only' fields cannot both be set. // // Possible values: // "QUOTA_SAFETY_CHECK_UNSPECIFIED" - Unspecified quota safety check. @@ -4714,20 +4713,25 @@ func (r *ServicesConsumerQuotaMetricsLimitsProducerOverridesService) Create(pare // Force sets the optional parameter "force": Whether to force the creation of // the quota override. Setting the force parameter to 'true' ignores all quota // safety checks that would fail the request. QuotaSafetyCheck lists all such -// validations. If force is set to true, it is recommended to include a case id -// in "X-Goog-Request-Reason" header when sending the request. +// validations. func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall { c.urlParams_.Set("force", fmt.Sprint(force)) return c } +// ForceJustification sets the optional parameter "forceJustification": If +// force option is set to true, force_justification is suggested to be set to +// log the reason in audit logs. +func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesCreateCall { + c.urlParams_.Set("forceJustification", forceJustification) + return c +} + // ForceOnly sets the optional parameter "forceOnly": The list of quota safety // checks to ignore before the override mutation. Unlike 'force' field that // ignores all the quota safety checks, the 'force_only' field ignores only the // specified checks; other checks are still enforced. The 'force' and -// 'force_only' fields cannot both be set. If force_only is specified, it is -// recommended to include a case id in "X-Goog-Request-Reason" header when -// sending the request. +// 'force_only' fields cannot both be set. // // Possible values: // @@ -4852,20 +4856,25 @@ func (r *ServicesConsumerQuotaMetricsLimitsProducerOverridesService) Delete(name // Force sets the optional parameter "force": Whether to force the deletion of // the quota override. Setting the force parameter to 'true' ignores all quota // safety checks that would fail the request. QuotaSafetyCheck lists all such -// validations. If force is set to true, it is recommended to include a case id -// in "X-Goog-Request-Reason" header when sending the request. +// validations. func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall { c.urlParams_.Set("force", fmt.Sprint(force)) return c } +// ForceJustification sets the optional parameter "forceJustification": If +// force option is set to true, force_justification is suggested to be set to +// log the reason in audit logs. +func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteCall { + c.urlParams_.Set("forceJustification", forceJustification) + return c +} + // ForceOnly sets the optional parameter "forceOnly": The list of quota safety // checks to ignore before the override mutation. Unlike 'force' field that // ignores all the quota safety checks, the 'force_only' field ignores only the // specified checks; other checks are still enforced. The 'force' and -// 'force_only' fields cannot both be set. If force_only is specified, it is -// recommended to include a case id in "X-Goog-Request-Reason" header when -// sending the request. +// 'force_only' fields cannot both be set. // // Possible values: // @@ -5135,20 +5144,25 @@ func (r *ServicesConsumerQuotaMetricsLimitsProducerOverridesService) Patch(name // Force sets the optional parameter "force": Whether to force the update of // the quota override. Setting the force parameter to 'true' ignores all quota // safety checks that would fail the request. QuotaSafetyCheck lists all such -// validations. If force is set to true, it is recommended to include a case id -// in "X-Goog-Request-Reason" header when sending the request. +// validations. func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) Force(force bool) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall { c.urlParams_.Set("force", fmt.Sprint(force)) return c } +// ForceJustification sets the optional parameter "forceJustification": If +// force option is set to true, force_justification is suggested to be set to +// log the reason in audit logs. +func (c *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall) ForceJustification(forceJustification string) *ServicesConsumerQuotaMetricsLimitsProducerOverridesPatchCall { + c.urlParams_.Set("forceJustification", forceJustification) + return c +} + // ForceOnly sets the optional parameter "forceOnly": The list of quota safety // checks to ignore before the override mutation. Unlike 'force' field that // ignores all the quota safety checks, the 'force_only' field ignores only the // specified checks; other checks are still enforced. The 'force' and -// 'force_only' fields cannot both be set. If force_only is specified, it is -// recommended to include a case id in "X-Goog-Request-Reason" header when -// sending the request. +// 'force_only' fields cannot both be set. // // Possible values: // diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index 5f3bfdb8cff..4c0e1dfe098 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -1794,6 +1794,41 @@ "https://www.googleapis.com/auth/youtube.force-ssl", "https://www.googleapis.com/auth/youtube.readonly" ] + }, + "transition": { + "description": "Transition a durable chat event.", + "flatPath": "youtube/v3/liveChat/messages/transition", + "httpMethod": "POST", + "id": "youtube.liveChatMessages.transition", + "parameterOrder": [], + "parameters": { + "id": { + "description": "The ID that uniquely identify the chat message event to transition.", + "location": "query", + "type": "string" + }, + "status": { + "description": "The status to which the chat event is going to transition.", + "enum": [ + "statusUnspecified", + "closed" + ], + "enumDescriptions": [ + "Default unknown enum value.", + "The durable chat event is over." + ], + "location": "query", + "type": "string" + } + }, + "path": "youtube/v3/liveChat/messages/transition", + "response": { + "$ref": "LiveChatMessage" + }, + "scopes": [ + "https://www.googleapis.com/auth/youtube", + "https://www.googleapis.com/auth/youtube.force-ssl" + ] } } }, @@ -4032,53 +4067,12 @@ "$ref": "CommentThread" } } - }, - "resources": { - "liveChat": { - "resources": { - "messages": { - "methods": { - "transition": { - "description": "Transition a durable chat event.", - "flatPath": "youtube/v3/liveChat/messages/transition", - "httpMethod": "POST", - "id": "youtube.youtube.v3.liveChat.messages.transition", - "parameterOrder": [], - "parameters": { - "id": { - "description": "The ID that uniquely identify the chat message event to transition.", - "location": "query", - "type": "string" - }, - "status": { - "description": "The status to which the chat event is going to transition.", - "enum": [ - "statusUnspecified", - "closed" - ], - "enumDescriptions": [ - "Default unknown enum value.", - "The durable chat event is over." - ], - "location": "query", - "type": "string" - } - }, - "path": "youtube/v3/liveChat/messages/transition", - "response": { - "$ref": "LiveChatMessage" - } - } - } - } - } - } } } } } }, - "revision": "20240505", + "revision": "20240514", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 5b4c456ae16..90d0666dd57 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -559,35 +559,11 @@ type YoutubeService struct { func NewYoutubeV3Service(s *Service) *YoutubeV3Service { rs := &YoutubeV3Service{s: s} - rs.LiveChat = NewYoutubeV3LiveChatService(s) return rs } type YoutubeV3Service struct { s *Service - - LiveChat *YoutubeV3LiveChatService -} - -func NewYoutubeV3LiveChatService(s *Service) *YoutubeV3LiveChatService { - rs := &YoutubeV3LiveChatService{s: s} - rs.Messages = NewYoutubeV3LiveChatMessagesService(s) - return rs -} - -type YoutubeV3LiveChatService struct { - s *Service - - Messages *YoutubeV3LiveChatMessagesService -} - -func NewYoutubeV3LiveChatMessagesService(s *Service) *YoutubeV3LiveChatMessagesService { - rs := &YoutubeV3LiveChatMessagesService{s: s} - return rs -} - -type YoutubeV3LiveChatMessagesService struct { - s *Service } type AbuseReport struct { @@ -13330,6 +13306,114 @@ func (c *LiveChatMessagesListCall) Pages(ctx context.Context, f func(*LiveChatMe } } +type LiveChatMessagesTransitionCall struct { + s *Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Transition: Transition a durable chat event. +func (r *LiveChatMessagesService) Transition() *LiveChatMessagesTransitionCall { + c := &LiveChatMessagesTransitionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Id sets the optional parameter "id": The ID that uniquely identify the chat +// message event to transition. +func (c *LiveChatMessagesTransitionCall) Id(id string) *LiveChatMessagesTransitionCall { + c.urlParams_.Set("id", id) + return c +} + +// Status sets the optional parameter "status": The status to which the chat +// event is going to transition. +// +// Possible values: +// +// "statusUnspecified" - Default unknown enum value. +// "closed" - The durable chat event is over. +func (c *LiveChatMessagesTransitionCall) Status(status string) *LiveChatMessagesTransitionCall { + c.urlParams_.Set("status", status) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *LiveChatMessagesTransitionCall) Fields(s ...googleapi.Field) *LiveChatMessagesTransitionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *LiveChatMessagesTransitionCall) Context(ctx context.Context) *LiveChatMessagesTransitionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *LiveChatMessagesTransitionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LiveChatMessagesTransitionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages/transition") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "youtube.liveChatMessages.transition" call. +// Any non-2xx status code is an error. Response headers are in either +// *LiveChatMessage.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *LiveChatMessagesTransitionCall) Do(opts ...googleapi.CallOption) (*LiveChatMessage, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &LiveChatMessage{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type LiveChatModeratorsDeleteCall struct { s *Service urlParams_ gensupport.URLParams @@ -19535,111 +19619,3 @@ func (c *YoutubeV3UpdateCommentThreadsCall) Do(opts ...googleapi.CallOption) (*C } return ret, nil } - -type YoutubeV3LiveChatMessagesTransitionCall struct { - s *Service - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Transition: Transition a durable chat event. -func (r *YoutubeV3LiveChatMessagesService) Transition() *YoutubeV3LiveChatMessagesTransitionCall { - c := &YoutubeV3LiveChatMessagesTransitionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Id sets the optional parameter "id": The ID that uniquely identify the chat -// message event to transition. -func (c *YoutubeV3LiveChatMessagesTransitionCall) Id(id string) *YoutubeV3LiveChatMessagesTransitionCall { - c.urlParams_.Set("id", id) - return c -} - -// Status sets the optional parameter "status": The status to which the chat -// event is going to transition. -// -// Possible values: -// -// "statusUnspecified" - Default unknown enum value. -// "closed" - The durable chat event is over. -func (c *YoutubeV3LiveChatMessagesTransitionCall) Status(status string) *YoutubeV3LiveChatMessagesTransitionCall { - c.urlParams_.Set("status", status) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *YoutubeV3LiveChatMessagesTransitionCall) Fields(s ...googleapi.Field) *YoutubeV3LiveChatMessagesTransitionCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *YoutubeV3LiveChatMessagesTransitionCall) Context(ctx context.Context) *YoutubeV3LiveChatMessagesTransitionCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *YoutubeV3LiveChatMessagesTransitionCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *YoutubeV3LiveChatMessagesTransitionCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages/transition") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "youtube.youtube.v3.liveChat.messages.transition" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiveChatMessage.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *YoutubeV3LiveChatMessagesTransitionCall) Do(opts ...googleapi.CallOption) (*LiveChatMessage, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &LiveChatMessage{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -}