From a606debfee7e98d944d0989ae8c9670b10597d88 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 24 Feb 2025 00:46:21 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#3036) --- analyticshub/v1/analyticshub-api.json | 25 +- analyticshub/v1/analyticshub-gen.go | 20 +- analyticshub/v1beta1/analyticshub-api.json | 7 +- analyticshub/v1beta1/analyticshub-gen.go | 4 + connectors/v1/connectors-api.json | 14 +- connectors/v1/connectors-gen.go | 19 +- gkebackup/v1/gkebackup-api.json | 16 +- gkebackup/v1/gkebackup-gen.go | 12 +- securitycenter/v1/securitycenter-api.json | 358 +++++- securitycenter/v1/securitycenter-gen.go | 422 +++++++ vmwareengine/v1/vmwareengine-api.json | 666 ++++++++++- vmwareengine/v1/vmwareengine-gen.go | 1242 +++++++++++++++++++- 12 files changed, 2730 insertions(+), 75 deletions(-) diff --git a/analyticshub/v1/analyticshub-api.json b/analyticshub/v1/analyticshub-api.json index 668d091f327..12f5d89b327 100644 --- a/analyticshub/v1/analyticshub-api.json +++ b/analyticshub/v1/analyticshub-api.json @@ -1022,7 +1022,7 @@ } } }, - "revision": "20250203", + "revision": "20250217", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AnalyticsHubSubscriptionInfo": { @@ -1229,7 +1229,7 @@ "type": "string" }, "maxDuration": { - "description": "Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.", + "description": "Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgment deadline.", "format": "google-duration", "type": "string" }, @@ -1311,6 +1311,10 @@ "readOnly": true, "type": "integer" }, + "logLinkedDatasetQueryUserEmail": { + "description": "Optional. By default, false. If true, the DataExchange has an email sharing mandate enabled.", + "type": "boolean" + }, "name": { "description": "Output only. The resource name of the data exchange. e.g. `projects/myproject/locations/US/dataExchanges/123`.", "readOnly": true, @@ -1368,7 +1372,7 @@ "type": "string" }, "maxDeliveryAttempts": { - "description": "Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.", + "description": "Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgment deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.", "format": "int32", "type": "integer" } @@ -1593,7 +1597,7 @@ "type": "boolean" }, "enableExactlyOnceDelivery": { - "description": "Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.", + "description": "Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgment deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.", "type": "boolean" }, "enableMessageOrdering": { @@ -1641,7 +1645,7 @@ }, "retryPolicy": { "$ref": "RetryPolicy", - "description": "Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message." + "description": "Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message." }, "state": { "description": "Output only. An output-only field indicating whether or not the subscription can receive messages.", @@ -1893,6 +1897,10 @@ "format": "byte", "type": "string" }, + "logLinkedDatasetQueryUserEmail": { + "description": "Optional. By default, false. If true, the Listing has an email sharing mandate enabled.", + "type": "boolean" + }, "name": { "description": "Output only. The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`", "readOnly": true, @@ -2226,7 +2234,7 @@ "type": "object" }, "RetryPolicy": { - "description": "A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.", + "description": "A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.", "id": "RetryPolicy", "properties": { "maximumBackoff": { @@ -2434,6 +2442,11 @@ "readOnly": true, "type": "string" }, + "logLinkedDatasetQueryUserEmail": { + "description": "Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing.", + "readOnly": true, + "type": "boolean" + }, "name": { "description": "Output only. The resource name of the subscription. e.g. `projects/myproject/locations/US/subscriptions/123`.", "readOnly": true, diff --git a/analyticshub/v1/analyticshub-gen.go b/analyticshub/v1/analyticshub-gen.go index 446754d24e0..d540b0f0145 100644 --- a/analyticshub/v1/analyticshub-gen.go +++ b/analyticshub/v1/analyticshub-gen.go @@ -631,7 +631,7 @@ type CloudStorageConfig struct { MaxBytes int64 `json:"maxBytes,omitempty,string"` // MaxDuration: Optional. The maximum duration that can elapse before a new // Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 - // minutes. May not exceed the subscription's acknowledgement deadline. + // minutes. May not exceed the subscription's acknowledgment deadline. MaxDuration string `json:"maxDuration,omitempty"` // MaxMessages: Optional. The maximum number of messages that can be written to // a Cloud Storage file before a new file is created. Min 1000 messages. @@ -717,6 +717,9 @@ type DataExchange struct { // ListingCount: Output only. Number of listings contained in the data // exchange. ListingCount int64 `json:"listingCount,omitempty"` + // LogLinkedDatasetQueryUserEmail: Optional. By default, false. If true, the + // DataExchange has an email sharing mandate enabled. + LogLinkedDatasetQueryUserEmail bool `json:"logLinkedDatasetQueryUserEmail,omitempty"` // Name: Output only. The resource name of the data exchange. e.g. // `projects/myproject/locations/US/dataExchanges/123`. Name string `json:"name,omitempty"` @@ -826,7 +829,7 @@ type DeadLetterPolicy struct { // MaxDeliveryAttempts: Optional. The maximum number of delivery attempts for // any message. The value must be between 5 and 100. The number of delivery // attempts is defined as 1 + (the sum of number of NACKs and number of times - // the acknowledgement deadline has been exceeded for the message). A NACK is + // the acknowledgment deadline has been exceeded for the message). A NACK is // any call to ModifyAckDeadline with a 0 deadline. Note that client libraries // may automatically extend ack_deadlines. This field will be honored on a best // effort basis. If this parameter is 0, a default value of 5 is used. @@ -1231,7 +1234,7 @@ type GooglePubsubV1Subscription struct { // EnableExactlyOnceDelivery: Optional. If true, Pub/Sub provides the following // guarantees for the delivery of a message with a given value of `message_id` // on this subscription: * The message sent to a subscriber is guaranteed not - // to be resent before the message's acknowledgement deadline expires. * An + // to be resent before the message's acknowledgment deadline expires. * An // acknowledged message will not be resent to a subscriber. Note that // subscribers may still receive multiple copies of a message when // `enable_exactly_once_delivery` is true if the message was published multiple @@ -1289,7 +1292,7 @@ type GooglePubsubV1Subscription struct { // delivery for this subscription. If not set, the default retry policy is // applied. This generally implies that messages will be retried as soon as // possible for healthy subscribers. RetryPolicy will be triggered on NACKs or - // acknowledgement deadline exceeded events for a given message. + // acknowledgment deadline exceeded events for a given message. RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"` // State: Output only. An output-only field indicating whether or not the // subscription can receive messages. @@ -1597,6 +1600,9 @@ type Listing struct { // contents of the field are base64-encoded (which increases the size of the // data by 33-36%) when using JSON on the wire. Icon string `json:"icon,omitempty"` + // LogLinkedDatasetQueryUserEmail: Optional. By default, false. If true, the + // Listing has an email sharing mandate enabled. + LogLinkedDatasetQueryUserEmail bool `json:"logLinkedDatasetQueryUserEmail,omitempty"` // Name: Output only. The resource name of the listing. e.g. // `projects/myproject/locations/US/dataExchanges/123/listings/456` Name string `json:"name,omitempty"` @@ -2109,7 +2115,7 @@ func (s RestrictedExportPolicy) MarshalJSON() ([]byte, error) { // RetryPolicy: A policy that specifies how Pub/Sub retries message delivery. // Retry delay will be exponential based on provided minimum and maximum // backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy -// will be triggered on NACKs or acknowledgement deadline exceeded events for a +// will be triggered on NACKs or acknowledgment deadline exceeded events for a // given message. Retry Policy is implemented on a best effort basis. At times, // the delay between consecutive deliveries may not match the configuration. // That is, delay can be more or less than configured backoff. @@ -2404,6 +2410,10 @@ type Subscription struct { // Listing: Output only. Resource name of the source Listing. e.g. // projects/123/locations/US/dataExchanges/456/listings/789 Listing string `json:"listing,omitempty"` + // LogLinkedDatasetQueryUserEmail: Output only. By default, false. If true, the + // Subscriber agreed to the email sharing mandate that is enabled for + // DataExchange/Listing. + LogLinkedDatasetQueryUserEmail bool `json:"logLinkedDatasetQueryUserEmail,omitempty"` // Name: Output only. The resource name of the subscription. e.g. // `projects/myproject/locations/US/subscriptions/123`. Name string `json:"name,omitempty"` diff --git a/analyticshub/v1beta1/analyticshub-api.json b/analyticshub/v1beta1/analyticshub-api.json index 9ceb441c59a..506a9360274 100644 --- a/analyticshub/v1beta1/analyticshub-api.json +++ b/analyticshub/v1beta1/analyticshub-api.json @@ -695,7 +695,7 @@ } } }, - "revision": "20250126", + "revision": "20250217", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -1357,6 +1357,11 @@ "readOnly": true, "type": "string" }, + "logLinkedDatasetQueryUserEmail": { + "description": "Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing.", + "readOnly": true, + "type": "boolean" + }, "name": { "description": "Output only. The resource name of the subscription. e.g. `projects/myproject/locations/US/subscriptions/123`.", "readOnly": true, diff --git a/analyticshub/v1beta1/analyticshub-gen.go b/analyticshub/v1beta1/analyticshub-gen.go index e46510720c5..e1ebb177389 100644 --- a/analyticshub/v1beta1/analyticshub-gen.go +++ b/analyticshub/v1beta1/analyticshub-gen.go @@ -1276,6 +1276,10 @@ type Subscription struct { // Listing: Output only. Resource name of the source Listing. e.g. // projects/123/locations/US/dataExchanges/456/listings/789 Listing string `json:"listing,omitempty"` + // LogLinkedDatasetQueryUserEmail: Output only. By default, false. If true, the + // Subscriber agreed to the email sharing mandate that is enabled for + // DataExchange/Listing. + LogLinkedDatasetQueryUserEmail bool `json:"logLinkedDatasetQueryUserEmail,omitempty"` // Name: Output only. The resource name of the subscription. e.g. // `projects/myproject/locations/US/subscriptions/123`. Name string `json:"name,omitempty"` diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 26c16ad0893..3c0da7bf5ad 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -2560,7 +2560,7 @@ } } }, - "revision": "20250205", + "revision": "20250218", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -5569,6 +5569,14 @@ "description": "JsonSchema representation of schema metadata", "id": "JsonSchema", "properties": { + "additionalDetails": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema", + "type": "object" + }, "default": { "description": "The default value of the field or object described by this schema.", "type": "any" @@ -7298,7 +7306,7 @@ "type": "string" }, "principal": { - "description": "Optional. Prinicipal/Identity for whom the role need to assigned.", + "description": "Optional. Principal/Identity for whom the role need to assigned.", "enum": [ "PRINCIPAL_UNSPECIFIED", "CONNECTOR_SA" @@ -7710,7 +7718,7 @@ "id": "Source", "properties": { "fieldId": { - "description": "Field identifier. For example config vaiable name.", + "description": "Field identifier. For example config variable name.", "type": "string" }, "sourceType": { diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 856808a7622..daa1424d70a 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -3062,6 +3062,9 @@ func (s JsonAuthSchema) MarshalJSON() ([]byte, error) { // JsonSchema: JsonSchema representation of schema metadata type JsonSchema struct { + // AdditionalDetails: Additional details apart from standard json schema + // fields, this gives flexibility to store metadata about the schema + AdditionalDetails googleapi.RawMessage `json:"additionalDetails,omitempty"` // Default: The default value of the field or object described by this schema. Default interface{} `json:"default,omitempty"` // Description: A description of this schema. @@ -3134,15 +3137,15 @@ type JsonSchema struct { Required []string `json:"required,omitempty"` // Type: JSON Schema Validation: A Vocabulary for Structural Validation of JSON Type []string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Default") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "AdditionalDetails") 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. "Default") 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. "AdditionalDetails") 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:"-"` } @@ -4946,7 +4949,7 @@ type RoleGrant struct { // HelperTextTemplate: Optional. Template that UI can use to provide helper // text to customers. HelperTextTemplate string `json:"helperTextTemplate,omitempty"` - // Principal: Optional. Prinicipal/Identity for whom the role need to assigned. + // Principal: Optional. Principal/Identity for whom the role need to assigned. // // Possible values: // "PRINCIPAL_UNSPECIFIED" - Value type is not specified. @@ -5383,7 +5386,7 @@ func (s SloMetadata) MarshalJSON() ([]byte, error) { // Source: Source to extract the backend from. type Source struct { - // FieldId: Field identifier. For example config vaiable name. + // FieldId: Field identifier. For example config variable name. FieldId string `json:"fieldId,omitempty"` // SourceType: Type of the source. // diff --git a/gkebackup/v1/gkebackup-api.json b/gkebackup/v1/gkebackup-api.json index e09f8daf39b..aa48e282c93 100644 --- a/gkebackup/v1/gkebackup-api.json +++ b/gkebackup/v1/gkebackup-api.json @@ -623,11 +623,6 @@ "pattern": "^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+$", "required": true, "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If set to true, the response will return partial results when some regions are unreachable and the unreachable field will be populated.", - "location": "query", - "type": "boolean" } }, "path": "v1/{+parent}/backups", @@ -1718,7 +1713,7 @@ } } }, - "revision": "20250205", + "revision": "20250217", "rootUrl": "https://gkebackup.googleapis.com/", "schemas": { "AuditConfig": { @@ -2484,13 +2479,6 @@ "nextPageToken": { "description": "A token which may be sent as page_token in a subsequent `ListBackups` call to retrieve the next page of results. If this field is omitted or empty, then there are no more results to return.", "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" @@ -2838,7 +2826,7 @@ }, "filter": { "$ref": "Filter", - "description": "Optional. Immutable. Filters resources for `Restore`. If not specified, the scope of the restore will remain the same as defined in the `RestorePlan`. If this is specified and no resources are matched by the `inclusion_filters` or everyting is excluded by the `exclusion_filters`, nothing will be restored. This filter can only be specified if the value of namespaced_resource_restore_mode is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or `MERGE_REPLACE_ON_CONFLICT`." + "description": "Optional. Immutable. Filters resources for `Restore`. If not specified, the scope of the restore will remain the same as defined in the `RestorePlan`. If this is specified and no resources are matched by the `inclusion_filters` or everything is excluded by the `exclusion_filters`, nothing will be restored. This filter can only be specified if the value of namespaced_resource_restore_mode is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or `MERGE_REPLACE_ON_CONFLICT`." }, "labels": { "additionalProperties": { diff --git a/gkebackup/v1/gkebackup-gen.go b/gkebackup/v1/gkebackup-gen.go index e063f40f40f..332b9a5b7bd 100644 --- a/gkebackup/v1/gkebackup-gen.go +++ b/gkebackup/v1/gkebackup-gen.go @@ -1259,8 +1259,6 @@ type ListBackupsResponse struct { // `ListBackups` call to retrieve the next page of results. If this field is // omitted or empty, then there are no more results to return. 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:"-"` @@ -1784,7 +1782,7 @@ type Restore struct { // Filter: Optional. Immutable. Filters resources for `Restore`. If not // specified, the scope of the restore will remain the same as defined in the // `RestorePlan`. If this is specified and no resources are matched by the - // `inclusion_filters` or everyting is excluded by the `exclusion_filters`, + // `inclusion_filters` or everything is excluded by the `exclusion_filters`, // nothing will be restored. This filter can only be specified if the value of // namespaced_resource_restore_mode is set to `MERGE_SKIP_ON_CONFLICT`, // `MERGE_REPLACE_VOLUME_ON_CONFLICT` or `MERGE_REPLACE_ON_CONFLICT`. @@ -4610,14 +4608,6 @@ func (c *ProjectsLocationsBackupPlansBackupsListCall) PageToken(pageToken string return c } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// set to true, the response will return partial results when some regions are -// unreachable and the unreachable field will be populated. -func (c *ProjectsLocationsBackupPlansBackupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsBackupPlansBackupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 184ffaa3b15..134ab4387a3 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -5938,7 +5938,7 @@ } } }, - "revision": "20250207", + "revision": "20250218", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -6042,6 +6042,20 @@ }, "type": "object" }, + "Allowed": { + "description": "Allowed IP rule.", + "id": "Allowed", + "properties": { + "ipRules": { + "description": "Optional. Optional list of allowed IP rules.", + "items": { + "$ref": "IpRule" + }, + "type": "array" + } + }, + "type": "object" + }, "Application": { "description": "Represents an application associated with a finding.", "id": "Application", @@ -7369,6 +7383,20 @@ }, "type": "object" }, + "Denied": { + "description": "Denied IP rule.", + "id": "Denied", + "properties": { + "ipRules": { + "description": "Optional. Optional list of denied IP rules.", + "items": { + "$ref": "IpRule" + }, + "type": "array" + } + }, + "type": "object" + }, "Detection": { "description": "Memory hash detection contributing to the binary family match.", "id": "Detection", @@ -7877,6 +7905,14 @@ "$ref": "Indicator", "description": "Represents what's commonly known as an *indicator of compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise)." }, + "ipRules": { + "$ref": "IpRules", + "description": "IP rules associated with the finding." + }, + "job": { + "$ref": "Job", + "description": "Job associated with the finding." + }, "kernelRootkit": { "$ref": "KernelRootkit", "description": "Signature of the kernel rootkit." @@ -7942,6 +7978,13 @@ "description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", "type": "string" }, + "networks": { + "description": "Represents the VPC networks that the resource is attached to.", + "items": { + "$ref": "Network" + }, + "type": "array" + }, "nextSteps": { "description": "Steps to address the finding.", "type": "string" @@ -9120,6 +9163,20 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2Allowed": { + "description": "Allowed IP rule.", + "id": "GoogleCloudSecuritycenterV2Allowed", + "properties": { + "ipRules": { + "description": "Optional. Optional list of allowed IP rules.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IpRule" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2Application": { "description": "Represents an application associated with a finding.", "id": "GoogleCloudSecuritycenterV2Application", @@ -10092,6 +10149,20 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2Denied": { + "description": "Denied IP rule.", + "id": "GoogleCloudSecuritycenterV2Denied", + "properties": { + "ipRules": { + "description": "Optional. Optional list of denied IP rules.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IpRule" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2Detection": { "description": "Memory hash detection contributing to the binary family match.", "id": "GoogleCloudSecuritycenterV2Detection", @@ -10485,6 +10556,14 @@ "$ref": "GoogleCloudSecuritycenterV2Indicator", "description": "Represents what's commonly known as an *indicator of compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise)." }, + "ipRules": { + "$ref": "GoogleCloudSecuritycenterV2IpRules", + "description": "IP rules associated with the finding." + }, + "job": { + "$ref": "GoogleCloudSecuritycenterV2Job", + "description": "Job associated with the finding." + }, "kernelRootkit": { "$ref": "GoogleCloudSecuritycenterV2KernelRootkit", "description": "Signature of the kernel rootkit." @@ -10550,6 +10629,13 @@ "description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`", "type": "string" }, + "networks": { + "description": "Represents the VPC networks that the resource is attached to.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2Network" + }, + "type": "array" + }, "nextSteps": { "description": "Steps to address the finding.", "type": "string" @@ -10758,6 +10844,74 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2IpRule": { + "description": "IP rule information.", + "id": "GoogleCloudSecuritycenterV2IpRule", + "properties": { + "portRanges": { + "description": "Optional. An optional list of ports to which this rule applies. This field is only applicable for the UDP or (S)TCP protocols. Each entry must be either an integer or a range including a min and max port number.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2PortRange" + }, + "type": "array" + }, + "protocol": { + "description": "The IP protocol this rule applies to. This value can either be one of the following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, SCTP) or a string representation of the integer value.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IpRules": { + "description": "IP rules associated with the finding.", + "id": "GoogleCloudSecuritycenterV2IpRules", + "properties": { + "allowed": { + "$ref": "GoogleCloudSecuritycenterV2Allowed", + "description": "Tuple with allowed rules." + }, + "denied": { + "$ref": "GoogleCloudSecuritycenterV2Denied", + "description": "Tuple with denied rules." + }, + "destinationIpRanges": { + "description": "If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.", + "items": { + "type": "string" + }, + "type": "array" + }, + "direction": { + "description": "The direction that the rule is applicable to, one of ingress or egress.", + "enum": [ + "DIRECTION_UNSPECIFIED", + "INGRESS", + "EGRESS" + ], + "enumDescriptions": [ + "Unspecified direction value.", + "Ingress direction value.", + "Egress direction value." + ], + "type": "string" + }, + "exposedServices": { + "description": "Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sourceIpRanges": { + "description": "If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2Issue": { "description": "Security Command Center Issue.", "id": "GoogleCloudSecuritycenterV2Issue", @@ -11155,6 +11309,45 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2Job": { + "description": "Describes a job", + "id": "GoogleCloudSecuritycenterV2Job", + "properties": { + "errorCode": { + "description": "Optional. If the job did not complete successfully, this field describes why.", + "format": "int32", + "type": "integer" + }, + "location": { + "description": "Optional. Gives the location where the job ran, such as `US` or `europe-west1`", + "type": "string" + }, + "name": { + "description": "The fully-qualified name for a job. e.g. `projects//jobs/`", + "type": "string" + }, + "state": { + "description": "Output only. State of the job, such as `RUNNING` or `PENDING`.", + "enum": [ + "JOB_STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "Unspecified represents an unknown state and should not be used.", + "Job is scheduled and pending for run", + "Job in progress", + "Job has completed with success", + "Job has completed but with failure" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2KernelRootkit": { "description": "Kernel mode rootkit signatures.", "id": "GoogleCloudSecuritycenterV2KernelRootkit", @@ -11762,6 +11955,17 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2Network": { + "description": "Contains information about a VPC network associated with the finding.", + "id": "GoogleCloudSecuritycenterV2Network", + "properties": { + "name": { + "description": "The name of the VPC network resource, for example, `//compute.googleapis.com/projects/my-project/global/networks/my-network`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2Node": { "description": "Kubernetes nodes associated with the finding.", "id": "GoogleCloudSecuritycenterV2Node", @@ -11946,6 +12150,23 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2PortRange": { + "description": "A port range which is inclusive of the min and max values. Values are between 0 and 2^16-1. The max can be equal / must be not smaller than the min value. If min and max are equal this indicates that it is a single port.", + "id": "GoogleCloudSecuritycenterV2PortRange", + "properties": { + "max": { + "description": "Maximum port value.", + "format": "int64", + "type": "string" + }, + "min": { + "description": "Minimum port value.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2Process": { "description": "Represents an operating system process.", "id": "GoogleCloudSecuritycenterV2Process", @@ -12859,6 +13080,113 @@ }, "type": "object" }, + "IpRule": { + "description": "IP rule information.", + "id": "IpRule", + "properties": { + "portRanges": { + "description": "Optional. An optional list of ports to which this rule applies. This field is only applicable for the UDP or (S)TCP protocols. Each entry must be either an integer or a range including a min and max port number.", + "items": { + "$ref": "PortRange" + }, + "type": "array" + }, + "protocol": { + "description": "The IP protocol this rule applies to. This value can either be one of the following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, SCTP) or a string representation of the integer value.", + "type": "string" + } + }, + "type": "object" + }, + "IpRules": { + "description": "IP rules associated with the finding.", + "id": "IpRules", + "properties": { + "allowed": { + "$ref": "Allowed", + "description": "Tuple with allowed rules." + }, + "denied": { + "$ref": "Denied", + "description": "Tuple with denied rules." + }, + "destinationIpRanges": { + "description": "If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.", + "items": { + "type": "string" + }, + "type": "array" + }, + "direction": { + "description": "The direction that the rule is applicable to, one of ingress or egress.", + "enum": [ + "DIRECTION_UNSPECIFIED", + "INGRESS", + "EGRESS" + ], + "enumDescriptions": [ + "Unspecified direction value.", + "Ingress direction value.", + "Egress direction value." + ], + "type": "string" + }, + "exposedServices": { + "description": "Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sourceIpRanges": { + "description": "If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Job": { + "description": "Describes a job", + "id": "Job", + "properties": { + "errorCode": { + "description": "Optional. If the job did not complete successfully, this field describes why.", + "format": "int32", + "type": "integer" + }, + "location": { + "description": "Optional. Gives the location where the job ran, such as `US` or `europe-west1`", + "type": "string" + }, + "name": { + "description": "The fully-qualified name for a job. e.g. `projects//jobs/`", + "type": "string" + }, + "state": { + "description": "Output only. State of the job, such as `RUNNING` or `PENDING`.", + "enum": [ + "JOB_STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "Unspecified represents an unknown state and should not be used.", + "Job is scheduled and pending for run", + "Job in progress", + "Job has completed with success", + "Job has completed but with failure" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "KernelRootkit": { "description": "Kernel mode rootkit signatures.", "id": "KernelRootkit", @@ -13785,6 +14113,17 @@ }, "type": "object" }, + "Network": { + "description": "Contains information about a VPC network associated with the finding.", + "id": "Network", + "properties": { + "name": { + "description": "The name of the VPC network resource, for example, `//compute.googleapis.com/projects/my-project/global/networks/my-network`.", + "type": "string" + } + }, + "type": "object" + }, "Node": { "description": "Kubernetes nodes associated with the finding.", "id": "Node", @@ -14082,6 +14421,23 @@ }, "type": "object" }, + "PortRange": { + "description": "A port range which is inclusive of the min and max values. Values are between 0 and 2^16-1. The max can be equal / must be not smaller than the min value. If min and max are equal this indicates that it is a single port.", + "id": "PortRange", + "properties": { + "max": { + "description": "Maximum port value.", + "format": "int64", + "type": "string" + }, + "min": { + "description": "Minimum port value.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Position": { "description": "A position in the uploaded text version of a module.", "id": "Position", diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index 75b2d7ad86c..1a3d691975f 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -1051,6 +1051,28 @@ func (s *AdaptiveProtection) UnmarshalJSON(data []byte) error { return nil } +// Allowed: Allowed IP rule. +type Allowed struct { + // IpRules: Optional. Optional list of allowed IP rules. + IpRules []*IpRule `json:"ipRules,omitempty"` + // ForceSendFields is a list of field names (e.g. "IpRules") 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. "IpRules") 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 Allowed) MarshalJSON() ([]byte, error) { + type NoMethod Allowed + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Application: Represents an application associated with a finding. type Application struct { // BaseUri: The base URI that identifies the network location of the @@ -2770,6 +2792,28 @@ func (s Database) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Denied: Denied IP rule. +type Denied struct { + // IpRules: Optional. Optional list of denied IP rules. + IpRules []*IpRule `json:"ipRules,omitempty"` + // ForceSendFields is a list of field names (e.g. "IpRules") 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. "IpRules") 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 Denied) MarshalJSON() ([]byte, error) { + type NoMethod Denied + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Detection: Memory hash detection contributing to the binary family match. type Detection struct { // Binary: The name of the binary associated with the memory hash signature @@ -3324,6 +3368,10 @@ type Finding struct { // intrusion. For more information, see Indicator of compromise // (https://en.wikipedia.org/wiki/Indicator_of_compromise). Indicator *Indicator `json:"indicator,omitempty"` + // IpRules: IP rules associated with the finding. + IpRules *IpRules `json:"ipRules,omitempty"` + // Job: Job associated with the finding. + Job *Job `json:"job,omitempty"` // KernelRootkit: Signature of the kernel rootkit. KernelRootkit *KernelRootkit `json:"kernelRootkit,omitempty"` // Kubernetes: Kubernetes resources associated with the finding. @@ -3367,6 +3415,8 @@ type Finding struct { // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", // "projects/{project_id}/sources/{source_id}/findings/{finding_id}". Name string `json:"name,omitempty"` + // Networks: Represents the VPC networks that the resource is attached to. + Networks []*Network `json:"networks,omitempty"` // NextSteps: Steps to address the finding. NextSteps string `json:"nextSteps,omitempty"` // Notebook: Notebook associated with the finding. @@ -4827,6 +4877,28 @@ func (s *GoogleCloudSecuritycenterV2AdaptiveProtection) UnmarshalJSON(data []byt return nil } +// GoogleCloudSecuritycenterV2Allowed: Allowed IP rule. +type GoogleCloudSecuritycenterV2Allowed struct { + // IpRules: Optional. Optional list of allowed IP rules. + IpRules []*GoogleCloudSecuritycenterV2IpRule `json:"ipRules,omitempty"` + // ForceSendFields is a list of field names (e.g. "IpRules") 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. "IpRules") 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 GoogleCloudSecuritycenterV2Allowed) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2Allowed + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2Application: Represents an application associated // with a finding. type GoogleCloudSecuritycenterV2Application struct { @@ -6045,6 +6117,28 @@ func (s GoogleCloudSecuritycenterV2Database) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV2Denied: Denied IP rule. +type GoogleCloudSecuritycenterV2Denied struct { + // IpRules: Optional. Optional list of denied IP rules. + IpRules []*GoogleCloudSecuritycenterV2IpRule `json:"ipRules,omitempty"` + // ForceSendFields is a list of field names (e.g. "IpRules") 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. "IpRules") 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 GoogleCloudSecuritycenterV2Denied) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2Denied + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2Detection: Memory hash detection contributing to // the binary family match. type GoogleCloudSecuritycenterV2Detection struct { @@ -6477,6 +6571,10 @@ type GoogleCloudSecuritycenterV2Finding struct { // intrusion. For more information, see Indicator of compromise // (https://en.wikipedia.org/wiki/Indicator_of_compromise). Indicator *GoogleCloudSecuritycenterV2Indicator `json:"indicator,omitempty"` + // IpRules: IP rules associated with the finding. + IpRules *GoogleCloudSecuritycenterV2IpRules `json:"ipRules,omitempty"` + // Job: Job associated with the finding. + Job *GoogleCloudSecuritycenterV2Job `json:"job,omitempty"` // KernelRootkit: Signature of the kernel rootkit. KernelRootkit *GoogleCloudSecuritycenterV2KernelRootkit `json:"kernelRootkit,omitempty"` // Kubernetes: Kubernetes resources associated with the finding. @@ -6527,6 +6625,8 @@ type GoogleCloudSecuritycenterV2Finding struct { // `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{ // finding_id}` Name string `json:"name,omitempty"` + // Networks: Represents the VPC networks that the resource is attached to. + Networks []*GoogleCloudSecuritycenterV2Network `json:"networks,omitempty"` // NextSteps: Steps to address the finding. NextSteps string `json:"nextSteps,omitempty"` // Notebook: Notebook associated with the finding. @@ -6791,6 +6891,78 @@ func (s GoogleCloudSecuritycenterV2Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV2IpRule: IP rule information. +type GoogleCloudSecuritycenterV2IpRule struct { + // PortRanges: Optional. An optional list of ports to which this rule applies. + // This field is only applicable for the UDP or (S)TCP protocols. Each entry + // must be either an integer or a range including a min and max port number. + PortRanges []*GoogleCloudSecuritycenterV2PortRange `json:"portRanges,omitempty"` + // Protocol: The IP protocol this rule applies to. This value can either be one + // of the following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, + // SCTP) or a string representation of the integer value. + Protocol string `json:"protocol,omitempty"` + // ForceSendFields is a list of field names (e.g. "PortRanges") 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. "PortRanges") 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 GoogleCloudSecuritycenterV2IpRule) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IpRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IpRules: IP rules associated with the finding. +type GoogleCloudSecuritycenterV2IpRules struct { + // Allowed: Tuple with allowed rules. + Allowed *GoogleCloudSecuritycenterV2Allowed `json:"allowed,omitempty"` + // Denied: Tuple with denied rules. + Denied *GoogleCloudSecuritycenterV2Denied `json:"denied,omitempty"` + // DestinationIpRanges: If destination IP ranges are specified, the firewall + // rule applies only to traffic that has a destination IP address in these + // ranges. These ranges must be expressed in CIDR format. Only supports IPv4. + DestinationIpRanges []string `json:"destinationIpRanges,omitempty"` + // Direction: The direction that the rule is applicable to, one of ingress or + // egress. + // + // Possible values: + // "DIRECTION_UNSPECIFIED" - Unspecified direction value. + // "INGRESS" - Ingress direction value. + // "EGRESS" - Egress direction value. + Direction string `json:"direction,omitempty"` + // ExposedServices: Name of the network protocol service, such as FTP, that is + // exposed by the open port. Follows the naming convention available at: + // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml. + ExposedServices []string `json:"exposedServices,omitempty"` + // SourceIpRanges: If source IP ranges are specified, the firewall rule applies + // only to traffic that has a source IP address in these ranges. These ranges + // must be expressed in CIDR format. Only supports IPv4. + SourceIpRanges []string `json:"sourceIpRanges,omitempty"` + // ForceSendFields is a list of field names (e.g. "Allowed") 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. "Allowed") 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 GoogleCloudSecuritycenterV2IpRules) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IpRules + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2Issue: Security Command Center Issue. type GoogleCloudSecuritycenterV2Issue struct { // CreateTime: Output only. The time the issue was created. @@ -7256,6 +7428,44 @@ func (s GoogleCloudSecuritycenterV2IssueSecurityContextContext) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV2Job: Describes a job +type GoogleCloudSecuritycenterV2Job struct { + // ErrorCode: Optional. If the job did not complete successfully, this field + // describes why. + ErrorCode int64 `json:"errorCode,omitempty"` + // Location: Optional. Gives the location where the job ran, such as `US` or + // `europe-west1` + Location string `json:"location,omitempty"` + // Name: The fully-qualified name for a job. e.g. `projects//jobs/` + Name string `json:"name,omitempty"` + // State: Output only. State of the job, such as `RUNNING` or `PENDING`. + // + // Possible values: + // "JOB_STATE_UNSPECIFIED" - Unspecified represents an unknown state and + // should not be used. + // "PENDING" - Job is scheduled and pending for run + // "RUNNING" - Job in progress + // "SUCCEEDED" - Job has completed with success + // "FAILED" - Job has completed but with failure + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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. "ErrorCode") 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 GoogleCloudSecuritycenterV2Job) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2Job + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2KernelRootkit: Kernel mode rootkit signatures. type GoogleCloudSecuritycenterV2KernelRootkit struct { // Name: Rootkit name, when available. @@ -7765,6 +7975,30 @@ func (s GoogleCloudSecuritycenterV2MuteInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV2Network: Contains information about a VPC network +// associated with the finding. +type GoogleCloudSecuritycenterV2Network struct { + // Name: The name of the VPC network resource, for example, + // `//compute.googleapis.com/projects/my-project/global/networks/my-network`. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. 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. "Name") 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 GoogleCloudSecuritycenterV2Network) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2Network + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2Node: Kubernetes nodes associated with the // finding. type GoogleCloudSecuritycenterV2Node struct { @@ -8019,6 +8253,33 @@ func (s GoogleCloudSecuritycenterV2PolicyDriftDetails) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV2PortRange: A port range which is inclusive of the +// min and max values. Values are between 0 and 2^16-1. The max can be equal / +// must be not smaller than the min value. If min and max are equal this +// indicates that it is a single port. +type GoogleCloudSecuritycenterV2PortRange struct { + // Max: Maximum port value. + Max int64 `json:"max,omitempty,string"` + // Min: Minimum port value. + Min int64 `json:"min,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Max") 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. "Max") 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 GoogleCloudSecuritycenterV2PortRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2PortRange + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2Process: Represents an operating system process. type GoogleCloudSecuritycenterV2Process struct { // Args: Process arguments as JSON encoded strings. @@ -9237,6 +9498,116 @@ func (s Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// IpRule: IP rule information. +type IpRule struct { + // PortRanges: Optional. An optional list of ports to which this rule applies. + // This field is only applicable for the UDP or (S)TCP protocols. Each entry + // must be either an integer or a range including a min and max port number. + PortRanges []*PortRange `json:"portRanges,omitempty"` + // Protocol: The IP protocol this rule applies to. This value can either be one + // of the following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, + // SCTP) or a string representation of the integer value. + Protocol string `json:"protocol,omitempty"` + // ForceSendFields is a list of field names (e.g. "PortRanges") 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. "PortRanges") 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 IpRule) MarshalJSON() ([]byte, error) { + type NoMethod IpRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// IpRules: IP rules associated with the finding. +type IpRules struct { + // Allowed: Tuple with allowed rules. + Allowed *Allowed `json:"allowed,omitempty"` + // Denied: Tuple with denied rules. + Denied *Denied `json:"denied,omitempty"` + // DestinationIpRanges: If destination IP ranges are specified, the firewall + // rule applies only to traffic that has a destination IP address in these + // ranges. These ranges must be expressed in CIDR format. Only supports IPv4. + DestinationIpRanges []string `json:"destinationIpRanges,omitempty"` + // Direction: The direction that the rule is applicable to, one of ingress or + // egress. + // + // Possible values: + // "DIRECTION_UNSPECIFIED" - Unspecified direction value. + // "INGRESS" - Ingress direction value. + // "EGRESS" - Egress direction value. + Direction string `json:"direction,omitempty"` + // ExposedServices: Name of the network protocol service, such as FTP, that is + // exposed by the open port. Follows the naming convention available at: + // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml. + ExposedServices []string `json:"exposedServices,omitempty"` + // SourceIpRanges: If source IP ranges are specified, the firewall rule applies + // only to traffic that has a source IP address in these ranges. These ranges + // must be expressed in CIDR format. Only supports IPv4. + SourceIpRanges []string `json:"sourceIpRanges,omitempty"` + // ForceSendFields is a list of field names (e.g. "Allowed") 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. "Allowed") 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 IpRules) MarshalJSON() ([]byte, error) { + type NoMethod IpRules + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Job: Describes a job +type Job struct { + // ErrorCode: Optional. If the job did not complete successfully, this field + // describes why. + ErrorCode int64 `json:"errorCode,omitempty"` + // Location: Optional. Gives the location where the job ran, such as `US` or + // `europe-west1` + Location string `json:"location,omitempty"` + // Name: The fully-qualified name for a job. e.g. `projects//jobs/` + Name string `json:"name,omitempty"` + // State: Output only. State of the job, such as `RUNNING` or `PENDING`. + // + // Possible values: + // "JOB_STATE_UNSPECIFIED" - Unspecified represents an unknown state and + // should not be used. + // "PENDING" - Job is scheduled and pending for run + // "RUNNING" - Job in progress + // "SUCCEEDED" - Job has completed with success + // "FAILED" - Job has completed but with failure + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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. "ErrorCode") 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 Job) MarshalJSON() ([]byte, error) { + type NoMethod Job + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // KernelRootkit: Kernel mode rootkit signatures. type KernelRootkit struct { // Name: Rootkit name, when available. @@ -10220,6 +10591,30 @@ func (s MuteInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Network: Contains information about a VPC network associated with the +// finding. +type Network struct { + // Name: The name of the VPC network resource, for example, + // `//compute.googleapis.com/projects/my-project/global/networks/my-network`. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. 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. "Name") 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 Network) MarshalJSON() ([]byte, error) { + type NoMethod Network + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Node: Kubernetes nodes associated with the finding. type Node struct { // Name: Full resource name (https://google.aip.dev/122#full-resource-names) of @@ -10690,6 +11085,33 @@ func (s PolicyDriftDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PortRange: A port range which is inclusive of the min and max values. Values +// are between 0 and 2^16-1. The max can be equal / must be not smaller than +// the min value. If min and max are equal this indicates that it is a single +// port. +type PortRange struct { + // Max: Maximum port value. + Max int64 `json:"max,omitempty,string"` + // Min: Minimum port value. + Min int64 `json:"min,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Max") 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. "Max") 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 PortRange) MarshalJSON() ([]byte, error) { + type NoMethod PortRange + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Position: A position in the uploaded text version of a module. type Position struct { ColumnNumber int64 `json:"columnNumber,omitempty"` diff --git a/vmwareengine/v1/vmwareengine-api.json b/vmwareengine/v1/vmwareengine-api.json index 7a73ae67224..39a998d96d9 100644 --- a/vmwareengine/v1/vmwareengine-api.json +++ b/vmwareengine/v1/vmwareengine-api.json @@ -202,6 +202,81 @@ } }, "resources": { + "announcements": { + "methods": { + "get": { + "description": "Retrieves a `Announcement` by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/announcements/{announcementsId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.announcements.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the announcement to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1-a/announcements/announcement-uuid`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/announcements/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Announcement" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `Announcements` for a given region and project", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/announcements", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.announcements.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of announcement runs, you can exclude the ones named `example-announcement` by specifying `name != \"example-announcement\"`. You can also filter nested fields. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-announcement\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"announcement-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"announcement-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of announcements to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListAnnouncements` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAnnouncements` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location to be queried for announcements. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1-a`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/announcements", + "response": { + "$ref": "ListAnnouncementsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "dnsBindPermission": { "methods": { "grant": { @@ -2754,6 +2829,120 @@ ] } } + }, + "upgrades": { + "methods": { + "get": { + "description": "Retrieves a private cloud `Upgrade` resource by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/upgrades/{upgradesId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.upgrades.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `Upgrade` resource to be retrieved. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1-a/privateClouds/my-cloud/upgrades/my-upgrade`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/upgrades/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Upgrade" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists past, ongoing and upcoming `Upgrades` for the given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/upgrades", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.upgrades.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of upgrades, you can exclude the ones named `example-upgrade1` by specifying `name != \"example-upgrade1\"`. You can also filter nested fields. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-upgrade\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"upgrade-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"upgrade-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of `Upgrades` to return in one page. The service may return fewer resources than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListUpgrades` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUpgrades` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Query a list of `Upgrades` for the given private cloud resource name. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/upgrades", + "response": { + "$ref": "ListUpgradesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update the private cloud `Upgrade` resource. Only `schedule` field can updated. The schedule can only be updated when the upgrade has not started and schedule edit window is open. Only fields specified in `update_mask` are considered.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/upgrades/{upgradesId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateClouds.upgrades.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the private cloud `Upgrade`. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1-a/privateClouds/my-cloud/upgrades/my-upgrade`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/upgrades/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Upgrade` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Upgrade" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -3173,9 +3362,86 @@ } } }, - "revision": "20241009", + "revision": "20250218", "rootUrl": "https://vmwareengine.googleapis.com/", "schemas": { + "Announcement": { + "description": "Announcement for the resources of Vmware Engine.", + "id": "Announcement", + "properties": { + "activityType": { + "description": "Optional. Activity type of the announcement There can be only one active announcement for a given activity type and target resource.", + "type": "string" + }, + "cluster": { + "description": "A Cluster resource name.", + "type": "string" + }, + "code": { + "description": "Required. Code of the announcement. Indicates the presence of a VMware Engine related announcement and corresponds to a related message in the `description` field.", + "type": "string" + }, + "createTime": { + "description": "Output only. Creation time of this resource. It also serves as start time of notification.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. Description of the announcement.", + "readOnly": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. Additional structured details about this announcement.", + "readOnly": true, + "type": "object" + }, + "name": { + "description": "Output only. The resource name of the announcement. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1-a/announcements/my-announcement-id`", + "readOnly": true, + "type": "string" + }, + "privateCloud": { + "description": "A Private Cloud resource name.", + "type": "string" + }, + "state": { + "description": "Output only. State of the resource. New values may be added to this enum when appropriate.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "INACTIVE", + "DELETING", + "CREATING" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "Active announcement which should be visible to user.", + "Inactive announcement which should not be visible to user.", + "Announcement which is being deleted", + "Announcement which being created" + ], + "readOnly": true, + "type": "string" + }, + "targetResourceType": { + "description": "Output only. Target Resource Type defines the type of the target for the announcement", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "AuditConfig": { "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", "id": "AuditConfig", @@ -3377,6 +3643,30 @@ }, "type": "object" }, + "Constraints": { + "description": "Constraints to be applied while editing a schedule. These constraints ensure that `Upgrade` specific requirements are met.", + "id": "Constraints", + "properties": { + "minHoursDay": { + "description": "Output only. Minimum number of hours must be allotted for the upgrade activities for each selected day. This is a minimum; the upgrade schedule can allot more hours for the given day.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "minHoursWeek": { + "description": "Output only. The minimum number of weekly hours must be allotted for the upgrade activities. This is just a minimum; the schedule can assign more weekly hours.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "rescheduleDateRange": { + "$ref": "Interval", + "description": "Output only. Output Only. The user can only reschedule an upgrade that starts within this range.", + "readOnly": true + } + }, + "type": "object" + }, "Credentials": { "description": "Credentials for a private cloud.", "id": "Credentials", @@ -3768,6 +4058,23 @@ }, "type": "object" }, + "Interval": { + "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", + "id": "Interval", + "properties": { + "endTime": { + "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "IpRange": { "description": "An IP range provided in any one of the supported formats.", "id": "IpRange", @@ -3787,6 +4094,31 @@ }, "type": "object" }, + "ListAnnouncementsResponse": { + "description": "Response message for VmwareEngine.ListAnnouncements", + "id": "ListAnnouncementsResponse", + "properties": { + "announcements": { + "description": "A list of announcement runs.", + "items": { + "$ref": "Announcement" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "list of unreachable locations", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListClustersResponse": { "description": "Response message for VmwareEngine.ListClusters", "id": "ListClustersResponse", @@ -4177,6 +4509,31 @@ }, "type": "object" }, + "ListUpgradesResponse": { + "description": "Response message for VmwareEngine.ListUpgrades.", + "id": "ListUpgradesResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "List of unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "upgrades": { + "description": "A list of `Upgrades`.", + "items": { + "$ref": "Upgrade" + }, + "type": "array" + } + }, + "type": "object" + }, "ListVmwareEngineNetworksResponse": { "description": "Response message for VmwareEngine.ListVmwareEngineNetworks", "id": "ListVmwareEngineNetworksResponse", @@ -5307,6 +5664,50 @@ }, "type": "object" }, + "Schedule": { + "description": "Schedule for the upgrade.", + "id": "Schedule", + "properties": { + "constraints": { + "$ref": "Constraints", + "description": "Output only. Output Only. Constraints applied to the schedule. These constraints should be applicable at the time of any rescheduling.", + "readOnly": true + }, + "editWindow": { + "$ref": "Interval", + "description": "Output only. Output Only. The schedule is open for edits during this time interval or window.", + "readOnly": true + }, + "lastEditor": { + "description": "Output only. Output Only. Indicates who most recently edited the upgrade schedule. The value is updated whenever the upgrade is rescheduled.", + "enum": [ + "EDITOR_UNSPECIFIED", + "SYSTEM", + "USER" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "The upgrade is scheduled by the System or internal service.", + "The upgrade is scheduled by the end user." + ], + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Required. The scheduled start time for the upgrade.", + "format": "google-datetime", + "type": "string" + }, + "weeklyWindows": { + "description": "Required. Weekly time windows for upgrade activities. The server performs upgrade activities during these time windows to minimize disruptions.", + "items": { + "$ref": "TimeWindow" + }, + "type": "array" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -5464,6 +5865,73 @@ }, "type": "object" }, + "TimeOfDay": { + "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", + "id": "TimeOfDay", + "properties": { + "hours": { + "description": "Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TimeWindow": { + "description": "Represents the time window to perform upgrade activities.", + "id": "TimeWindow", + "properties": { + "dayOfWeek": { + "description": "Required. Day of the week for this window.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Required. The duration of the window. The max allowed duration for any window is 24 hours.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Required. Time in UTC when the window starts." + } + }, + "type": "object" + }, "UndeletePrivateCloudRequest": { "description": "Request message for VmwareEngine.UndeletePrivateCloud", "id": "UndeletePrivateCloudRequest", @@ -5475,6 +5943,135 @@ }, "type": "object" }, + "Upgrade": { + "description": "Describes Private cloud Upgrade.", + "id": "Upgrade", + "properties": { + "componentUpgrades": { + "description": "Output only. Output Only. The list of component upgrades.", + "items": { + "$ref": "VmwareUpgradeComponent" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Output Only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. Output Only. The description of the upgrade. This is used to provide additional information about the private cloud upgrade, such as the upgrade's purpose, the changes included in the upgrade, or any other relevant information about the upgrade.", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. Output Only. End time of the upgrade.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "estimatedDuration": { + "description": "Output only. Output Only. The estimated total duration of the upgrade. This information can be used to plan or schedule upgrades to minimize disruptions. Please note that the estimated duration is only an estimate. The actual upgrade duration may vary.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "etag": { + "description": "The etag for the upgrade resource. If this is provided on update, it must match the server's etag.", + "type": "string" + }, + "name": { + "description": "Output only. Identifier. The resource name of the private cloud `Upgrade`. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1-a/privateClouds/my-cloud/upgrades/my-upgrade`", + "readOnly": true, + "type": "string" + }, + "schedule": { + "$ref": "Schedule", + "description": "Schedule details for the upgrade." + }, + "startVersion": { + "description": "Output only. Output Only. The start version", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the upgrade.", + "enum": [ + "STATE_UNSPECIFIED", + "SCHEDULED", + "ONGOING", + "SUCCEEDED", + "PAUSED", + "FAILED", + "CANCELLING", + "CANCELLED", + "RESCHEDULING" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "The upgrade is scheduled but not started yet.", + "The upgrade is currently in progress and has not completed yet.", + "The upgrade completed successfully.", + "The upgrade is currently paused.", + "The upgrade failed.", + "The upgrade is in process of being canceled.", + "The upgrade is canceled.", + "The upgrade is in process of being rescheduled." + ], + "readOnly": true, + "type": "string" + }, + "targetVersion": { + "description": "Output only. Output Only. The target version", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. Output Only. The type of upgrade.", + "enum": [ + "TYPE_UNSPECIFIED", + "VSPHERE_UPGRADE", + "VSPHERE_PATCH", + "WORKAROUND", + "FIRMWARE_UPGRADE", + "SWITCH_UPGRADE", + "OTHER", + "INFRASTRUCTURE_UPGRADE" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "Upgrade of vmware components when a major version is available. 7.0u2 -\u003e 7.0u3.", + "Patching of vmware components when a minor version is available. 7.0u2c -\u003e 7.0u2d.", + "Workarounds are hotfixes for vulnerabilities or issues applied to mitigate the known vulnerability or issue until a patch or update is released. The description of the upgrade will have more details.", + "Firmware upgrade for VMware product used in the private cloud.", + "Switch upgrade.", + "The upgrade type that doesn't fall into any other category.", + "Infrastructure upgrade in BM node maintenance." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Output Only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "version": { + "description": "Output only. ", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Vcenter": { "description": "Details about a vCenter Server management appliance.", "id": "Vcenter", @@ -5587,6 +6184,73 @@ }, "type": "object" }, + "VmwareUpgradeComponent": { + "description": "Per component upgrade resource", + "id": "VmwareUpgradeComponent", + "properties": { + "componentType": { + "description": "Output only. Type of component", + "enum": [ + "VMWARE_COMPONENT_TYPE_UNSPECIFIED", + "VCENTER", + "ESXI", + "NSXT_UC", + "NSXT_EDGE", + "NSXT_MGR", + "HCX", + "VSAN", + "DVS", + "NAMESERVER_VM", + "KMS_VM", + "WITNESS_VM", + "NSXT", + "CLUSTER" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "vcenter", + "esxi nodes + transport nodes", + "nsxt upgrade coordinator", + "nsxt edges cluster", + "nsxt managers/management plane", + "hcx", + "VSAN cluster", + "DVS switch", + "Nameserver VMs", + "KMS VM used for vsan encryption", + "witness VM in case of stretch PC", + "nsxt", + "Cluster is used in case of BM" + ], + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Component's upgrade state.", + "enum": [ + "STATE_UNSPECIFIED", + "RUNNING", + "PAUSED", + "SUCCEEDED", + "FAILED", + "NOT_STARTED", + "NOT_APPLICABLE" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "Component's upgrade is in progress", + "The component's upgrade is paused. Will be resumed when upgrade job is resumed", + "The component's upgrade is successfully completed", + "The component's upgrade has failed. This will move to resume if upgrade is resumed or stay as is", + "Component's upgrade has not started yet", + "Component's upgrade is not applicable in this upgrade. It will be skipped." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "VpcNetwork": { "description": "Represents a VMware Engine VPC network that is managed by a VMware Engine network resource.", "id": "VpcNetwork", diff --git a/vmwareengine/v1/vmwareengine-gen.go b/vmwareengine/v1/vmwareengine-gen.go index df227b70137..7fa4462ec6e 100644 --- a/vmwareengine/v1/vmwareengine-gen.go +++ b/vmwareengine/v1/vmwareengine-gen.go @@ -171,6 +171,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Announcements = NewProjectsLocationsAnnouncementsService(s) rs.DnsBindPermission = NewProjectsLocationsDnsBindPermissionService(s) rs.NetworkPeerings = NewProjectsLocationsNetworkPeeringsService(s) rs.NetworkPolicies = NewProjectsLocationsNetworkPoliciesService(s) @@ -185,6 +186,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + Announcements *ProjectsLocationsAnnouncementsService + DnsBindPermission *ProjectsLocationsDnsBindPermissionService NetworkPeerings *ProjectsLocationsNetworkPeeringsService @@ -202,6 +205,15 @@ type ProjectsLocationsService struct { VmwareEngineNetworks *ProjectsLocationsVmwareEngineNetworksService } +func NewProjectsLocationsAnnouncementsService(s *Service) *ProjectsLocationsAnnouncementsService { + rs := &ProjectsLocationsAnnouncementsService{s: s} + return rs +} + +type ProjectsLocationsAnnouncementsService struct { + s *Service +} + func NewProjectsLocationsDnsBindPermissionService(s *Service) *ProjectsLocationsDnsBindPermissionService { rs := &ProjectsLocationsDnsBindPermissionService{s: s} return rs @@ -279,6 +291,7 @@ func NewProjectsLocationsPrivateCloudsService(s *Service) *ProjectsLocationsPriv rs.LoggingServers = NewProjectsLocationsPrivateCloudsLoggingServersService(s) rs.ManagementDnsZoneBindings = NewProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService(s) rs.Subnets = NewProjectsLocationsPrivateCloudsSubnetsService(s) + rs.Upgrades = NewProjectsLocationsPrivateCloudsUpgradesService(s) return rs } @@ -296,6 +309,8 @@ type ProjectsLocationsPrivateCloudsService struct { ManagementDnsZoneBindings *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService Subnets *ProjectsLocationsPrivateCloudsSubnetsService + + Upgrades *ProjectsLocationsPrivateCloudsUpgradesService } func NewProjectsLocationsPrivateCloudsClustersService(s *Service) *ProjectsLocationsPrivateCloudsClustersService { @@ -364,6 +379,15 @@ type ProjectsLocationsPrivateCloudsSubnetsService struct { s *Service } +func NewProjectsLocationsPrivateCloudsUpgradesService(s *Service) *ProjectsLocationsPrivateCloudsUpgradesService { + rs := &ProjectsLocationsPrivateCloudsUpgradesService{s: s} + return rs +} + +type ProjectsLocationsPrivateCloudsUpgradesService struct { + s *Service +} + func NewProjectsLocationsPrivateConnectionsService(s *Service) *ProjectsLocationsPrivateConnectionsService { rs := &ProjectsLocationsPrivateConnectionsService{s: s} rs.PeeringRoutes = NewProjectsLocationsPrivateConnectionsPeeringRoutesService(s) @@ -394,6 +418,68 @@ type ProjectsLocationsVmwareEngineNetworksService struct { s *Service } +// Announcement: Announcement for the resources of Vmware Engine. +type Announcement struct { + // ActivityType: Optional. Activity type of the announcement There can be only + // one active announcement for a given activity type and target resource. + ActivityType string `json:"activityType,omitempty"` + // Cluster: A Cluster resource name. + Cluster string `json:"cluster,omitempty"` + // Code: Required. Code of the announcement. Indicates the presence of a VMware + // Engine related announcement and corresponds to a related message in the + // `description` field. + Code string `json:"code,omitempty"` + // CreateTime: Output only. Creation time of this resource. It also serves as + // start time of notification. + CreateTime string `json:"createTime,omitempty"` + // Description: Output only. Description of the announcement. + Description string `json:"description,omitempty"` + // Metadata: Output only. Additional structured details about this + // announcement. + Metadata map[string]string `json:"metadata,omitempty"` + // Name: Output only. The resource name of the announcement. Resource names are + // schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-west1-a/announcements/my-announcement-id` + Name string `json:"name,omitempty"` + // PrivateCloud: A Private Cloud resource name. + PrivateCloud string `json:"privateCloud,omitempty"` + // State: Output only. State of the resource. New values may be added to this + // enum when appropriate. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be used. + // "ACTIVE" - Active announcement which should be visible to user. + // "INACTIVE" - Inactive announcement which should not be visible to user. + // "DELETING" - Announcement which is being deleted + // "CREATING" - Announcement which being created + State string `json:"state,omitempty"` + // TargetResourceType: Output only. Target Resource Type defines the type of + // the target for the announcement + TargetResourceType string `json:"targetResourceType,omitempty"` + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ActivityType") 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. "ActivityType") 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 Announcement) MarshalJSON() ([]byte, error) { + type NoMethod Announcement + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must have one @@ -716,6 +802,38 @@ func (s Cluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Constraints: Constraints to be applied while editing a schedule. These +// constraints ensure that `Upgrade` specific requirements are met. +type Constraints struct { + // MinHoursDay: Output only. Minimum number of hours must be allotted for the + // upgrade activities for each selected day. This is a minimum; the upgrade + // schedule can allot more hours for the given day. + MinHoursDay int64 `json:"minHoursDay,omitempty"` + // MinHoursWeek: Output only. The minimum number of weekly hours must be + // allotted for the upgrade activities. This is just a minimum; the schedule + // can assign more weekly hours. + MinHoursWeek int64 `json:"minHoursWeek,omitempty"` + // RescheduleDateRange: Output only. Output Only. The user can only reschedule + // an upgrade that starts within this range. + RescheduleDateRange *Interval `json:"rescheduleDateRange,omitempty"` + // ForceSendFields is a list of field names (e.g. "MinHoursDay") 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. "MinHoursDay") 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 Constraints) MarshalJSON() ([]byte, error) { + type NoMethod Constraints + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Credentials: Credentials for a private cloud. type Credentials struct { // Password: Initial password. @@ -1194,6 +1312,37 @@ func (s HcxActivationKey) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Interval: Represents a time interval, encoded as a Timestamp start +// (inclusive) and a Timestamp end (exclusive). The start must be less than or +// equal to the end. When the start equals the end, the interval is empty +// (matches no time). When both start and end are unspecified, the interval +// matches any time. +type Interval struct { + // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp + // matching this interval will have to be before the end. + EndTime string `json:"endTime,omitempty"` + // StartTime: Optional. Inclusive start of the interval. If specified, a + // Timestamp matching this interval will have to be the same or after the + // start. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 Interval) MarshalJSON() ([]byte, error) { + type NoMethod Interval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // IpRange: An IP range provided in any one of the supported formats. type IpRange struct { // ExternalAddress: The name of an `ExternalAddress` resource. The external @@ -1227,6 +1376,37 @@ func (s IpRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListAnnouncementsResponse: Response message for +// VmwareEngine.ListAnnouncements +type ListAnnouncementsResponse struct { + // Announcements: A list of announcement runs. + Announcements []*Announcement `json:"announcements,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: list of unreachable locations + 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. "Announcements") 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. "Announcements") 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 ListAnnouncementsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAnnouncementsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListClustersResponse: Response message for VmwareEngine.ListClusters type ListClustersResponse struct { // Clusters: A list of private cloud clusters. @@ -1748,6 +1928,36 @@ func (s ListSubnetsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListUpgradesResponse: Response message for VmwareEngine.ListUpgrades. +type ListUpgradesResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: List of unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + // Upgrades: A list of `Upgrades`. + Upgrades []*Upgrade `json:"upgrades,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. 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. "NextPageToken") 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 ListUpgradesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUpgradesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListVmwareEngineNetworksResponse: Response message for // VmwareEngine.ListVmwareEngineNetworks type ListVmwareEngineNetworksResponse struct { @@ -3045,6 +3255,46 @@ func (s RevokeDnsBindPermissionRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Schedule: Schedule for the upgrade. +type Schedule struct { + // Constraints: Output only. Output Only. Constraints applied to the schedule. + // These constraints should be applicable at the time of any rescheduling. + Constraints *Constraints `json:"constraints,omitempty"` + // EditWindow: Output only. Output Only. The schedule is open for edits during + // this time interval or window. + EditWindow *Interval `json:"editWindow,omitempty"` + // LastEditor: Output only. Output Only. Indicates who most recently edited the + // upgrade schedule. The value is updated whenever the upgrade is rescheduled. + // + // Possible values: + // "EDITOR_UNSPECIFIED" - The default value. This value should never be used. + // "SYSTEM" - The upgrade is scheduled by the System or internal service. + // "USER" - The upgrade is scheduled by the end user. + LastEditor string `json:"lastEditor,omitempty"` + // StartTime: Required. The scheduled start time for the upgrade. + StartTime string `json:"startTime,omitempty"` + // WeeklyWindows: Required. Weekly time windows for upgrade activities. The + // server performs upgrade activities during these time windows to minimize + // disruptions. + WeeklyWindows []*TimeWindow `json:"weeklyWindows,omitempty"` + // ForceSendFields is a list of field names (e.g. "Constraints") 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. "Constraints") 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 Schedule) MarshalJSON() ([]byte, error) { + type NoMethod Schedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the `resource`. The @@ -3273,6 +3523,79 @@ func (s Thresholds) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// TimeOfDay: Represents a time of day. The date and time zone are either not +// significant or are specified elsewhere. An API may choose to allow leap +// seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. +type TimeOfDay struct { + // Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0 + // and typically must be less than or equal to 23. An API may choose to allow + // the value "24:00:00" for scenarios like business closing time. + Hours int64 `json:"hours,omitempty"` + // Minutes: Minutes of an hour. Must be greater than or equal to 0 and less + // than or equal to 59. + Minutes int64 `json:"minutes,omitempty"` + // Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal + // to 0 and less than or equal to 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + // Seconds: Seconds of a minute. Must be greater than or equal to 0 and + // typically must be less than or equal to 59. An API may allow the value 60 if + // it allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hours") 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. "Hours") 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 TimeOfDay) MarshalJSON() ([]byte, error) { + type NoMethod TimeOfDay + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TimeWindow: Represents the time window to perform upgrade activities. +type TimeWindow struct { + // DayOfWeek: Required. Day of the week for this window. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + DayOfWeek string `json:"dayOfWeek,omitempty"` + // Duration: Required. The duration of the window. The max allowed duration for + // any window is 24 hours. + Duration string `json:"duration,omitempty"` + // StartTime: Required. Time in UTC when the window starts. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "DayOfWeek") 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. "DayOfWeek") 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 TimeWindow) MarshalJSON() ([]byte, error) { + type NoMethod TimeWindow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // UndeletePrivateCloudRequest: Request message for // VmwareEngine.UndeletePrivateCloud type UndeletePrivateCloudRequest struct { @@ -3297,6 +3620,97 @@ func (s UndeletePrivateCloudRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Upgrade: Describes Private cloud Upgrade. +type Upgrade struct { + // ComponentUpgrades: Output only. Output Only. The list of component upgrades. + ComponentUpgrades []*VmwareUpgradeComponent `json:"componentUpgrades,omitempty"` + // CreateTime: Output only. Output Only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + // Description: Output only. Output Only. The description of the upgrade. This + // is used to provide additional information about the private cloud upgrade, + // such as the upgrade's purpose, the changes included in the upgrade, or any + // other relevant information about the upgrade. + Description string `json:"description,omitempty"` + // EndTime: Output only. Output Only. End time of the upgrade. + EndTime string `json:"endTime,omitempty"` + // EstimatedDuration: Output only. Output Only. The estimated total duration of + // the upgrade. This information can be used to plan or schedule upgrades to + // minimize disruptions. Please note that the estimated duration is only an + // estimate. The actual upgrade duration may vary. + EstimatedDuration string `json:"estimatedDuration,omitempty"` + // Etag: The etag for the upgrade resource. If this is provided on update, it + // must match the server's etag. + Etag string `json:"etag,omitempty"` + // Name: Output only. Identifier. The resource name of the private cloud + // `Upgrade`. Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-west1-a/privateClouds/my-cloud/upgrades/my- + // upgrade` + Name string `json:"name,omitempty"` + // Schedule: Schedule details for the upgrade. + Schedule *Schedule `json:"schedule,omitempty"` + // StartVersion: Output only. Output Only. The start version + StartVersion string `json:"startVersion,omitempty"` + // State: Output only. The current state of the upgrade. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be used. + // "SCHEDULED" - The upgrade is scheduled but not started yet. + // "ONGOING" - The upgrade is currently in progress and has not completed + // yet. + // "SUCCEEDED" - The upgrade completed successfully. + // "PAUSED" - The upgrade is currently paused. + // "FAILED" - The upgrade failed. + // "CANCELLING" - The upgrade is in process of being canceled. + // "CANCELLED" - The upgrade is canceled. + // "RESCHEDULING" - The upgrade is in process of being rescheduled. + State string `json:"state,omitempty"` + // TargetVersion: Output only. Output Only. The target version + TargetVersion string `json:"targetVersion,omitempty"` + // Type: Output only. Output Only. The type of upgrade. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The default value. This value should never be used. + // "VSPHERE_UPGRADE" - Upgrade of vmware components when a major version is + // available. 7.0u2 -> 7.0u3. + // "VSPHERE_PATCH" - Patching of vmware components when a minor version is + // available. 7.0u2c -> 7.0u2d. + // "WORKAROUND" - Workarounds are hotfixes for vulnerabilities or issues + // applied to mitigate the known vulnerability or issue until a patch or update + // is released. The description of the upgrade will have more details. + // "FIRMWARE_UPGRADE" - Firmware upgrade for VMware product used in the + // private cloud. + // "SWITCH_UPGRADE" - Switch upgrade. + // "OTHER" - The upgrade type that doesn't fall into any other category. + // "INFRASTRUCTURE_UPGRADE" - Infrastructure upgrade in BM node maintenance. + Type string `json:"type,omitempty"` + // Uid: Output only. System-generated unique identifier for the resource. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. Output Only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + // Version: Output only. + 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. "ComponentUpgrades") 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. "ComponentUpgrades") 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 Upgrade) MarshalJSON() ([]byte, error) { + type NoMethod Upgrade + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Vcenter: Details about a vCenter Server management appliance. type Vcenter struct { // Fqdn: Fully qualified domain name of the appliance. @@ -3396,6 +3810,59 @@ func (s VmwareEngineNetwork) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VmwareUpgradeComponent: Per component upgrade resource +type VmwareUpgradeComponent struct { + // ComponentType: Output only. Type of component + // + // Possible values: + // "VMWARE_COMPONENT_TYPE_UNSPECIFIED" - The default value. This value should + // never be used. + // "VCENTER" - vcenter + // "ESXI" - esxi nodes + transport nodes + // "NSXT_UC" - nsxt upgrade coordinator + // "NSXT_EDGE" - nsxt edges cluster + // "NSXT_MGR" - nsxt managers/management plane + // "HCX" - hcx + // "VSAN" - VSAN cluster + // "DVS" - DVS switch + // "NAMESERVER_VM" - Nameserver VMs + // "KMS_VM" - KMS VM used for vsan encryption + // "WITNESS_VM" - witness VM in case of stretch PC + // "NSXT" - nsxt + // "CLUSTER" - Cluster is used in case of BM + ComponentType string `json:"componentType,omitempty"` + // State: Output only. Component's upgrade state. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be used. + // "RUNNING" - Component's upgrade is in progress + // "PAUSED" - The component's upgrade is paused. Will be resumed when upgrade + // job is resumed + // "SUCCEEDED" - The component's upgrade is successfully completed + // "FAILED" - The component's upgrade has failed. This will move to resume if + // upgrade is resumed or stay as is + // "NOT_STARTED" - Component's upgrade has not started yet + // "NOT_APPLICABLE" - Component's upgrade is not applicable in this upgrade. + // It will be skipped. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComponentType") 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. "ComponentType") 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 VmwareUpgradeComponent) MarshalJSON() ([]byte, error) { + type NoMethod VmwareUpgradeComponent + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VpcNetwork: Represents a VMware Engine VPC network that is managed by a // VMware Engine network resource. type VpcNetwork struct { @@ -3815,60 +4282,353 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } -type ProjectsLocationsDnsBindPermissionGrantCall struct { - s *Service - name string - grantdnsbindpermissionrequest *GrantDnsBindPermissionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAnnouncementsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Grant: Grants the bind permission to the customer provided principal(user / -// service account) to bind their DNS zone with the intranet VPC associated -// with the project. DnsBindPermission is a global resource and location can -// only be global. +// Get: Retrieves a `Announcement` by its resource name. // -// - name: The name of the resource which stores the users/service accounts -// having the permission to bind to the corresponding intranet VPC of the -// consumer project. DnsBindPermission is a global resource. Resource names +// - name: The resource name of the announcement to retrieve. Resource names // are schemeless URIs that follow the conventions in // https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/global/dnsBindPermission`. -func (r *ProjectsLocationsDnsBindPermissionService) Grant(name string, grantdnsbindpermissionrequest *GrantDnsBindPermissionRequest) *ProjectsLocationsDnsBindPermissionGrantCall { - c := &ProjectsLocationsDnsBindPermissionGrantCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/my-project/locations/us-west1-a/announcements/announcement-uuid`. +func (r *ProjectsLocationsAnnouncementsService) Get(name string) *ProjectsLocationsAnnouncementsGetCall { + c := &ProjectsLocationsAnnouncementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.grantdnsbindpermissionrequest = grantdnsbindpermissionrequest 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 *ProjectsLocationsDnsBindPermissionGrantCall) Fields(s ...googleapi.Field) *ProjectsLocationsDnsBindPermissionGrantCall { +func (c *ProjectsLocationsAnnouncementsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAnnouncementsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAnnouncementsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAnnouncementsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDnsBindPermissionGrantCall) Context(ctx context.Context) *ProjectsLocationsDnsBindPermissionGrantCall { +func (c *ProjectsLocationsAnnouncementsGetCall) Context(ctx context.Context) *ProjectsLocationsAnnouncementsGetCall { 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 *ProjectsLocationsDnsBindPermissionGrantCall) Header() http.Header { +func (c *ProjectsLocationsAnnouncementsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDnsBindPermissionGrantCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.grantdnsbindpermissionrequest) - if err != nil { +func (c *ProjectsLocationsAnnouncementsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.announcements.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.announcements.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Announcement.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 *ProjectsLocationsAnnouncementsGetCall) Do(opts ...googleapi.CallOption) (*Announcement, 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 := &Announcement{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.announcements.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsAnnouncementsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `Announcements` for a given region and project +// +// - parent: The resource name of the location to be queried for announcements. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-west1-a`. +func (r *ProjectsLocationsAnnouncementsService) List(parent string) *ProjectsLocationsAnnouncementsListCall { + c := &ProjectsLocationsAnnouncementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must specify the +// field name, a comparison operator, and the value that you want to use for +// filtering. The value must be a string, a number, or a boolean. The +// comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are +// filtering a list of announcement runs, you can exclude the ones named +// `example-announcement` by specifying `name != "example-announcement". You +// can also filter nested fields. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` (name = +// "example-announcement") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can include +// `AND` and `OR` expressions explicitly. For example: ``` (name = +// "announcement-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR (name = +// "announcement-2") ``` +func (c *ProjectsLocationsAnnouncementsListCall) Filter(filter string) *ProjectsLocationsAnnouncementsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, returned results are ordered by `name` in +// ascending order. You can also sort results in descending order based on the +// `name` value using `orderBy="name desc". Currently, only ordering by `name` +// is supported. +func (c *ProjectsLocationsAnnouncementsListCall) OrderBy(orderBy string) *ProjectsLocationsAnnouncementsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// announcements to return in one page. The service may return fewer than this +// value. The maximum value is coerced to 1000. The default value of this field +// is 500. +func (c *ProjectsLocationsAnnouncementsListCall) PageSize(pageSize int64) *ProjectsLocationsAnnouncementsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListAnnouncements` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListAnnouncements` must match the call that provided the page token. +func (c *ProjectsLocationsAnnouncementsListCall) PageToken(pageToken string) *ProjectsLocationsAnnouncementsListCall { + 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 +// details. +func (c *ProjectsLocationsAnnouncementsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAnnouncementsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAnnouncementsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAnnouncementsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAnnouncementsListCall) Context(ctx context.Context) *ProjectsLocationsAnnouncementsListCall { + 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 *ProjectsLocationsAnnouncementsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAnnouncementsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/announcements") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.announcements.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.announcements.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAnnouncementsResponse.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 *ProjectsLocationsAnnouncementsListCall) Do(opts ...googleapi.CallOption) (*ListAnnouncementsResponse, 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 := &ListAnnouncementsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.announcements.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// 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 *ProjectsLocationsAnnouncementsListCall) Pages(ctx context.Context, f func(*ListAnnouncementsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsDnsBindPermissionGrantCall struct { + s *Service + name string + grantdnsbindpermissionrequest *GrantDnsBindPermissionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Grant: Grants the bind permission to the customer provided principal(user / +// service account) to bind their DNS zone with the intranet VPC associated +// with the project. DnsBindPermission is a global resource and location can +// only be global. +// +// - name: The name of the resource which stores the users/service accounts +// having the permission to bind to the corresponding intranet VPC of the +// consumer project. DnsBindPermission is a global resource. Resource names +// are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global/dnsBindPermission`. +func (r *ProjectsLocationsDnsBindPermissionService) Grant(name string, grantdnsbindpermissionrequest *GrantDnsBindPermissionRequest) *ProjectsLocationsDnsBindPermissionGrantCall { + c := &ProjectsLocationsDnsBindPermissionGrantCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.grantdnsbindpermissionrequest = grantdnsbindpermissionrequest + 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 *ProjectsLocationsDnsBindPermissionGrantCall) Fields(s ...googleapi.Field) *ProjectsLocationsDnsBindPermissionGrantCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDnsBindPermissionGrantCall) Context(ctx context.Context) *ProjectsLocationsDnsBindPermissionGrantCall { + 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 *ProjectsLocationsDnsBindPermissionGrantCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDnsBindPermissionGrantCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.grantdnsbindpermissionrequest) + if err != nil { return nil, err } c.urlParams_.Set("alt", alt) @@ -13540,6 +14300,438 @@ func (c *ProjectsLocationsPrivateCloudsSubnetsPatchCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsPrivateCloudsUpgradesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a private cloud `Upgrade` resource by its resource name. +// +// - name: The name of the `Upgrade` resource to be retrieved. Resource names +// are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-west1-a/privateClouds/my-cloud/upgrades/m +// y-upgrade`. +func (r *ProjectsLocationsPrivateCloudsUpgradesService) Get(name string) *ProjectsLocationsPrivateCloudsUpgradesGetCall { + c := &ProjectsLocationsPrivateCloudsUpgradesGetCall{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 +// details. +func (c *ProjectsLocationsPrivateCloudsUpgradesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsUpgradesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsPrivateCloudsUpgradesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsUpgradesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPrivateCloudsUpgradesGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsUpgradesGetCall { + 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 *ProjectsLocationsPrivateCloudsUpgradesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsUpgradesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.privateClouds.upgrades.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.upgrades.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Upgrade.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 *ProjectsLocationsPrivateCloudsUpgradesGetCall) Do(opts ...googleapi.CallOption) (*Upgrade, 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 := &Upgrade{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.privateClouds.upgrades.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsPrivateCloudsUpgradesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists past, ongoing and upcoming `Upgrades` for the given private +// cloud. +// +// - parent: Query a list of `Upgrades` for the given private cloud resource +// name. Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-west1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsUpgradesService) List(parent string) *ProjectsLocationsPrivateCloudsUpgradesListCall { + c := &ProjectsLocationsPrivateCloudsUpgradesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must specify the +// field name, a comparison operator, and the value that you want to use for +// filtering. The value must be a string, a number, or a boolean. The +// comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are +// filtering a list of upgrades, you can exclude the ones named +// `example-upgrade1` by specifying `name != "example-upgrade1". You can also +// filter nested fields. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` (name = +// "example-upgrade") (createTime > "2021-04-12T08:15:10.40Z") ``` By default, +// each expression is an `AND` expression. However, you can include `AND` and +// `OR` expressions explicitly. For example: ``` (name = "upgrade-1") AND +// (createTime > "2021-04-12T08:15:10.40Z") OR (name = "upgrade-2") ``` +func (c *ProjectsLocationsPrivateCloudsUpgradesListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsUpgradesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, returned results are ordered by `name` in +// ascending order. You can also sort results in descending order based on the +// `name` value using `orderBy="name desc". Currently, only ordering by `name` +// is supported. +func (c *ProjectsLocationsPrivateCloudsUpgradesListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsUpgradesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// `Upgrades` to return in one page. The service may return fewer resources +// than this value. The maximum value is coerced to 1000. The default value of +// this field is 500. +func (c *ProjectsLocationsPrivateCloudsUpgradesListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsUpgradesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListUpgrades` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to `ListUpgrades` must +// match the call that provided the page token. +func (c *ProjectsLocationsPrivateCloudsUpgradesListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsUpgradesListCall { + 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 +// details. +func (c *ProjectsLocationsPrivateCloudsUpgradesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsUpgradesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsPrivateCloudsUpgradesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsUpgradesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPrivateCloudsUpgradesListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsUpgradesListCall { + 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 *ProjectsLocationsPrivateCloudsUpgradesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsUpgradesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/upgrades") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.privateClouds.upgrades.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.upgrades.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListUpgradesResponse.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 *ProjectsLocationsPrivateCloudsUpgradesListCall) Do(opts ...googleapi.CallOption) (*ListUpgradesResponse, 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 := &ListUpgradesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.privateClouds.upgrades.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// 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 *ProjectsLocationsPrivateCloudsUpgradesListCall) Pages(ctx context.Context, f func(*ListUpgradesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsPrivateCloudsUpgradesPatchCall struct { + s *Service + name string + upgrade *Upgrade + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update the private cloud `Upgrade` resource. Only `schedule` field +// can updated. The schedule can only be updated when the upgrade has not +// started and schedule edit window is open. Only fields specified in +// `update_mask` are considered. +// +// - name: Output only. Identifier. The resource name of the private cloud +// `Upgrade`. Resource names are schemeless URIs that follow the conventions +// in https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-west1-a/privateClouds/my-cloud/upgrades/m +// y-upgrade`. +func (r *ProjectsLocationsPrivateCloudsUpgradesService) Patch(name string, upgrade *Upgrade) *ProjectsLocationsPrivateCloudsUpgradesPatchCall { + c := &ProjectsLocationsPrivateCloudsUpgradesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.upgrade = upgrade + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to identify +// requests. Specify a unique request ID so that if you must retry your +// request, the server will know to ignore the request if it has already been +// completed. The server guarantees that a request doesn't result in creation +// of duplicate commitments for at least 60 minutes. For example, consider a +// situation where you make an initial request and the request times out. If +// you make the request again with the same request ID, the server can check if +// original operation with the same request ID was received, and if so, will +// ignore the second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsUpgradesPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsUpgradesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask is +// used to specify the fields to be overwritten in the `Upgrade` resource by +// the update. The fields specified in the `update_mask` are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsPrivateCloudsUpgradesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsUpgradesPatchCall { + 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 +// details. +func (c *ProjectsLocationsPrivateCloudsUpgradesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsUpgradesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPrivateCloudsUpgradesPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsUpgradesPatchCall { + 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 *ProjectsLocationsPrivateCloudsUpgradesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsUpgradesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.upgrade) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.privateClouds.upgrades.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.upgrades.patch" call. +// 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 *ProjectsLocationsPrivateCloudsUpgradesPatchCall) 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, 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 := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "vmwareengine.projects.locations.privateClouds.upgrades.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsPrivateConnectionsCreateCall struct { s *Service parent string