From a7f08e2d1f5d4590ae0c6d66077f012bd18b5464 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 15 Dec 2022 07:23:14 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1784) --- accessapproval/v1/accessapproval-api.json | 4 +- accessapproval/v1/accessapproval-gen.go | 17 +- alertcenter/v1beta1/alertcenter-api.json | 151 +- alertcenter/v1beta1/alertcenter-gen.go | 209 +- analyticsdata/v1beta/analyticsdata-api.json | 4 +- analyticsdata/v1beta/analyticsdata-gen.go | 7 +- api-list.json | 6 +- batch/v1/batch-api.json | 231 +- batch/v1/batch-gen.go | 1628 +--- bigquery/v2/bigquery-api.json | 12 +- bigquery/v2/bigquery-gen.go | 37 +- chat/v1/chat-api.json | 22 +- chat/v1/chat-gen.go | 29 +- cloudbilling/v1beta/cloudbilling-api.json | 394 +- cloudbilling/v1beta/cloudbilling-gen.go | 532 +- cloudchannel/v1/cloudchannel-api.json | 60 +- cloudchannel/v1/cloudchannel-gen.go | 115 + cloudfunctions/v2/cloudfunctions-api.json | 4 +- cloudfunctions/v2/cloudfunctions-gen.go | 2 +- .../v2alpha/cloudfunctions-api.json | 4 +- cloudfunctions/v2alpha/cloudfunctions-gen.go | 2 +- cloudfunctions/v2beta/cloudfunctions-api.json | 4 +- cloudfunctions/v2beta/cloudfunctions-gen.go | 2 +- compute/v0.alpha/compute-api.json | 4 +- compute/v0.alpha/compute-gen.go | 5 +- compute/v0.beta/compute-api.json | 4 +- compute/v0.beta/compute-gen.go | 5 +- compute/v1/compute-api.json | 11 +- compute/v1/compute-gen.go | 10 +- connectors/v1/connectors-api.json | 58 +- connectors/v1/connectors-gen.go | 164 + container/v1/container-api.json | 16 +- container/v1/container-gen.go | 12 + container/v1beta1/container-api.json | 16 +- container/v1beta1/container-gen.go | 12 + contentwarehouse/v1/contentwarehouse-api.json | 199 +- contentwarehouse/v1/contentwarehouse-gen.go | 216 +- dataflow/v1b3/dataflow-api.json | 40 +- dataflow/v1b3/dataflow-gen.go | 71 + datapipelines/v1/datapipelines-api.json | 625 +- datapipelines/v1/datapipelines-gen.go | 1533 +--- dataproc/v1/dataproc-api.json | 197 +- dataproc/v1/dataproc-gen.go | 557 +- datastream/v1/datastream-api.json | 8 +- datastream/v1/datastream-gen.go | 13 + .../v1alpha/discoveryengine-api.json | 4 +- .../v1alpha/discoveryengine-gen.go | 4 +- .../v1beta/discoveryengine-api.json | 4 +- discoveryengine/v1beta/discoveryengine-gen.go | 4 +- displayvideo/v2/displayvideo-api.json | 6 +- displayvideo/v2/displayvideo-gen.go | 17 +- dlp/v2/dlp-api.json | 4 +- dlp/v2/dlp-gen.go | 16 +- eventarc/v1/eventarc-api.json | 4 +- eventarc/v1/eventarc-gen.go | 5 +- file/v1/file-api.json | 4 +- file/v1/file-gen.go | 3 +- file/v1beta1/file-api.json | 4 +- file/v1beta1/file-gen.go | 3 +- firestore/v1/firestore-api.json | 87 +- firestore/v1/firestore-gen.go | 303 +- firestore/v1beta1/firestore-api.json | 32 +- firestore/v1beta1/firestore-gen.go | 115 +- gkehub/v1/gkehub-api.json | 8 +- gkehub/v1/gkehub-gen.go | 7 +- gkehub/v1alpha/gkehub-api.json | 8 +- gkehub/v1alpha/gkehub-gen.go | 7 +- gkehub/v1beta/gkehub-api.json | 8 +- gkehub/v1beta/gkehub-gen.go | 7 +- ids/v1/ids-api.json | 48 +- ids/v1/ids-gen.go | 186 + metastore/v1/metastore-api.json | 4 +- metastore/v1/metastore-gen.go | 4 +- metastore/v1alpha/metastore-api.json | 11 +- metastore/v1alpha/metastore-gen.go | 29 +- metastore/v1beta/metastore-api.json | 11 +- metastore/v1beta/metastore-gen.go | 29 +- .../v1/networkconnectivity-api.json | 6 +- .../v1/networkconnectivity-gen.go | 24 +- .../v1beta1/networksecurity-api.json | 224 +- .../v1beta1/networksecurity-gen.go | 1480 +++- .../v1/paymentsresellersubscription-api.json | 8 +- .../v1/paymentsresellersubscription-gen.go | 4 +- playintegrity/v1/playintegrity-api.json | 4 +- pubsublite/v1/pubsublite-api.json | 69 +- pubsublite/v1/pubsublite-gen.go | 103 + .../v1/recaptchaenterprise-api.json | 4 +- .../v1/recaptchaenterprise-gen.go | 4 +- retail/v2/retail-api.json | 19 +- retail/v2/retail-gen.go | 59 +- retail/v2alpha/retail-api.json | 19 +- retail/v2alpha/retail-gen.go | 59 +- retail/v2beta/retail-api.json | 19 +- retail/v2beta/retail-gen.go | 59 +- securitycenter/v1/securitycenter-api.json | 65 +- securitycenter/v1/securitycenter-gen.go | 207 +- .../v1beta1/securitycenter-api.json | 18 +- securitycenter/v1beta1/securitycenter-gen.go | 28 +- .../v1beta2/securitycenter-api.json | 18 +- securitycenter/v1beta2/securitycenter-gen.go | 28 +- .../v1/servicenetworking-api.json | 6 +- servicenetworking/v1/servicenetworking-gen.go | 30 +- slides/v1/slides-api.json | 6 +- slides/v1/slides-gen.go | 12 +- testing/v1/testing-api.json | 4 +- testing/v1/testing-gen.go | 2 - transcoder/v1/transcoder-api.json | 18 +- transcoder/v1/transcoder-gen.go | 48 +- .../v1/workflowexecutions-api.json | 12 +- .../v1/workflowexecutions-gen.go | 15 +- workloadmanager/v1/workloadmanager-api.json | 776 ++ workloadmanager/v1/workloadmanager-gen.go | 2231 ++++++ workstations/v1beta/workstations-api.json | 2075 +++++ workstations/v1beta/workstations-gen.go | 6761 +++++++++++++++++ 114 files changed, 18170 insertions(+), 4592 deletions(-) create mode 100644 workloadmanager/v1/workloadmanager-api.json create mode 100644 workloadmanager/v1/workloadmanager-gen.go create mode 100644 workstations/v1beta/workstations-api.json create mode 100644 workstations/v1beta/workstations-gen.go diff --git a/accessapproval/v1/accessapproval-api.json b/accessapproval/v1/accessapproval-api.json index 1e1631c3b0e..3353635326a 100644 --- a/accessapproval/v1/accessapproval-api.json +++ b/accessapproval/v1/accessapproval-api.json @@ -913,7 +913,7 @@ } } }, - "revision": "20220902", + "revision": "20221209", "rootUrl": "https://accessapproval.googleapis.com/", "schemas": { "AccessApprovalServiceAccount": { @@ -1140,7 +1140,7 @@ "id": "EnrolledService", "properties": { "cloudProduct": { - "description": "The product for which Access Approval will be enrolled. Allowed values are listed below (case-sensitive): * all * GA * App Engine * BigQuery * Cloud Bigtable * Cloud Key Management Service * Compute Engine * Cloud Dataflow * Cloud Dataproc * Cloud DLP * Cloud EKM * Cloud HSM * Cloud Identity and Access Management * Cloud Logging * Cloud Pub/Sub * Cloud Spanner * Cloud SQL * Cloud Storage * Google Kubernetes Engine * Organization Policy Serivice * Persistent Disk * Resource Manager * Secret Manager * Speaker ID Note: These values are supported as input for legacy purposes, but will not be returned from the API. * all * ga-only * appengine.googleapis.com * bigquery.googleapis.com * bigtable.googleapis.com * container.googleapis.com * cloudkms.googleapis.com * cloudresourcemanager.googleapis.com * cloudsql.googleapis.com * compute.googleapis.com * dataflow.googleapis.com * dataproc.googleapis.com * dlp.googleapis.com * iam.googleapis.com * logging.googleapis.com * orgpolicy.googleapis.com * pubsub.googleapis.com * spanner.googleapis.com * secretmanager.googleapis.com * speakerid.googleapis.com * storage.googleapis.com Calls to UpdateAccessApprovalSettings using 'all' or any of the XXX.googleapis.com will be translated to the associated product name ('all', 'App Engine', etc.). Note: 'all' will enroll the resource in all products supported at both 'GA' and 'Preview' levels. More information about levels of support is available at https://cloud.google.com/access-approval/docs/supported-services", + "description": "The product for which Access Approval will be enrolled. Allowed values are listed below (case-sensitive): * all * GA * App Engine . * Artifact Registry * BigQuery * Cloud Bigtable * Cloud Key Management Service * Compute Engine * Cloud Dataflow * Cloud Dataproc * Cloud DLP * Cloud EKM * Cloud HSM * Cloud Identity and Access Management * Cloud Logging * Cloud Pub/Sub * Cloud Spanner * Cloud SQL * Cloud Storage * Google Kubernetes Engine * Organization Policy Serivice * Persistent Disk * Resource Manager * Secret Manager * Speaker ID Note: These values are supported as input for legacy purposes, but will not be returned from the API. * all * ga-only * appengine.googleapis.com * artifactregistry.googleapis.com * bigquery.googleapis.com * bigtable.googleapis.com * container.googleapis.com * cloudkms.googleapis.com * cloudresourcemanager.googleapis.com * cloudsql.googleapis.com * compute.googleapis.com * dataflow.googleapis.com * dataproc.googleapis.com * dlp.googleapis.com * iam.googleapis.com * logging.googleapis.com * orgpolicy.googleapis.com * pubsub.googleapis.com * spanner.googleapis.com * secretmanager.googleapis.com * speakerid.googleapis.com * storage.googleapis.com Calls to UpdateAccessApprovalSettings using 'all' or any of the XXX.googleapis.com will be translated to the associated product name ('all', 'App Engine', etc.). Note: 'all' will enroll the resource in all products supported at both 'GA' and 'Preview' levels. More information about levels of support is available at https://cloud.google.com/access-approval/docs/supported-services", "type": "string" }, "enrollmentLevel": { diff --git a/accessapproval/v1/accessapproval-gen.go b/accessapproval/v1/accessapproval-gen.go index ce9b36b1693..c6958cb15bc 100644 --- a/accessapproval/v1/accessapproval-gen.go +++ b/accessapproval/v1/accessapproval-gen.go @@ -626,14 +626,15 @@ type Empty struct { type EnrolledService struct { // CloudProduct: The product for which Access Approval will be enrolled. // Allowed values are listed below (case-sensitive): * all * GA * App - // Engine * BigQuery * Cloud Bigtable * Cloud Key Management Service * - // Compute Engine * Cloud Dataflow * Cloud Dataproc * Cloud DLP * Cloud - // EKM * Cloud HSM * Cloud Identity and Access Management * Cloud - // Logging * Cloud Pub/Sub * Cloud Spanner * Cloud SQL * Cloud Storage * - // Google Kubernetes Engine * Organization Policy Serivice * Persistent - // Disk * Resource Manager * Secret Manager * Speaker ID Note: These - // values are supported as input for legacy purposes, but will not be - // returned from the API. * all * ga-only * appengine.googleapis.com * + // Engine . * Artifact Registry * BigQuery * Cloud Bigtable * Cloud Key + // Management Service * Compute Engine * Cloud Dataflow * Cloud Dataproc + // * Cloud DLP * Cloud EKM * Cloud HSM * Cloud Identity and Access + // Management * Cloud Logging * Cloud Pub/Sub * Cloud Spanner * Cloud + // SQL * Cloud Storage * Google Kubernetes Engine * Organization Policy + // Serivice * Persistent Disk * Resource Manager * Secret Manager * + // Speaker ID Note: These values are supported as input for legacy + // purposes, but will not be returned from the API. * all * ga-only * + // appengine.googleapis.com * artifactregistry.googleapis.com * // bigquery.googleapis.com * bigtable.googleapis.com * // container.googleapis.com * cloudkms.googleapis.com * // cloudresourcemanager.googleapis.com * cloudsql.googleapis.com * diff --git a/alertcenter/v1beta1/alertcenter-api.json b/alertcenter/v1beta1/alertcenter-api.json index 33ea57001f0..e1a77487825 100644 --- a/alertcenter/v1beta1/alertcenter-api.json +++ b/alertcenter/v1beta1/alertcenter-api.json @@ -423,7 +423,7 @@ } } }, - "revision": "20221017", + "revision": "20221212", "rootUrl": "https://alertcenter.googleapis.com/", "schemas": { "AbuseDetected": { @@ -768,7 +768,7 @@ "id": "ApnsCertificateExpirationInfo", "properties": { "appleId": { - "description": "The Apple ID used for the certificate, may be blank if admins did not enter it.", + "description": "The Apple ID used for the certificate may be blank if admins didn't enter it.", "type": "string" }, "expirationTime": { @@ -1866,6 +1866,73 @@ }, "type": "object" }, + "TransferError": { + "description": "Details for an invalid transfer or forward.", + "id": "TransferError", + "properties": { + "email": { + "description": "User's email address. This may be unavailable if the entity was deleted.", + "type": "string" + }, + "entityType": { + "description": "Type of entity being transferred to. For ring group members, this should always be USER.", + "enum": [ + "TRANSFER_ENTITY_TYPE_UNSPECIFIED", + "TRANSFER_AUTO_ATTENDANT", + "TRANSFER_RING_GROUP", + "TRANSFER_USER" + ], + "enumDescriptions": [ + "Entity type wasn't set.", + "Transfer to auto attendant.", + "Transfer to ring group.", + "Transfer to user." + ], + "type": "string" + }, + "id": { + "description": "Ring group or auto attendant ID. Not set for users.", + "type": "string" + }, + "invalidReason": { + "description": "Reason for the error.", + "enum": [ + "TRANSFER_INVALID_REASON_UNSPECIFIED", + "TRANSFER_TARGET_DELETED", + "UNLICENSED", + "SUSPENDED", + "NO_PHONE_NUMBER" + ], + "enumDescriptions": [ + "Reason wasn't specified.", + "The transfer target can't be found—most likely it was deleted.", + "The user's Google Voice license was removed.", + "The user's Google Workspace account was suspended.", + "The transfer target no longer has a phone number. This reason should become deprecated once we support numberless transfer." + ], + "type": "string" + }, + "name": { + "description": "User's full name, or the ring group / auto attendant name. This may be unavailable if the entity was deleted.", + "type": "string" + } + }, + "type": "object" + }, + "TransferMisconfiguration": { + "description": "Error related to transferring or forwarding a phone call.", + "id": "TransferMisconfiguration", + "properties": { + "errors": { + "description": "Details for each invalid transfer or forward.", + "items": { + "$ref": "TransferError" + }, + "type": "array" + } + }, + "type": "object" + }, "UndeleteAlertRequest": { "description": "A request to undelete a specific alert that was marked for deletion.", "id": "UndeleteAlertRequest", @@ -1917,6 +1984,86 @@ } }, "type": "object" + }, + "VoiceMisconfiguration": { + "description": "An alert triggered when Google Voice configuration becomes invalid, generally due to an external entity being modified or deleted.", + "id": "VoiceMisconfiguration", + "properties": { + "entityName": { + "description": "Name of the entity whose configuration is now invalid.", + "type": "string" + }, + "entityType": { + "description": "Type of the entity whose configuration is now invalid.", + "enum": [ + "ENTITY_TYPE_UNSPECIFIED", + "AUTO_ATTENDANT", + "RING_GROUP" + ], + "enumDescriptions": [ + "Entity type wasn't set.", + "Invalid auto attendant.", + "Invalid ring group." + ], + "type": "string" + }, + "fixUri": { + "description": "Link that the admin can follow to fix the issue.", + "type": "string" + }, + "membersMisconfiguration": { + "$ref": "TransferMisconfiguration", + "description": "Issue(s) with members of a ring group." + }, + "transferMisconfiguration": { + "$ref": "TransferMisconfiguration", + "description": "Issue(s) with transferring or forwarding to an external entity." + }, + "voicemailMisconfiguration": { + "$ref": "VoicemailMisconfiguration", + "description": "Issue(s) with sending to voicemail." + } + }, + "type": "object" + }, + "VoicemailMisconfiguration": { + "description": "Issue(s) with sending to voicemail.", + "id": "VoicemailMisconfiguration", + "properties": { + "errors": { + "description": "Issue(s) with voicemail recipients.", + "items": { + "$ref": "VoicemailRecipientError" + }, + "type": "array" + } + }, + "type": "object" + }, + "VoicemailRecipientError": { + "description": "Issue(s) with a voicemail recipient.", + "id": "VoicemailRecipientError", + "properties": { + "email": { + "description": "Email address of the invalid recipient. This may be unavailable if the recipient was deleted.", + "type": "string" + }, + "invalidReason": { + "description": "Reason for the error.", + "enum": [ + "EMAIL_INVALID_REASON_UNSPECIFIED", + "OUT_OF_QUOTA", + "RECIPIENT_DELETED" + ], + "enumDescriptions": [ + "Reason wasn't specified.", + "User can't receive emails due to insufficient quota.", + "All recipients were deleted." + ], + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/alertcenter/v1beta1/alertcenter-gen.go b/alertcenter/v1beta1/alertcenter-gen.go index 90569e9eb78..16ba4ddf476 100644 --- a/alertcenter/v1beta1/alertcenter-gen.go +++ b/alertcenter/v1beta1/alertcenter-gen.go @@ -641,8 +641,8 @@ func (s *AlertMetadata) MarshalJSON() ([]byte, error) { // ApnsCertificateExpirationInfo: The explanation message associated // with ApnsCertificationExpiring and ApnsCertificationExpired alerts. type ApnsCertificateExpirationInfo struct { - // AppleId: The Apple ID used for the certificate, may be blank if - // admins did not enter it. + // AppleId: The Apple ID used for the certificate may be blank if admins + // didn't enter it. AppleId string `json:"appleId,omitempty"` // ExpirationTime: The expiration date of the APNS Certificate. @@ -2509,6 +2509,94 @@ func (s *SuspiciousActivitySecurityDetail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TransferError: Details for an invalid transfer or forward. +type TransferError struct { + // Email: User's email address. This may be unavailable if the entity + // was deleted. + Email string `json:"email,omitempty"` + + // EntityType: Type of entity being transferred to. For ring group + // members, this should always be USER. + // + // Possible values: + // "TRANSFER_ENTITY_TYPE_UNSPECIFIED" - Entity type wasn't set. + // "TRANSFER_AUTO_ATTENDANT" - Transfer to auto attendant. + // "TRANSFER_RING_GROUP" - Transfer to ring group. + // "TRANSFER_USER" - Transfer to user. + EntityType string `json:"entityType,omitempty"` + + // Id: Ring group or auto attendant ID. Not set for users. + Id string `json:"id,omitempty"` + + // InvalidReason: Reason for the error. + // + // Possible values: + // "TRANSFER_INVALID_REASON_UNSPECIFIED" - Reason wasn't specified. + // "TRANSFER_TARGET_DELETED" - The transfer target can't be + // found—most likely it was deleted. + // "UNLICENSED" - The user's Google Voice license was removed. + // "SUSPENDED" - The user's Google Workspace account was suspended. + // "NO_PHONE_NUMBER" - The transfer target no longer has a phone + // number. This reason should become deprecated once we support + // numberless transfer. + InvalidReason string `json:"invalidReason,omitempty"` + + // Name: User's full name, or the ring group / auto attendant name. This + // may be unavailable if the entity was deleted. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TransferError) MarshalJSON() ([]byte, error) { + type NoMethod TransferError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TransferMisconfiguration: Error related to transferring or forwarding +// a phone call. +type TransferMisconfiguration struct { + // Errors: Details for each invalid transfer or forward. + Errors []*TransferError `json:"errors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Errors") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TransferMisconfiguration) MarshalJSON() ([]byte, error) { + type NoMethod TransferMisconfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UndeleteAlertRequest: A request to undelete a specific alert that was // marked for deletion. type UndeleteAlertRequest struct { @@ -2633,6 +2721,123 @@ func (s *UserDefinedDetectorInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VoiceMisconfiguration: An alert triggered when Google Voice +// configuration becomes invalid, generally due to an external entity +// being modified or deleted. +type VoiceMisconfiguration struct { + // EntityName: Name of the entity whose configuration is now invalid. + EntityName string `json:"entityName,omitempty"` + + // EntityType: Type of the entity whose configuration is now invalid. + // + // Possible values: + // "ENTITY_TYPE_UNSPECIFIED" - Entity type wasn't set. + // "AUTO_ATTENDANT" - Invalid auto attendant. + // "RING_GROUP" - Invalid ring group. + EntityType string `json:"entityType,omitempty"` + + // FixUri: Link that the admin can follow to fix the issue. + FixUri string `json:"fixUri,omitempty"` + + // MembersMisconfiguration: Issue(s) with members of a ring group. + MembersMisconfiguration *TransferMisconfiguration `json:"membersMisconfiguration,omitempty"` + + // TransferMisconfiguration: Issue(s) with transferring or forwarding to + // an external entity. + TransferMisconfiguration *TransferMisconfiguration `json:"transferMisconfiguration,omitempty"` + + // VoicemailMisconfiguration: Issue(s) with sending to voicemail. + VoicemailMisconfiguration *VoicemailMisconfiguration `json:"voicemailMisconfiguration,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EntityName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EntityName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VoiceMisconfiguration) MarshalJSON() ([]byte, error) { + type NoMethod VoiceMisconfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VoicemailMisconfiguration: Issue(s) with sending to voicemail. +type VoicemailMisconfiguration struct { + // Errors: Issue(s) with voicemail recipients. + Errors []*VoicemailRecipientError `json:"errors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Errors") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VoicemailMisconfiguration) MarshalJSON() ([]byte, error) { + type NoMethod VoicemailMisconfiguration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VoicemailRecipientError: Issue(s) with a voicemail recipient. +type VoicemailRecipientError struct { + // Email: Email address of the invalid recipient. This may be + // unavailable if the recipient was deleted. + Email string `json:"email,omitempty"` + + // InvalidReason: Reason for the error. + // + // Possible values: + // "EMAIL_INVALID_REASON_UNSPECIFIED" - Reason wasn't specified. + // "OUT_OF_QUOTA" - User can't receive emails due to insufficient + // quota. + // "RECIPIENT_DELETED" - All recipients were deleted. + InvalidReason string `json:"invalidReason,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VoicemailRecipientError) MarshalJSON() ([]byte, error) { + type NoMethod VoicemailRecipientError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "alertcenter.alerts.batchDelete": type AlertsBatchDeleteCall struct { diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index b70a81281a2..ca68f5f6889 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -178,7 +178,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234 Set the Property ID to 0 for compatibility checking on dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.", + "description": "A Google Analytics GA4 property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -313,7 +313,7 @@ } } }, - "revision": "20220904", + "revision": "20221210", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index 9501f7e6a44..29b9a3d1377 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -3034,10 +3034,7 @@ type PropertiesCheckCompatibilityCall struct { // are tracked. To learn more, see where to find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // `property` should be the same value as in your `runReport` request. -// Example: properties/1234 Set the Property ID to 0 for compatibility -// checking on dimensions and metrics common to all properties. In -// this special mode, this method will not return custom dimensions -// and metrics. +// Example: properties/1234. func (r *PropertiesService) CheckCompatibility(propertyid string, checkcompatibilityrequest *CheckCompatibilityRequest) *PropertiesCheckCompatibilityCall { c := &PropertiesCheckCompatibilityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.propertyid = propertyid @@ -3145,7 +3142,7 @@ func (c *PropertiesCheckCompatibilityCall) Do(opts ...googleapi.CallOption) (*Ch // ], // "parameters": { // "property": { - // "description": "A Google Analytics GA4 property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234 Set the Property ID to 0 for compatibility checking on dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.", + // "description": "A Google Analytics GA4 property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234", // "location": "path", // "pattern": "^properties/[^/]+$", // "required": true, diff --git a/api-list.json b/api-list.json index 4fea36cac29..23ecaeb6864 100644 --- a/api-list.json +++ b/api-list.json @@ -2787,7 +2787,7 @@ "name": "firebasedatabase", "version": "v1beta", "title": "Firebase Realtime Database API", - "description": "The Firebase Realtime Database Management API enables programmatic provisioning and management of Realtime Database instances.", + "description": "The Firebase Realtime Database API enables programmatic provisioning and management of Realtime Database instances.", "discoveryRestUrl": "https://firebasedatabase.googleapis.com/$discovery/rest?version=v1beta", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -4348,7 +4348,7 @@ "name": "playintegrity", "version": "v1", "title": "Google Play Integrity API", - "description": "Play Integrity", + "description": "The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.", "discoveryRestUrl": "https://playintegrity.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -5974,7 +5974,7 @@ "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, - "documentationLink": "https://g3doc.corp.google.com/company/teams/compute-fe/index.md?cl=head", + "documentationLink": "https://cloud.google.com/workload-manager/docs", "preferred": true }, { diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index d5a0147b1ea..76e59d6ff93 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -483,97 +483,6 @@ } } }, - "nodes": { - "methods": { - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:getIamPolicy", - "httpMethod": "GET", - "id": "batch.projects.locations.nodes.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:setIamPolicy", - "httpMethod": "POST", - "id": "batch.projects.locations.nodes.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:testIamPermissions", - "httpMethod": "POST", - "id": "batch.projects.locations.nodes.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, "operations": { "methods": { "cancel": { @@ -728,104 +637,13 @@ ] } } - }, - "tasks": { - "methods": { - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:getIamPolicy", - "httpMethod": "GET", - "id": "batch.projects.locations.tasks.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:setIamPolicy", - "httpMethod": "POST", - "id": "batch.projects.locations.tasks.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:testIamPermissions", - "httpMethod": "POST", - "id": "batch.projects.locations.tasks.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } } } } }, - "revision": "20221017", + "revision": "20221201", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -911,7 +729,7 @@ "id": "AgentMetadata", "properties": { "creationTime": { - "description": "When the VM agent started.", + "description": "When the VM agent started. Use agent_startup_time instead.", "format": "google-datetime", "type": "string" }, @@ -919,6 +737,10 @@ "description": "Full name of the entity that created this vm. For MIG, this path is: projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The value is retrieved from the vm metadata key of \"created-by\".", "type": "string" }, + "imageVersion": { + "description": "image version for the VM that this agent is installed on.", + "type": "string" + }, "instance": { "description": "GCP instance name (go/instance-name).", "type": "string" @@ -1006,6 +828,28 @@ }, "type": "object" }, + "AgentTimingInfo": { + "description": "VM timing information", + "id": "AgentTimingInfo", + "properties": { + "agentStartupTime": { + "description": "Agent startup time", + "format": "google-datetime", + "type": "string" + }, + "bootTime": { + "description": "Boot timestamp of the VM OS", + "format": "google-datetime", + "type": "string" + }, + "scriptStartupTime": { + "description": "Startup time of the Batch VM script.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "AllocationPolicy": { "description": "A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.", "id": "AllocationPolicy", @@ -1194,11 +1038,11 @@ "type": "string" }, "password": { - "description": "Optional password for logging in to a docker registry. If password matches \"projects/*/secrets/*/versions/*\" then Batch will read the password from the Secret Manager;", + "description": "Optional password for logging in to a docker registry. If password matches `projects/*/secrets/*/versions/*` then Batch will read the password from the Secret Manager;", "type": "string" }, "username": { - "description": "Optional username for logging in to a docker registry. If username matches \"projects/*/secrets/*/versions/*\" then Batch will read the username from the Secret Manager.", + "description": "Optional username for logging in to a docker registry. If username matches `projects/*/secrets/*/versions/*` then Batch will read the username from the Secret Manager.", "type": "string" }, "volumes": { @@ -1786,7 +1630,7 @@ "id": "NetworkInterface", "properties": { "network": { - "description": "The URL of the network resource.", + "description": "The URL of an existing network resource. You can specify the network as a full or partial URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} projects/{project}/global/networks/{network} global/networks/{network}", "type": "string" }, "noExternalIpAddress": { @@ -1794,7 +1638,7 @@ "type": "boolean" }, "subnetwork": { - "description": "The URL of the Subnetwork resource.", + "description": "The URL of an existing subnetwork resource in the network. You can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} projects/{project}/regions/{region}/subnetworks/{subnetwork} regions/{region}/subnetworks/{subnetwork}", "type": "string" } }, @@ -1932,6 +1776,10 @@ "$ref": "AgentInfo", "description": "Agent info." }, + "agentTimingInfo": { + "$ref": "AgentTimingInfo", + "description": "Agent timing info." + }, "metadata": { "$ref": "AgentMetadata", "description": "Agent metadata." @@ -1943,6 +1791,11 @@ "description": "Response to ReportAgentStateRequest.", "id": "ReportAgentStateResponse", "properties": { + "minReportInterval": { + "description": "Minimum report interval override", + "format": "google-duration", + "type": "string" + }, "tasks": { "description": "Tasks assigned to the agent", "items": { @@ -2197,7 +2050,7 @@ "additionalProperties": { "type": "string" }, - "description": "Environment variables to set before running the Task. You can set up to 100 environments.", + "description": "Deprecated: please use environment(non-plural) instead.", "type": "object" }, "lifecyclePolicies": { diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index c029eccf688..a3283398c86 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -152,10 +152,8 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Jobs = NewProjectsLocationsJobsService(s) - rs.Nodes = NewProjectsLocationsNodesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.State = NewProjectsLocationsStateService(s) - rs.Tasks = NewProjectsLocationsTasksService(s) return rs } @@ -164,13 +162,9 @@ type ProjectsLocationsService struct { Jobs *ProjectsLocationsJobsService - Nodes *ProjectsLocationsNodesService - Operations *ProjectsLocationsOperationsService State *ProjectsLocationsStateService - - Tasks *ProjectsLocationsTasksService } func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService { @@ -206,15 +200,6 @@ type ProjectsLocationsJobsTaskGroupsTasksService struct { s *Service } -func NewProjectsLocationsNodesService(s *Service) *ProjectsLocationsNodesService { - rs := &ProjectsLocationsNodesService{s: s} - return rs -} - -type ProjectsLocationsNodesService struct { - s *Service -} - func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -233,15 +218,6 @@ type ProjectsLocationsStateService struct { s *Service } -func NewProjectsLocationsTasksService(s *Service) *ProjectsLocationsTasksService { - rs := &ProjectsLocationsTasksService{s: s} - return rs -} - -type ProjectsLocationsTasksService struct { - s *Service -} - // Accelerator: Accelerator describes Compute Engine accelerators to be // attached to the VM. type Accelerator struct { @@ -360,7 +336,8 @@ func (s *AgentInfo) MarshalJSON() ([]byte, error) { // AgentMetadata: AgentMetadata never changes for a single instance of // VM agent. type AgentMetadata struct { - // CreationTime: When the VM agent started. + // CreationTime: When the VM agent started. Use agent_startup_time + // instead. CreationTime string `json:"creationTime,omitempty"` // Creator: Full name of the entity that created this vm. For MIG, this @@ -369,6 +346,10 @@ type AgentMetadata struct { // value is retrieved from the vm metadata key of "created-by". Creator string `json:"creator,omitempty"` + // ImageVersion: image version for the VM that this agent is installed + // on. + ImageVersion string `json:"imageVersion,omitempty"` + // Instance: GCP instance name (go/instance-name). Instance string `json:"instance,omitempty"` @@ -493,6 +474,41 @@ func (s *AgentTaskInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AgentTimingInfo: VM timing information +type AgentTimingInfo struct { + // AgentStartupTime: Agent startup time + AgentStartupTime string `json:"agentStartupTime,omitempty"` + + // BootTime: Boot timestamp of the VM OS + BootTime string `json:"bootTime,omitempty"` + + // ScriptStartupTime: Startup time of the Batch VM script. + ScriptStartupTime string `json:"scriptStartupTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AgentStartupTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AgentStartupTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AgentTimingInfo) MarshalJSON() ([]byte, error) { + type NoMethod AgentTimingInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AllocationPolicy: A Job's resource allocation policy describes when, // where, and how compute resources should be allocated for the Job. type AllocationPolicy struct { @@ -846,12 +862,12 @@ type Container struct { Options string `json:"options,omitempty"` // Password: Optional password for logging in to a docker registry. If - // password matches "projects/*/secrets/*/versions/*" then Batch will + // password matches `projects/*/secrets/*/versions/*` then Batch will // read the password from the Secret Manager; Password string `json:"password,omitempty"` // Username: Optional username for logging in to a docker registry. If - // username matches "projects/*/secrets/*/versions/*" then Batch will + // username matches `projects/*/secrets/*/versions/*` then Batch will // read the username from the Secret Manager. Username string `json:"username,omitempty"` @@ -1781,7 +1797,12 @@ func (s *NFS) MarshalJSON() ([]byte, error) { // NetworkInterface: A network interface. type NetworkInterface struct { - // Network: The URL of the network resource. + // Network: The URL of an existing network resource. You can specify the + // network as a full or partial URL. For example, the following are all + // valid URLs: + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // projects/{project}/global/networks/{network} + // global/networks/{network} Network string `json:"network,omitempty"` // NoExternalIpAddress: Default is false (with an external IP address). @@ -1793,7 +1814,12 @@ type NetworkInterface struct { // information. NoExternalIpAddress bool `json:"noExternalIpAddress,omitempty"` - // Subnetwork: The URL of the Subnetwork resource. + // Subnetwork: The URL of an existing subnetwork resource in the + // network. You can specify the subnetwork as a full or partial URL. For + // example, the following are all valid URLs: + // https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + // projects/{project}/regions/{region}/subnetworks/{subnetwork} + // regions/{region}/subnetworks/{subnetwork} Subnetwork string `json:"subnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "Network") to @@ -2079,6 +2105,9 @@ type ReportAgentStateRequest struct { // AgentInfo: Agent info. AgentInfo *AgentInfo `json:"agentInfo,omitempty"` + // AgentTimingInfo: Agent timing info. + AgentTimingInfo *AgentTimingInfo `json:"agentTimingInfo,omitempty"` + // Metadata: Agent metadata. Metadata *AgentMetadata `json:"metadata,omitempty"` @@ -2107,6 +2136,9 @@ func (s *ReportAgentStateRequest) MarshalJSON() ([]byte, error) { // ReportAgentStateResponse: Response to ReportAgentStateRequest. type ReportAgentStateResponse struct { + // MinReportInterval: Minimum report interval override + MinReportInterval string `json:"minReportInterval,omitempty"` + // Tasks: Tasks assigned to the agent Tasks []*AgentTask `json:"tasks,omitempty"` @@ -2114,20 +2146,21 @@ type ReportAgentStateResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Tasks") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "MinReportInterval") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Tasks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "MinReportInterval") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -2558,8 +2591,7 @@ type TaskSpec struct { // Environment: Environment variables to set before running the Task. Environment *Environment `json:"environment,omitempty"` - // Environments: Environment variables to set before running the Task. - // You can set up to 100 environments. + // Environments: Deprecated: please use environment(non-plural) instead. Environments map[string]string `json:"environments,omitempty"` // LifecyclePolicies: Lifecycle management schema when any task in a @@ -4656,118 +4688,97 @@ func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Pages(ctx context.Context } } -// method id "batch.projects.locations.nodes.getIamPolicy": +// method id "batch.projects.locations.operations.cancel": -type ProjectsLocationsNodesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsNodesService) GetIamPolicy(resource string) *ProjectsLocationsNodesGetIamPolicyCall { - c := &ProjectsLocationsNodesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsNodesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNodesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNodesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesGetIamPolicyCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsNodesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNodesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNodesGetIamPolicyCall { +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNodesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNodesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "batch.projects.locations.nodes.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// Do executes the "batch.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) +// *Empty.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsNodesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4786,7 +4797,7 @@ func (c *ProjectsLocationsNodesGetIamPolicyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4798,31 +4809,28 @@ func (c *ProjectsLocationsNodesGetIamPolicyCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "batch.projects.locations.nodes.getIamPolicy", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "batch.projects.locations.operations.cancel", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4831,36 +4839,32 @@ func (c *ProjectsLocationsNodesGetIamPolicyCall) Do(opts ...googleapi.CallOption } -// method id "batch.projects.locations.nodes.setIamPolicy": +// method id "batch.projects.locations.operations.delete": -type ProjectsLocationsNodesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsNodesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsNodesSetIamPolicyCall { - c := &ProjectsLocationsNodesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNodesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesSetIamPolicyCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4868,21 +4872,21 @@ func (c *ProjectsLocationsNodesSetIamPolicyCall) Fields(s ...googleapi.Field) *P // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNodesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNodesSetIamPolicyCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsNodesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNodesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4890,34 +4894,29 @@ func (c *ProjectsLocationsNodesSetIamPolicyCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "batch.projects.locations.nodes.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// Do executes the "batch.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) +// *Empty.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsNodesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4936,7 +4935,7 @@ func (c *ProjectsLocationsNodesSetIamPolicyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4948,28 +4947,25 @@ func (c *ProjectsLocationsNodesSetIamPolicyCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "batch.projects.locations.nodes.setIamPolicy", + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "batch.projects.locations.operations.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4978,993 +4974,32 @@ func (c *ProjectsLocationsNodesSetIamPolicyCall) Do(opts ...googleapi.CallOption } -// method id "batch.projects.locations.nodes.testIamPermissions": +// method id "batch.projects.locations.operations.get": -type ProjectsLocationsNodesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. -// -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsNodesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsNodesTestIamPermissionsCall { - c := &ProjectsLocationsNodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsNodesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsNodesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNodesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsNodesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "batch.projects.locations.nodes.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.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 *ProjectsLocationsNodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "batch.projects.locations.nodes.testIamPermissions", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "batch.projects.locations.operations.cancel": - -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "batch.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, 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 := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "batch.projects.locations.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "batch.projects.locations.operations.delete": - -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. -// -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "batch.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, 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 := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "batch.projects.locations.operations.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "batch.projects.locations.operations.get": - -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "batch.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "batch.projects.locations.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "batch.projects.locations.operations.list": - -type ProjectsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. -// -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "batch.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, 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 := &ListOperationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "batch.projects.locations.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}/operations", - // "response": { - // "$ref": "ListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "batch.projects.locations.state.report": - -type ProjectsLocationsStateReportCall struct { - s *Service - parent string - reportagentstaterequest *ReportAgentStateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Report: Report agent's state, e.g. agent status and tasks information -// -// - parent: Format: projects/{project}/locations/{location} {project} -// should be a project number. -func (r *ProjectsLocationsStateService) Report(parent string, reportagentstaterequest *ReportAgentStateRequest) *ProjectsLocationsStateReportCall { - c := &ProjectsLocationsStateReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.reportagentstaterequest = reportagentstaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsStateReportCall) Fields(s ...googleapi.Field) *ProjectsLocationsStateReportCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsStateReportCall) Context(ctx context.Context) *ProjectsLocationsStateReportCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsStateReportCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsStateReportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportagentstaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/state:report") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "batch.projects.locations.state.report" call. -// Exactly one of *ReportAgentStateResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ReportAgentStateResponse.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 *ProjectsLocationsStateReportCall) Do(opts ...googleapi.CallOption) (*ReportAgentStateResponse, 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 := &ReportAgentStateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Report agent's state, e.g. agent status and tasks information", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/state:report", - // "httpMethod": "POST", - // "id": "batch.projects.locations.state.report", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. Format: projects/{project}/locations/{location} {project} should be a project number.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/state:report", - // "request": { - // "$ref": "ReportAgentStateRequest" - // }, - // "response": { - // "$ref": "ReportAgentStateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "batch.projects.locations.tasks.getIamPolicy": - -type ProjectsLocationsTasksGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsTasksService) GetIamPolicy(resource string) *ProjectsLocationsTasksGetIamPolicyCall { - c := &ProjectsLocationsTasksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsTasksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsTasksGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsTasksGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTasksGetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5974,7 +5009,7 @@ func (c *ProjectsLocationsTasksGetIamPolicyCall) Fields(s ...googleapi.Field) *P // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsTasksGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsTasksGetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5982,21 +5017,21 @@ func (c *ProjectsLocationsTasksGetIamPolicyCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsTasksGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTasksGetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsTasksGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsTasksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6009,7 +5044,7 @@ func (c *ProjectsLocationsTasksGetIamPolicyCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6017,19 +5052,19 @@ func (c *ProjectsLocationsTasksGetIamPolicyCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "batch.projects.locations.tasks.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsLocationsTasksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "batch.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6048,7 +5083,7 @@ func (c *ProjectsLocationsTasksGetIamPolicyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6060,31 +5095,25 @@ func (c *ProjectsLocationsTasksGetIamPolicyCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:getIamPolicy", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "batch.projects.locations.tasks.getIamPolicy", + // "id": "batch.projects.locations.operations.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6093,93 +5122,125 @@ func (c *ProjectsLocationsTasksGetIamPolicyCall) Do(opts ...googleapi.CallOption } -// method id "batch.projects.locations.tasks.setIamPolicy": +// method id "batch.projects.locations.operations.list": -type ProjectsLocationsTasksSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsTasksService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTasksSetIamPolicyCall { - c := &ProjectsLocationsTasksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsTasksSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTasksSetIamPolicyCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsTasksSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTasksSetIamPolicyCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsTasksSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsTasksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "batch.projects.locations.tasks.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsLocationsTasksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "batch.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6198,7 +5259,7 @@ func (c *ProjectsLocationsTasksSetIamPolicyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6210,28 +5271,41 @@ func (c *ProjectsLocationsTasksSetIamPolicyCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "batch.projects.locations.tasks.setIamPolicy", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "batch.projects.locations.operations.list", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+name}/operations", // "response": { - // "$ref": "Policy" + // "$ref": "ListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6240,39 +5314,53 @@ func (c *ProjectsLocationsTasksSetIamPolicyCall) Do(opts ...googleapi.CallOption } -// method id "batch.projects.locations.tasks.testIamPermissions": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsTasksTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "batch.projects.locations.state.report": + +type ProjectsLocationsStateReportCall struct { + s *Service + parent string + reportagentstaterequest *ReportAgentStateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Report: Report agent's state, e.g. agent status and tasks information // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsTasksService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTasksTestIamPermissionsCall { - c := &ProjectsLocationsTasksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - parent: Format: projects/{project}/locations/{location} {project} +// should be a project number. +func (r *ProjectsLocationsStateService) Report(parent string, reportagentstaterequest *ReportAgentStateRequest) *ProjectsLocationsStateReportCall { + c := &ProjectsLocationsStateReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.reportagentstaterequest = reportagentstaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsTasksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTasksTestIamPermissionsCall { +func (c *ProjectsLocationsStateReportCall) Fields(s ...googleapi.Field) *ProjectsLocationsStateReportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6280,21 +5368,21 @@ func (c *ProjectsLocationsTasksTestIamPermissionsCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsTasksTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTasksTestIamPermissionsCall { +func (c *ProjectsLocationsStateReportCall) Context(ctx context.Context) *ProjectsLocationsStateReportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsTasksTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsStateReportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsTasksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsStateReportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6302,14 +5390,14 @@ func (c *ProjectsLocationsTasksTestIamPermissionsCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportagentstaterequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/state:report") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6317,19 +5405,19 @@ func (c *ProjectsLocationsTasksTestIamPermissionsCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "batch.projects.locations.tasks.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Do executes the "batch.projects.locations.state.report" call. +// Exactly one of *ReportAgentStateResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *ReportAgentStateResponse.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 *ProjectsLocationsTasksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsStateReportCall) Do(opts ...googleapi.CallOption) (*ReportAgentStateResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6348,7 +5436,7 @@ func (c *ProjectsLocationsTasksTestIamPermissionsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &ReportAgentStateResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6360,28 +5448,28 @@ func (c *ProjectsLocationsTasksTestIamPermissionsCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:testIamPermissions", + // "description": "Report agent's state, e.g. agent status and tasks information", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/state:report", // "httpMethod": "POST", - // "id": "batch.projects.locations.tasks.testIamPermissions", + // "id": "batch.projects.locations.state.report", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "parent": { + // "description": "Required. Format: projects/{project}/locations/{location} {project} should be a project number.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", + // "path": "v1/{+parent}/state:report", // "request": { - // "$ref": "TestIamPermissionsRequest" + // "$ref": "ReportAgentStateRequest" // }, // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "ReportAgentStateResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index fb937466eaa..4c233fe1a45 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1710,7 +1710,7 @@ } } }, - "revision": "20221028", + "revision": "20221127", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -4922,7 +4922,7 @@ "type": "string" }, "routines": { - "description": "Routines in the requested dataset. Unless read_mask is set in the request, only the following fields are populated: etag, project_id, dataset_id, routine_id, routine_type, creation_time, last_modified_time, and language.", + "description": "Routines in the requested dataset. Unless read_mask is set in the request, only the following fields are populated: etag, project_id, dataset_id, routine_id, routine_type, creation_time, last_modified_time, language, and remote_function_options.", "items": { "$ref": "Routine" }, @@ -4963,6 +4963,10 @@ "MaterializedViewDefinition": { "id": "MaterializedViewDefinition", "properties": { + "allow_non_incremental_definition": { + "description": "[Optional] Allow non incremental materialized view definition. The default value is \"false\".", + "type": "boolean" + }, "enableRefresh": { "description": "[Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is \"true\".", "type": "boolean" @@ -5816,7 +5820,7 @@ "type": "array" }, "language": { - "description": "Optional. Defaults to \"SQL\".", + "description": "Optional. Defaults to \"SQL\" if remote_function_options field is absent, not set otherwise.", "enum": [ "LANGUAGE_UNSPECIFIED", "SQL", @@ -5843,7 +5847,7 @@ }, "returnTableType": { "$ref": "StandardSqlTableType", - "description": "Optional. Can be set only if routine_type = \"TABLE_VALUED_FUNCTION\". If absent, the return table type is inferred from definition_body at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time." + "description": "Optional. Can be set only if routine_type = \"TABLE_VALUED_FUNCTION\". If absent, the return table type is inferred from definition_body at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specified in return table type, at query time." }, "returnType": { "$ref": "StandardSqlDataType", diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 507ceb9d936..f3499e5c4b2 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -5544,7 +5544,7 @@ type ListRoutinesResponse struct { // Routines: Routines in the requested dataset. Unless read_mask is set // in the request, only the following fields are populated: etag, // project_id, dataset_id, routine_id, routine_type, creation_time, - // last_modified_time, and language. + // last_modified_time, language, and remote_function_options. Routines []*Routine `json:"routines,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -5644,6 +5644,10 @@ func (s *LocationMetadata) MarshalJSON() ([]byte, error) { } type MaterializedViewDefinition struct { + // AllowNonIncrementalDefinition: [Optional] Allow non incremental + // materialized view definition. The default value is "false". + AllowNonIncrementalDefinition bool `json:"allow_non_incremental_definition,omitempty"` + // EnableRefresh: [Optional] [TrustedTester] Enable automatic refresh of // the materialized view when the base table is updated. The default // value is "true". @@ -5666,20 +5670,22 @@ type MaterializedViewDefinition struct { // is "1800000" (30 minutes). RefreshIntervalMs int64 `json:"refreshIntervalMs,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EnableRefresh") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AllowNonIncrementalDefinition") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableRefresh") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "AllowNonIncrementalDefinition") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -7031,7 +7037,8 @@ type Routine struct { // stores the path of the imported JAVASCRIPT libraries. ImportedLibraries []string `json:"importedLibraries,omitempty"` - // Language: Optional. Defaults to "SQL". + // Language: Optional. Defaults to "SQL" if remote_function_options + // field is absent, not set otherwise. // // Possible values: // "LANGUAGE_UNSPECIFIED" @@ -7051,7 +7058,7 @@ type Routine struct { // "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred // from definition_body at query time in each query that references this // routine. If present, then the columns in the evaluated table result - // will be cast to match the column types specificed in return table + // will be cast to match the column types specified in return table // type, at query time. ReturnTableType *StandardSqlTableType `json:"returnTableType,omitempty"` diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index aadfadd5c5f..edcd61bf295 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -13,6 +13,12 @@ }, "https://www.googleapis.com/auth/chat.messages.readonly": { "description": "View messages and reactions in Google Chat" + }, + "https://www.googleapis.com/auth/chat.spaces": { + "description": "Create conversations and spaces and view or update metadata (including history settings) in Google Chat" + }, + "https://www.googleapis.com/auth/chat.spaces.readonly": { + "description": "View chat and spaces in Google Chat" } } } @@ -517,7 +523,11 @@ "path": "v1/{+name}", "response": { "$ref": "Space" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] }, "list": { "description": "Lists spaces the caller is a member of. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.", @@ -541,7 +551,11 @@ "path": "v1/spaces", "response": { "$ref": "ListSpacesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] }, "webhooks": { "description": "Legacy path for creating message. Calling these will result in a BadRequest response.", @@ -668,7 +682,7 @@ "messages": { "methods": { "create": { - "description": "Creates a message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope.", + "description": "Creates a message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Because Chat provides authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages without a service account or user authentication.", "flatPath": "v1/spaces/{spacesId}/messages", "httpMethod": "POST", "id": "chat.spaces.messages.create", @@ -888,7 +902,7 @@ } } }, - "revision": "20221204", + "revision": "20221208", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 22da5dd6b29..538a893d0c0 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -25,7 +25,7 @@ // // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: // -// chatService, err := chat.NewService(ctx, option.WithScopes(chat.ChatMessagesReadonlyScope)) +// chatService, err := chat.NewService(ctx, option.WithScopes(chat.ChatSpacesReadonlyScope)) // // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: // @@ -96,6 +96,13 @@ const ( // View messages and reactions in Google Chat ChatMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.messages.readonly" + + // Create conversations and spaces and view or update metadata + // (including history settings) in Google Chat + ChatSpacesScope = "https://www.googleapis.com/auth/chat.spaces" + + // View chat and spaces in Google Chat + ChatSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.spaces.readonly" ) // NewService creates a new Service. @@ -105,6 +112,8 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/chat.messages", "https://www.googleapis.com/auth/chat.messages.create", "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly", ) // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) @@ -5825,7 +5834,11 @@ func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) { // "path": "v1/{+name}", // "response": { // "$ref": "Space" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] // } } @@ -5995,7 +6008,11 @@ func (c *SpacesListCall) Do(opts ...googleapi.CallOption) (*ListSpacesResponse, // "path": "v1/spaces", // "response": { // "$ref": "ListSpacesResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] // } } @@ -6641,6 +6658,10 @@ type SpacesMessagesCreateCall struct { // access to certain features. User authentication // (https://developers.google.com/chat/api/guides/auth/users) requires // the `chat.messages` or `chat.messages.create` authorization scope. +// Because Chat provides authentication for webhooks +// (https://developers.google.com/chat/how-tos/webhooks) as part of the +// URL that's generated when a webhook is registered, webhooks can +// create messages without a service account or user authentication. // // - parent: The resource name of the space in which to create a // message. Format: spaces/{space}. @@ -6794,7 +6815,7 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e } return ret, nil // { - // "description": "Creates a message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope.", + // "description": "Creates a message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Because Chat provides authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages without a service account or user authentication.", // "flatPath": "v1/spaces/{spacesId}/messages", // "httpMethod": "POST", // "id": "chat.spaces.messages.create", diff --git a/cloudbilling/v1beta/cloudbilling-api.json b/cloudbilling/v1beta/cloudbilling-api.json index f1e5f9eb99c..3cdd412f5d1 100644 --- a/cloudbilling/v1beta/cloudbilling-api.json +++ b/cloudbilling/v1beta/cloudbilling-api.json @@ -170,9 +170,256 @@ } } }, - "revision": "20220914", + "revision": "20221206", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { + "CacheFillRegions": { + "description": "Specifies the regions for Cache Fill.", + "id": "CacheFillRegions", + "properties": { + "destinationRegion": { + "description": "The destination region for cache fill.", + "enum": [ + "CACHE_FILL_DESTINATION_REGION_UNSPECIFIED", + "CACHE_FILL_DESTINATION_REGION_ASIA_PACIFIC", + "CACHE_FILL_DESTINATION_REGION_EUROPE", + "CACHE_FILL_DESTINATION_REGION_NORTH_AMERICA", + "CACHE_FILL_DESTINATION_REGION_OCEANIA", + "CACHE_FILL_DESTINATION_REGION_SOUTH_AMERICA", + "CACHE_FILL_DESTINATION_REGION_CHINA", + "CACHE_FILL_DESTINATION_REGION_OTHERS" + ], + "enumDescriptions": [ + "Not specified.", + "Asia Pacific.", + "Europe", + "North America.", + "Oceania.", + "South America.", + "China.", + "Others." + ], + "type": "string" + }, + "sourceRegion": { + "description": "The source region for cache fill.", + "enum": [ + "CACHE_FILL_SOURCE_REGION_UNSPECIFIED", + "CACHE_FILL_REGION_ASIA_PACIFIC", + "CACHE_FILL_SOURCE_REGION_EUROPE", + "CACHE_FILL_SOURCE_REGION_NORTH_AMERICA", + "CACHE_FILL_SOURCE_REGION_OCEANIA", + "CACHE_FILL_SOURCE_REGION_SOUTH_AMERICA" + ], + "enumDescriptions": [ + "Not specified.", + "Asia Pacific.", + "Europe", + "North America.", + "Oceania.", + "South America." + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudCdnEgressWorkload": { + "description": "Specifies usage for Cloud CDN egress.", + "id": "CloudCdnEgressWorkload", + "properties": { + "cacheEgressDestination": { + "description": "The destination for the cache egress charges.", + "enum": [ + "CACHE_EGRESS_DESTINATION_UNSPECIFIED", + "CACHE_EGRESS_DESTINATION_ASIA_PACIFIC", + "CACHE_EGRESS_DESTINATION_CHINA", + "CACHE_EGRESS_DESTINATION_EUROPE", + "CACHE_EGRESS_DESTINATION_NORTH_AMERICA", + "CACHE_EGRESS_DESTINATION_OCEANIA", + "CACHE_EGRESS_DESTINATION_LATIN_AMERICA", + "CACHE_EGRESS_DESTINATION_OTHER_DESTINATIONS" + ], + "enumDescriptions": [ + "Unspecified.", + "Asia Pacific.", + "China.", + "Europe.", + "North America.", + "Oceania including Australia, New Zealand, and surrounding Pacific Ocean islands such as Papua New Guinea and Fiji. This region excludes Hawaii.", + "Latin America (Including the Caribbean, South America and Central America.)", + "All other destinations (including Africa and Antarctica)" + ], + "type": "string" + }, + "cacheEgressRate": { + "$ref": "Usage", + "description": "Cache egress usage. The rate of data cache egressed in the destination. For example : units such as \"GiBy/s\" or \"TBy/mo\"." + } + }, + "type": "object" + }, + "CloudCdnWorkload": { + "description": "Specifies usage for Cloud CDN resources.", + "id": "CloudCdnWorkload", + "properties": { + "cacheFillOriginService": { + "description": "The source service for the cache fill.", + "enum": [ + "CACHE_FILL_ORIGIN_SERVICE_UNSPECIFIED", + "CACHE_FILL_ORIGIN_SERVICE_GOOGLE_CLOUD_STORAGE_BUCKET", + "CACHE_FILL_ORIGIN_SERVICE_BACKEND_SERVICE" + ], + "enumDescriptions": [ + "Not specified.", + "Origin service is Google Cloud Storage.", + "Origin service is backend service, such as Compute VMs, external backend, etc." + ], + "type": "string" + }, + "cacheFillRate": { + "$ref": "Usage", + "description": "Cache fill usage. The rate of data transferred between cache fill regions. For example: units such as \"GiBy/s\" or \"TBy/mo\"." + }, + "cacheFillRegions": { + "$ref": "CacheFillRegions", + "description": "The regions where data is transferred from Google data locations into Google global cache servers. The SKU prices for cache fill across services are the same." + }, + "cacheLookUpRate": { + "$ref": "Usage", + "description": "Cache look up requests. This is specified to indicate the number of requests. For example: units such as \"1/s\"." + } + }, + "type": "object" + }, + "CloudInterconnectEgressWorkload": { + "description": "The interconnect egress only includes the Interconnect Egress. Please use the standard egress traffic interface to specify your standard egress usage.", + "id": "CloudInterconnectEgressWorkload", + "properties": { + "egressRate": { + "$ref": "Usage", + "description": "Data egress usage. This usage applies when you move or copy data from one Google Cloud service to another service. Expected units such as \"GiBy/s, By/s, etc.\"" + }, + "interconnectConnectionLocation": { + "description": "Locations in the [Interconnect connection location table](https://cloud.google.com/vpc/network-pricing#interconnect-pricing). This is the interconnect egress charges.", + "enum": [ + "INTERCONNECT_CONNECTION_LOCATION_UNSPECIFIED", + "INTERCONNECT_CONNECTION_LOCATION_ASIA", + "INTERCONNECT_CONNECTION_LOCATION_EUROPE", + "INTERCONNECT_CONNECTION_LOCATION_NORTH_AMERICA", + "INTERCONNECT_CONNECTION_LOCATION_SOUTH_AMERICA", + "INTERCONNECT_CONNECTION_LOCATION_AUSTRALIA" + ], + "enumDescriptions": [ + "Unspecified.", + "Asia.", + "Europe.", + "North America.", + "South America.", + "Australia." + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudInterconnectWorkload": { + "description": "Specifies usage for Cloud Interconnect resources.", + "id": "CloudInterconnectWorkload", + "properties": { + "interconnectAttachments": { + "description": "VLAN attachment used for interconnect.", + "items": { + "$ref": "VlanAttachment" + }, + "type": "array" + }, + "interconnectType": { + "description": "Vlan attachment type.", + "enum": [ + "INTERCONNECT_TYPE_UNSPECIFIED", + "INTERCONNECT_TYPE_DEDICATED", + "INTERCONNECT_TYPE_PARTNER" + ], + "enumDescriptions": [ + "Unspecified.", + "Type is dedicated.", + "Type is partner." + ], + "type": "string" + }, + "linkType": { + "description": "Interconnect circuit link type.", + "enum": [ + "LINK_TYPE_UNSPECIFIED", + "LINK_TYPE_ETHERNET_10G_LR", + "LINK_TYPE_ETHERNET_100G_LR" + ], + "enumDescriptions": [ + "Unspecified.", + "Link type is 10 gbps.", + "Link type is 100 gbps." + ], + "type": "string" + }, + "provisionedLinkCount": { + "$ref": "Usage", + "description": "Interconnect usage. This is specified as a unitless quantity which indicates the number of circuit provisioned in interconnect." + } + }, + "type": "object" + }, + "CloudStorageEgressWorkload": { + "description": "Specification of a network type. Network egress within Google Cloud applies when you move or copy data from one Cloud Storage bucket to another or when another Google Cloud service accesses data in your Cloud Storage bucket.This includes the network egress within Google Cloud and the general network usage.", + "id": "CloudStorageEgressWorkload", + "properties": { + "destinationContinent": { + "description": "Where the data is sent to.", + "enum": [ + "DESTINATION_CONTINENT_UNSPECIFIED", + "DESTINATION_CONTINENT_ASIA_PACIFIC", + "DESTINATION_CONTINENT_AUTRALIA", + "DESTINATION_CONTINENT_EUROPE", + "DESTINATION_CONTINENT_NORTH_AMERICA", + "DESTINATION_CONTINENT_SOUTH_AMERICA" + ], + "enumDescriptions": [ + "Not specified.", + "Asia Pacific.", + "Australia.", + "Europe.", + "North America.", + "South America" + ], + "type": "string" + }, + "egressRate": { + "$ref": "Usage", + "description": "Egress usage rate. This usage applies when you move or copy data from one Cloud Storage bucket to another or when another Google Cloud service accesses data in your Cloud Storage bucket. Expected units such as \"GiBy/s, By/s, ...\"" + }, + "sourceContinent": { + "description": "Where the data comes from.", + "enum": [ + "SOURCE_CONTINENT_UNSPECIFIED", + "SOURCE_CONTINENT_ASIA_PACIFIC", + "SOURCE_CONTINENT_AUSTRALIA", + "SOURCE_CONTINENT_EUROPE", + "SOURCE_CONTINENT_NORTH_AMERICA", + "SOURCE_CONTINENT_SOUTH_AMERICA" + ], + "enumDescriptions": [ + "Not specified.", + "Asia Pacific.", + "Australia.", + "Europe.", + "North America.", + "South America." + ], + "type": "string" + } + }, + "type": "object" + }, "CloudStorageWorkload": { "description": "Specifies usage of Cloud Storage resources.", "id": "CloudStorageWorkload", @@ -217,7 +464,7 @@ "id": "Commitment", "properties": { "name": { - "description": "Required. A name for this commitment. All commitments in a CostScenario must have unique names. Each name must be a maximum of 32 characters.", + "description": "Required. A name for this commitment. All commitments in a CostScenario must have unique names. Each name may be at most 128 characters long.", "type": "string" }, "vmResourceBasedCud": { @@ -578,6 +825,55 @@ }, "type": "object" }, + "PremiumTierEgressWorkload": { + "description": "Specify Premium Tier Internet egress networking.", + "id": "PremiumTierEgressWorkload", + "properties": { + "destinationContinent": { + "description": "Where the data is sent to.", + "enum": [ + "DESTINATION_CONTINENT_UNSPECIFIED", + "DESTINATION_CONTINENT_ASIA_PACIFIC", + "DESTINATION_CONTINENT_AFRICA", + "DESTINATION_CONTINENT_NORTH_AMERICA", + "DESTINATION_CONTINENT_AUTRALIA", + "DESTINATION_CONTINENT_CENTRAL_AMERICA", + "DESTINATION_CONTINENT_CHINA", + "DESTINATION_CONTINENT_EASTERN_EUROPE", + "DESTINATION_CONTINENT_WESTERN_EUROPE", + "DESTINATION_CONTINENT_EMEA", + "DESTINATION_CONTINENT_INDIA", + "DESTINATION_CONTINENT_MIDDLE_EAST", + "DESTINATION_CONTINENT_SOUTH_AMERICA" + ], + "enumDescriptions": [ + "Not specified.", + "Asia Pacific.", + "Africa.", + "North America.", + "Australia.", + "Central America.", + "China.", + "Eastern Europe.", + "Western Europe.", + "Other regions in Europe, Middle East and Africa.", + "India", + "Middle East.", + "South America." + ], + "type": "string" + }, + "egressRate": { + "$ref": "Usage", + "description": "Premium Tier egress usage. Expected units such as \"GiBy/s, By/s, etc.\"" + }, + "sourceRegion": { + "description": "Which [region](https://cloud.google.com/compute/docs/regions-zones) the egress data comes from.", + "type": "string" + } + }, + "type": "object" + }, "Price": { "description": "The price of a SKU at a point int time.", "id": "Price", @@ -652,7 +948,7 @@ "id": "ScenarioConfig", "properties": { "estimateDuration": { - "description": "Time frame for the estimate. Workloads must specify usage for this duration. Duration must be at least 1 hour (3,600 seconds) and at most 10 years (315,360,000 seconds). The calculations for years and months are based on a 730-hour (2,628,000-second) month.", + "description": "Time frame for the estimate. Workloads must specify usage for this duration. Duration must be at least 1 hour (3,600 seconds) and at most 10 years (315,360,000 seconds). The calculations for years and months are based on a 730-hour (2,628,000-second) month. For durations longer than one month (2,628,000 seconds), the duration is rounded up to the next month, so the estimate shows you the costs for full months. For example, a duration of 3,232,800 seconds (roughly 5 weeks) is rounded up to 2 months.", "format": "google-duration", "type": "string" } @@ -734,6 +1030,21 @@ }, "type": "object" }, + "StandardTierEgressWorkload": { + "description": "Specify Standard Tier Internet egress networking.", + "id": "StandardTierEgressWorkload", + "properties": { + "egressRate": { + "$ref": "Usage", + "description": "Standard tier egress usage. Expected units such as \"GiBy/s, By/s, etc.\"" + }, + "sourceRegion": { + "description": "Which [region](https://cloud.google.com/compute/docs/regions-zones) the egress data comes from.", + "type": "string" + } + }, + "type": "object" + }, "Usage": { "description": "An amount of usage over a time frame.", "id": "Usage", @@ -750,7 +1061,7 @@ "id": "UsageRateTimeline", "properties": { "unit": { - "description": "The unit for the usage rate in each timeline entry. The supported units are a subset of [The Unified Code for Units of Measure](https://ucum.org/ucum.html) standard: * **Time units (TIME-UNIT)** * `s` second * `min` minute * `h` hour * `d` day * `wk` week * `mo` month * `yr` year * `ms` millisecond * `us` microsecond * `ns` nanosecond * **Basic storage units (BASIC-STORAGE-UNIT)** * `bit` bit * `By` byte * **Count units (COUNT-UNIT)** * `count` count * **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For example: `kBy/{email}` or `MiBy/10ms`. * `.` multiplication or composition (as an infix operator). For example: `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: ``` Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; UNIT = TIME-UNIT | STORAGE-UNIT | DATA-UNIT | COUNT-UNIT Annotation = \"{\" NAME \"}\" ; ``` Examples: * Request per second: `1/s` or `{requests}/s` * GibiBytes: `GiBy` * GibiBytes * seconds: `GiBy.s`", + "description": "The unit for the usage rate in each timeline entry. If you provide an incorrect unit for an instance, the correct unit is provided in the error message. The supported units are a subset of [The Unified Code for Units of Measure](https://ucum.org/ucum.html) standard: * **Time units (TIME-UNIT)** * `s` second * `min` minute * `h` hour * `d` day * `wk` week * `mo` month * `yr` year * `ms` millisecond * `us` microsecond * `ns` nanosecond * **Basic storage units (BASIC-STORAGE-UNIT)** * `bit` bit * `By` byte * **Count units (COUNT-UNIT)** * `count` count * **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For example: `kBy/{email}` or `MiBy/10ms`. * `.` multiplication or composition (as an infix operator). For example: `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: ``` Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; UNIT = TIME-UNIT | STORAGE-UNIT | DATA-UNIT | COUNT-UNIT Annotation = \"{\" NAME \"}\" ; ``` Examples: * Request per second: `1/s` or `{requests}/s` * GibiBytes: `GiBy` * GibiBytes * seconds: `GiBy.s`", "type": "string" }, "usageRateTimelineEntries": { @@ -779,6 +1090,51 @@ }, "type": "object" }, + "VlanAttachment": { + "description": "VLAN attachment for cloud interconnect.", + "id": "VlanAttachment", + "properties": { + "bandwidth": { + "description": "Capacities in the [pricing table](https://cloud.google.com/vpc/network-pricing#interconnect-pricing) Examples of capacity are: 50/100/200/300/400/500-Mbps, 1/2/5/10/20/50-Gbps.", + "enum": [ + "BANDWIDTH_UNSPECIFIED", + "BANDWIDTH_BPS_50M", + "BANDWIDTH_BPS_100M", + "BANDWIDTH_BPS_200M", + "BANDWIDTH_BPS_300M", + "BANDWIDTH_BPS_400M", + "BANDWIDTH_BPS_500M", + "BANDWIDTH_BPS_1G", + "BANDWIDTH_BPS_2G", + "BANDWIDTH_BPS_5G", + "BANDWIDTH_BPS_10G", + "BANDWIDTH_BPS_20G", + "BANDWIDTH_BPS_50G" + ], + "enumDescriptions": [ + "Unspecified.", + "50 Mbit/s", + "100 Mbit/s", + "200 Mbit/s", + "300 Mbit/s", + "400 Mbit/s", + "500 Mbit/s", + "1 Gbit/s", + "2 Gbit/s", + "5 Gbit/s", + "10 Gbit/s", + "20 Gbit/s", + "50 Gbit/s" + ], + "type": "string" + }, + "vlanCount": { + "$ref": "Usage", + "description": "VLAN usage. This is specified as a unitless quantity which indicates the number of VLAN attachment used in interconnect." + } + }, + "type": "object" + }, "VmResourceBasedCud": { "description": "Specifies a resource-based committed use discount (CUD).", "id": "VmResourceBasedCud", @@ -826,6 +1182,26 @@ "description": "Specifies usage on a single Google Cloud product over a time frame. Each Google Cloud product has its own message, containing specific product configuration parameters of the product usage amounts along each dimension in which the product is billed.", "id": "Workload", "properties": { + "cloudCdnEgressWorkload": { + "$ref": "CloudCdnEgressWorkload", + "description": "Usage on Google Cloud CDN Egress." + }, + "cloudCdnWorkload": { + "$ref": "CloudCdnWorkload", + "description": "Usage on Google Cloud CDN." + }, + "cloudInterconnectEgressWorkload": { + "$ref": "CloudInterconnectEgressWorkload", + "description": "Usage on Google Cloud Interconnect Egress." + }, + "cloudInterconnectWorkload": { + "$ref": "CloudInterconnectWorkload", + "description": "Usage on Google Cloud Interconnect." + }, + "cloudStorageEgressWorkload": { + "$ref": "CloudStorageEgressWorkload", + "description": "Usage on a cloud storage egress." + }, "cloudStorageWorkload": { "$ref": "CloudStorageWorkload", "description": "Usage on Google Cloud Storage." @@ -835,8 +1211,16 @@ "description": "Usage of a Google Compute Engine Virtual Machine." }, "name": { - "description": "Required. A name for this workload. All workloads in a `CostScenario` must have a unique `name`. Each `name` must be a maximum of 32 characters.", + "description": "Required. A name for this workload. All workloads in a `CostScenario` must have a unique `name`. Each `name` may be at most 128 characters long.", "type": "string" + }, + "premiumTierEgressWorkload": { + "$ref": "PremiumTierEgressWorkload", + "description": "Usage on Premium Tier Internet Egress." + }, + "standardTierEgressWorkload": { + "$ref": "StandardTierEgressWorkload", + "description": "Usage on Standard Tier Internet Egress." } }, "type": "object" diff --git a/cloudbilling/v1beta/cloudbilling-gen.go b/cloudbilling/v1beta/cloudbilling-gen.go index 51505b6aa04..6a276cef0e7 100644 --- a/cloudbilling/v1beta/cloudbilling-gen.go +++ b/cloudbilling/v1beta/cloudbilling-gen.go @@ -170,6 +170,311 @@ type V1betaService struct { s *Service } +// CacheFillRegions: Specifies the regions for Cache Fill. +type CacheFillRegions struct { + // DestinationRegion: The destination region for cache fill. + // + // Possible values: + // "CACHE_FILL_DESTINATION_REGION_UNSPECIFIED" - Not specified. + // "CACHE_FILL_DESTINATION_REGION_ASIA_PACIFIC" - Asia Pacific. + // "CACHE_FILL_DESTINATION_REGION_EUROPE" - Europe + // "CACHE_FILL_DESTINATION_REGION_NORTH_AMERICA" - North America. + // "CACHE_FILL_DESTINATION_REGION_OCEANIA" - Oceania. + // "CACHE_FILL_DESTINATION_REGION_SOUTH_AMERICA" - South America. + // "CACHE_FILL_DESTINATION_REGION_CHINA" - China. + // "CACHE_FILL_DESTINATION_REGION_OTHERS" - Others. + DestinationRegion string `json:"destinationRegion,omitempty"` + + // SourceRegion: The source region for cache fill. + // + // Possible values: + // "CACHE_FILL_SOURCE_REGION_UNSPECIFIED" - Not specified. + // "CACHE_FILL_REGION_ASIA_PACIFIC" - Asia Pacific. + // "CACHE_FILL_SOURCE_REGION_EUROPE" - Europe + // "CACHE_FILL_SOURCE_REGION_NORTH_AMERICA" - North America. + // "CACHE_FILL_SOURCE_REGION_OCEANIA" - Oceania. + // "CACHE_FILL_SOURCE_REGION_SOUTH_AMERICA" - South America. + SourceRegion string `json:"sourceRegion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestinationRegion") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestinationRegion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CacheFillRegions) MarshalJSON() ([]byte, error) { + type NoMethod CacheFillRegions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudCdnEgressWorkload: Specifies usage for Cloud CDN egress. +type CloudCdnEgressWorkload struct { + // CacheEgressDestination: The destination for the cache egress charges. + // + // Possible values: + // "CACHE_EGRESS_DESTINATION_UNSPECIFIED" - Unspecified. + // "CACHE_EGRESS_DESTINATION_ASIA_PACIFIC" - Asia Pacific. + // "CACHE_EGRESS_DESTINATION_CHINA" - China. + // "CACHE_EGRESS_DESTINATION_EUROPE" - Europe. + // "CACHE_EGRESS_DESTINATION_NORTH_AMERICA" - North America. + // "CACHE_EGRESS_DESTINATION_OCEANIA" - Oceania including Australia, + // New Zealand, and surrounding Pacific Ocean islands such as Papua New + // Guinea and Fiji. This region excludes Hawaii. + // "CACHE_EGRESS_DESTINATION_LATIN_AMERICA" - Latin America (Including + // the Caribbean, South America and Central America.) + // "CACHE_EGRESS_DESTINATION_OTHER_DESTINATIONS" - All other + // destinations (including Africa and Antarctica) + CacheEgressDestination string `json:"cacheEgressDestination,omitempty"` + + // CacheEgressRate: Cache egress usage. The rate of data cache egressed + // in the destination. For example : units such as "GiBy/s" or "TBy/mo". + CacheEgressRate *Usage `json:"cacheEgressRate,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CacheEgressDestination") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CacheEgressDestination") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CloudCdnEgressWorkload) MarshalJSON() ([]byte, error) { + type NoMethod CloudCdnEgressWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudCdnWorkload: Specifies usage for Cloud CDN resources. +type CloudCdnWorkload struct { + // CacheFillOriginService: The source service for the cache fill. + // + // Possible values: + // "CACHE_FILL_ORIGIN_SERVICE_UNSPECIFIED" - Not specified. + // "CACHE_FILL_ORIGIN_SERVICE_GOOGLE_CLOUD_STORAGE_BUCKET" - Origin + // service is Google Cloud Storage. + // "CACHE_FILL_ORIGIN_SERVICE_BACKEND_SERVICE" - Origin service is + // backend service, such as Compute VMs, external backend, etc. + CacheFillOriginService string `json:"cacheFillOriginService,omitempty"` + + // CacheFillRate: Cache fill usage. The rate of data transferred between + // cache fill regions. For example: units such as "GiBy/s" or "TBy/mo". + CacheFillRate *Usage `json:"cacheFillRate,omitempty"` + + // CacheFillRegions: The regions where data is transferred from Google + // data locations into Google global cache servers. The SKU prices for + // cache fill across services are the same. + CacheFillRegions *CacheFillRegions `json:"cacheFillRegions,omitempty"` + + // CacheLookUpRate: Cache look up requests. This is specified to + // indicate the number of requests. For example: units such as "1/s". + CacheLookUpRate *Usage `json:"cacheLookUpRate,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CacheFillOriginService") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CacheFillOriginService") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CloudCdnWorkload) MarshalJSON() ([]byte, error) { + type NoMethod CloudCdnWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudInterconnectEgressWorkload: The interconnect egress only +// includes the Interconnect Egress. Please use the standard egress +// traffic interface to specify your standard egress usage. +type CloudInterconnectEgressWorkload struct { + // EgressRate: Data egress usage. This usage applies when you move or + // copy data from one Google Cloud service to another service. Expected + // units such as "GiBy/s, By/s, etc." + EgressRate *Usage `json:"egressRate,omitempty"` + + // InterconnectConnectionLocation: Locations in the Interconnect + // connection location table + // (https://cloud.google.com/vpc/network-pricing#interconnect-pricing). + // This is the interconnect egress charges. + // + // Possible values: + // "INTERCONNECT_CONNECTION_LOCATION_UNSPECIFIED" - Unspecified. + // "INTERCONNECT_CONNECTION_LOCATION_ASIA" - Asia. + // "INTERCONNECT_CONNECTION_LOCATION_EUROPE" - Europe. + // "INTERCONNECT_CONNECTION_LOCATION_NORTH_AMERICA" - North America. + // "INTERCONNECT_CONNECTION_LOCATION_SOUTH_AMERICA" - South America. + // "INTERCONNECT_CONNECTION_LOCATION_AUSTRALIA" - Australia. + InterconnectConnectionLocation string `json:"interconnectConnectionLocation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EgressRate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EgressRate") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudInterconnectEgressWorkload) MarshalJSON() ([]byte, error) { + type NoMethod CloudInterconnectEgressWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudInterconnectWorkload: Specifies usage for Cloud Interconnect +// resources. +type CloudInterconnectWorkload struct { + // InterconnectAttachments: VLAN attachment used for interconnect. + InterconnectAttachments []*VlanAttachment `json:"interconnectAttachments,omitempty"` + + // InterconnectType: Vlan attachment type. + // + // Possible values: + // "INTERCONNECT_TYPE_UNSPECIFIED" - Unspecified. + // "INTERCONNECT_TYPE_DEDICATED" - Type is dedicated. + // "INTERCONNECT_TYPE_PARTNER" - Type is partner. + InterconnectType string `json:"interconnectType,omitempty"` + + // LinkType: Interconnect circuit link type. + // + // Possible values: + // "LINK_TYPE_UNSPECIFIED" - Unspecified. + // "LINK_TYPE_ETHERNET_10G_LR" - Link type is 10 gbps. + // "LINK_TYPE_ETHERNET_100G_LR" - Link type is 100 gbps. + LinkType string `json:"linkType,omitempty"` + + // ProvisionedLinkCount: Interconnect usage. This is specified as a + // unitless quantity which indicates the number of circuit provisioned + // in interconnect. + ProvisionedLinkCount *Usage `json:"provisionedLinkCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "InterconnectAttachments") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InterconnectAttachments") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CloudInterconnectWorkload) MarshalJSON() ([]byte, error) { + type NoMethod CloudInterconnectWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudStorageEgressWorkload: Specification of a network type. Network +// egress within Google Cloud applies when you move or copy data from +// one Cloud Storage bucket to another or when another Google Cloud +// service accesses data in your Cloud Storage bucket.This includes the +// network egress within Google Cloud and the general network usage. +type CloudStorageEgressWorkload struct { + // DestinationContinent: Where the data is sent to. + // + // Possible values: + // "DESTINATION_CONTINENT_UNSPECIFIED" - Not specified. + // "DESTINATION_CONTINENT_ASIA_PACIFIC" - Asia Pacific. + // "DESTINATION_CONTINENT_AUTRALIA" - Australia. + // "DESTINATION_CONTINENT_EUROPE" - Europe. + // "DESTINATION_CONTINENT_NORTH_AMERICA" - North America. + // "DESTINATION_CONTINENT_SOUTH_AMERICA" - South America + DestinationContinent string `json:"destinationContinent,omitempty"` + + // EgressRate: Egress usage rate. This usage applies when you move or + // copy data from one Cloud Storage bucket to another or when another + // Google Cloud service accesses data in your Cloud Storage bucket. + // Expected units such as "GiBy/s, By/s, ..." + EgressRate *Usage `json:"egressRate,omitempty"` + + // SourceContinent: Where the data comes from. + // + // Possible values: + // "SOURCE_CONTINENT_UNSPECIFIED" - Not specified. + // "SOURCE_CONTINENT_ASIA_PACIFIC" - Asia Pacific. + // "SOURCE_CONTINENT_AUSTRALIA" - Australia. + // "SOURCE_CONTINENT_EUROPE" - Europe. + // "SOURCE_CONTINENT_NORTH_AMERICA" - North America. + // "SOURCE_CONTINENT_SOUTH_AMERICA" - South America. + SourceContinent string `json:"sourceContinent,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DestinationContinent") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestinationContinent") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CloudStorageEgressWorkload) MarshalJSON() ([]byte, error) { + type NoMethod CloudStorageEgressWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CloudStorageWorkload: Specifies usage of Cloud Storage resources. type CloudStorageWorkload struct { // DataRetrieval: Data retrieval usage. A retrieval cost applies when @@ -241,8 +546,8 @@ func (s *CloudStorageWorkload) MarshalJSON() ([]byte, error) { // commitment and any discounts. type Commitment struct { // Name: Required. A name for this commitment. All commitments in a - // CostScenario must have unique names. Each name must be a maximum of - // 32 characters. + // CostScenario must have unique names. Each name may be at most 128 + // characters long. Name string `json:"name,omitempty"` // VmResourceBasedCud: A resource-based committed use discount (CUD). @@ -972,6 +1277,62 @@ func (s *PredefinedMachineType) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PremiumTierEgressWorkload: Specify Premium Tier Internet egress +// networking. +type PremiumTierEgressWorkload struct { + // DestinationContinent: Where the data is sent to. + // + // Possible values: + // "DESTINATION_CONTINENT_UNSPECIFIED" - Not specified. + // "DESTINATION_CONTINENT_ASIA_PACIFIC" - Asia Pacific. + // "DESTINATION_CONTINENT_AFRICA" - Africa. + // "DESTINATION_CONTINENT_NORTH_AMERICA" - North America. + // "DESTINATION_CONTINENT_AUTRALIA" - Australia. + // "DESTINATION_CONTINENT_CENTRAL_AMERICA" - Central America. + // "DESTINATION_CONTINENT_CHINA" - China. + // "DESTINATION_CONTINENT_EASTERN_EUROPE" - Eastern Europe. + // "DESTINATION_CONTINENT_WESTERN_EUROPE" - Western Europe. + // "DESTINATION_CONTINENT_EMEA" - Other regions in Europe, Middle East + // and Africa. + // "DESTINATION_CONTINENT_INDIA" - India + // "DESTINATION_CONTINENT_MIDDLE_EAST" - Middle East. + // "DESTINATION_CONTINENT_SOUTH_AMERICA" - South America. + DestinationContinent string `json:"destinationContinent,omitempty"` + + // EgressRate: Premium Tier egress usage. Expected units such as + // "GiBy/s, By/s, etc." + EgressRate *Usage `json:"egressRate,omitempty"` + + // SourceRegion: Which region + // (https://cloud.google.com/compute/docs/regions-zones) the egress data + // comes from. + SourceRegion string `json:"sourceRegion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DestinationContinent") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestinationContinent") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PremiumTierEgressWorkload) MarshalJSON() ([]byte, error) { + type NoMethod PremiumTierEgressWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Price: The price of a SKU at a point int time. type Price struct { // EffectiveTime: The timestamp within the estimation time frame when @@ -1143,7 +1504,10 @@ type ScenarioConfig struct { // usage for this duration. Duration must be at least 1 hour (3,600 // seconds) and at most 10 years (315,360,000 seconds). The calculations // for years and months are based on a 730-hour (2,628,000-second) - // month. + // month. For durations longer than one month (2,628,000 seconds), the + // duration is rounded up to the next month, so the estimate shows you + // the costs for full months. For example, a duration of 3,232,800 + // seconds (roughly 5 weeks) is rounded up to 2 months. EstimateDuration string `json:"estimateDuration,omitempty"` // ForceSendFields is a list of field names (e.g. "EstimateDuration") to @@ -1302,6 +1666,41 @@ func (s *SkuCostEstimate) UnmarshalJSON(data []byte) error { return nil } +// StandardTierEgressWorkload: Specify Standard Tier Internet egress +// networking. +type StandardTierEgressWorkload struct { + // EgressRate: Standard tier egress usage. Expected units such as + // "GiBy/s, By/s, etc." + EgressRate *Usage `json:"egressRate,omitempty"` + + // SourceRegion: Which region + // (https://cloud.google.com/compute/docs/regions-zones) the egress data + // comes from. + SourceRegion string `json:"sourceRegion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EgressRate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EgressRate") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StandardTierEgressWorkload) MarshalJSON() ([]byte, error) { + type NoMethod StandardTierEgressWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Usage: An amount of usage over a time frame. type Usage struct { // UsageRateTimeline: A timeline of usage rates over the estimate @@ -1344,26 +1743,27 @@ func (s *Usage) MarshalJSON() ([]byte, error) { // the estimate time frame. The effective time on all entries must be an // integer number of hours. type UsageRateTimeline struct { - // Unit: The unit for the usage rate in each timeline entry. The - // supported units are a subset of The Unified Code for Units of Measure - // (https://ucum.org/ucum.html) standard: * **Time units (TIME-UNIT)** * - // `s` second * `min` minute * `h` hour * `d` day * `wk` week * `mo` - // month * `yr` year * `ms` millisecond * `us` microsecond * `ns` - // nanosecond * **Basic storage units (BASIC-STORAGE-UNIT)** * `bit` bit - // * `By` byte * **Count units (COUNT-UNIT)** * `count` count * - // **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga - // (10^9) * `T` tera (10^12) * `P` peta (10^15) * `Ki` kibi (2^10) * - // `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi - // (2^50) **Grammar** The grammar also includes these connectors: * `/` - // division or ratio (as an infix operator). For example: `kBy/{email}` - // or `MiBy/10ms`. * `.` multiplication or composition (as an infix - // operator). For example: `GBy.d` or `k{watt}.h`. The grammar for a - // unit is as follows: ``` Expression = Component { "." Component } { - // "/" Component } ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation - // ] | Annotation | "1" ; UNIT = TIME-UNIT | STORAGE-UNIT | DATA-UNIT | - // COUNT-UNIT Annotation = "{" NAME "}" ; ``` Examples: * Request per - // second: `1/s` or `{requests}/s` * GibiBytes: `GiBy` * GibiBytes * - // seconds: `GiBy.s` + // Unit: The unit for the usage rate in each timeline entry. If you + // provide an incorrect unit for an instance, the correct unit is + // provided in the error message. The supported units are a subset of + // The Unified Code for Units of Measure (https://ucum.org/ucum.html) + // standard: * **Time units (TIME-UNIT)** * `s` second * `min` minute * + // `h` hour * `d` day * `wk` week * `mo` month * `yr` year * `ms` + // millisecond * `us` microsecond * `ns` nanosecond * **Basic storage + // units (BASIC-STORAGE-UNIT)** * `bit` bit * `By` byte * **Count units + // (COUNT-UNIT)** * `count` count * **Prefixes (PREFIX)** * `k` kilo + // (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` + // peta (10^15) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) + // * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also + // includes these connectors: * `/` division or ratio (as an infix + // operator). For example: `kBy/{email}` or `MiBy/10ms`. * `.` + // multiplication or composition (as an infix operator). For example: + // `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: ``` + // Expression = Component { "." Component } { "/" Component } ; + // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] | Annotation | + // "1" ; UNIT = TIME-UNIT | STORAGE-UNIT | DATA-UNIT | COUNT-UNIT + // Annotation = "{" NAME "}" ; ``` Examples: * Request per second: `1/s` + // or `{requests}/s` * GibiBytes: `GiBy` * GibiBytes * seconds: `GiBy.s` Unit string `json:"unit,omitempty"` // UsageRateTimelineEntries: The timeline entries. Each entry has a @@ -1445,6 +1845,56 @@ func (s *UsageRateTimelineEntry) UnmarshalJSON(data []byte) error { return nil } +// VlanAttachment: VLAN attachment for cloud interconnect. +type VlanAttachment struct { + // Bandwidth: Capacities in the pricing table + // (https://cloud.google.com/vpc/network-pricing#interconnect-pricing) + // Examples of capacity are: 50/100/200/300/400/500-Mbps, + // 1/2/5/10/20/50-Gbps. + // + // Possible values: + // "BANDWIDTH_UNSPECIFIED" - Unspecified. + // "BANDWIDTH_BPS_50M" - 50 Mbit/s + // "BANDWIDTH_BPS_100M" - 100 Mbit/s + // "BANDWIDTH_BPS_200M" - 200 Mbit/s + // "BANDWIDTH_BPS_300M" - 300 Mbit/s + // "BANDWIDTH_BPS_400M" - 400 Mbit/s + // "BANDWIDTH_BPS_500M" - 500 Mbit/s + // "BANDWIDTH_BPS_1G" - 1 Gbit/s + // "BANDWIDTH_BPS_2G" - 2 Gbit/s + // "BANDWIDTH_BPS_5G" - 5 Gbit/s + // "BANDWIDTH_BPS_10G" - 10 Gbit/s + // "BANDWIDTH_BPS_20G" - 20 Gbit/s + // "BANDWIDTH_BPS_50G" - 50 Gbit/s + Bandwidth string `json:"bandwidth,omitempty"` + + // VlanCount: VLAN usage. This is specified as a unitless quantity which + // indicates the number of VLAN attachment used in interconnect. + VlanCount *Usage `json:"vlanCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bandwidth") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bandwidth") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VlanAttachment) MarshalJSON() ([]byte, error) { + type NoMethod VlanAttachment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmResourceBasedCud: Specifies a resource-based committed use discount // (CUD). type VmResourceBasedCud struct { @@ -1522,6 +1972,22 @@ func (s *VmResourceBasedCud) UnmarshalJSON(data []byte) error { // specific product configuration parameters of the product usage // amounts along each dimension in which the product is billed. type Workload struct { + // CloudCdnEgressWorkload: Usage on Google Cloud CDN Egress. + CloudCdnEgressWorkload *CloudCdnEgressWorkload `json:"cloudCdnEgressWorkload,omitempty"` + + // CloudCdnWorkload: Usage on Google Cloud CDN. + CloudCdnWorkload *CloudCdnWorkload `json:"cloudCdnWorkload,omitempty"` + + // CloudInterconnectEgressWorkload: Usage on Google Cloud Interconnect + // Egress. + CloudInterconnectEgressWorkload *CloudInterconnectEgressWorkload `json:"cloudInterconnectEgressWorkload,omitempty"` + + // CloudInterconnectWorkload: Usage on Google Cloud Interconnect. + CloudInterconnectWorkload *CloudInterconnectWorkload `json:"cloudInterconnectWorkload,omitempty"` + + // CloudStorageEgressWorkload: Usage on a cloud storage egress. + CloudStorageEgressWorkload *CloudStorageEgressWorkload `json:"cloudStorageEgressWorkload,omitempty"` + // CloudStorageWorkload: Usage on Google Cloud Storage. CloudStorageWorkload *CloudStorageWorkload `json:"cloudStorageWorkload,omitempty"` @@ -1529,12 +1995,18 @@ type Workload struct { ComputeVmWorkload *ComputeVmWorkload `json:"computeVmWorkload,omitempty"` // Name: Required. A name for this workload. All workloads in a - // `CostScenario` must have a unique `name`. Each `name` must be a - // maximum of 32 characters. + // `CostScenario` must have a unique `name`. Each `name` may be at most + // 128 characters long. Name string `json:"name,omitempty"` + // PremiumTierEgressWorkload: Usage on Premium Tier Internet Egress. + PremiumTierEgressWorkload *PremiumTierEgressWorkload `json:"premiumTierEgressWorkload,omitempty"` + + // StandardTierEgressWorkload: Usage on Standard Tier Internet Egress. + StandardTierEgressWorkload *StandardTierEgressWorkload `json:"standardTierEgressWorkload,omitempty"` + // ForceSendFields is a list of field names (e.g. - // "CloudStorageWorkload") to unconditionally include in API requests. + // "CloudCdnEgressWorkload") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API // requests. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -1542,10 +2014,10 @@ type Workload struct { // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudStorageWorkload") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "CloudCdnEgressWorkload") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 861622430b5..b447957abfb 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -2009,7 +2009,7 @@ } } }, - "revision": "20221106", + "revision": "20221212", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -2370,6 +2370,35 @@ }, "type": "object" }, + "GoogleCloudChannelV1ConditionalOverride": { + "description": "Specifies the override to conditionally apply.", + "id": "GoogleCloudChannelV1ConditionalOverride", + "properties": { + "adjustment": { + "$ref": "GoogleCloudChannelV1RepricingAdjustment", + "description": "Required. Information about the applied override's adjustment." + }, + "rebillingBasis": { + "description": "Required. The RebillingBasis to use for the applied override. Shows the relative cost based on your repricing costs.", + "enum": [ + "REBILLING_BASIS_UNSPECIFIED", + "COST_AT_LIST", + "DIRECT_CUSTOMER_COST" + ], + "enumDescriptions": [ + "Not used.", + "Use the list cost, also known as the MSRP.", + "Pass through all discounts except the Reseller Program Discount. If this is the default cost base and no adjustments are specified, the output cost will be exactly what the customer would see if they viewed the bill in the Google Cloud Console." + ], + "type": "string" + }, + "repricingCondition": { + "$ref": "GoogleCloudChannelV1RepricingCondition", + "description": "Required. Specifies the condition which, if met, will apply the override." + } + }, + "type": "object" + }, "GoogleCloudChannelV1Constraints": { "description": "Represents the constraints for buying the Offer.", "id": "GoogleCloudChannelV1Constraints", @@ -3901,6 +3930,17 @@ }, "type": "object" }, + "GoogleCloudChannelV1RepricingCondition": { + "description": "Represents the various repricing conditions you can use for a conditional override.", + "id": "GoogleCloudChannelV1RepricingCondition", + "properties": { + "skuGroupCondition": { + "$ref": "GoogleCloudChannelV1SkuGroupCondition", + "description": "SKU Group condition for override." + } + }, + "type": "object" + }, "GoogleCloudChannelV1RepricingConfig": { "description": "Configuration for repricing a Google bill over a period of time.", "id": "GoogleCloudChannelV1RepricingConfig", @@ -3913,6 +3953,13 @@ "$ref": "GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity", "description": "Applies the repricing configuration at the channel partner level. This is the only supported value for ChannelPartnerRepricingConfig." }, + "conditionalOverrides": { + "description": "The conditional overrides to apply for this configuration. If you list multiple overrides, only the first valid override is used. If you don't list any overrides, the API uses the normal adjustment and rebilling basis.", + "items": { + "$ref": "GoogleCloudChannelV1ConditionalOverride" + }, + "type": "array" + }, "effectiveInvoiceMonth": { "$ref": "GoogleTypeDate", "description": "Required. The YearMonth when these adjustments activate. The Day field needs to be \"0\" since we only accept YearMonth repricing boundaries." @@ -4022,6 +4069,17 @@ }, "type": "object" }, + "GoogleCloudChannelV1SkuGroupCondition": { + "description": "A condition that applies the override if a line item SKU is found in the SKU group.", + "id": "GoogleCloudChannelV1SkuGroupCondition", + "properties": { + "skuGroup": { + "description": "Specifies a SKU group (https://cloud.google.com/skus/sku-groups). Resource name of SKU group. Format: accounts/{account}/skuGroups/{sku_group}. Example: \"accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041\".", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudChannelV1StartPaidServiceRequest": { "description": "Request message for CloudChannelService.StartPaidService.", "id": "GoogleCloudChannelV1StartPaidServiceRequest", diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index bb5cd527fe2..3702de3b6dd 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -958,6 +958,53 @@ func (s *GoogleCloudChannelV1CommitmentSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1ConditionalOverride: Specifies the override to +// conditionally apply. +type GoogleCloudChannelV1ConditionalOverride struct { + // Adjustment: Required. Information about the applied override's + // adjustment. + Adjustment *GoogleCloudChannelV1RepricingAdjustment `json:"adjustment,omitempty"` + + // RebillingBasis: Required. The RebillingBasis to use for the applied + // override. Shows the relative cost based on your repricing costs. + // + // Possible values: + // "REBILLING_BASIS_UNSPECIFIED" - Not used. + // "COST_AT_LIST" - Use the list cost, also known as the MSRP. + // "DIRECT_CUSTOMER_COST" - Pass through all discounts except the + // Reseller Program Discount. If this is the default cost base and no + // adjustments are specified, the output cost will be exactly what the + // customer would see if they viewed the bill in the Google Cloud + // Console. + RebillingBasis string `json:"rebillingBasis,omitempty"` + + // RepricingCondition: Required. Specifies the condition which, if met, + // will apply the override. + RepricingCondition *GoogleCloudChannelV1RepricingCondition `json:"repricingCondition,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Adjustment") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Adjustment") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1ConditionalOverride) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ConditionalOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1Constraints: Represents the constraints for // buying the Offer. type GoogleCloudChannelV1Constraints struct { @@ -3471,6 +3518,36 @@ func (s *GoogleCloudChannelV1RepricingAdjustment) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1RepricingCondition: Represents the various +// repricing conditions you can use for a conditional override. +type GoogleCloudChannelV1RepricingCondition struct { + // SkuGroupCondition: SKU Group condition for override. + SkuGroupCondition *GoogleCloudChannelV1SkuGroupCondition `json:"skuGroupCondition,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SkuGroupCondition") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SkuGroupCondition") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1RepricingCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RepricingCondition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1RepricingConfig: Configuration for repricing a // Google bill over a period of time. type GoogleCloudChannelV1RepricingConfig struct { @@ -3482,6 +3559,12 @@ type GoogleCloudChannelV1RepricingConfig struct { // ChannelPartnerRepricingConfig. ChannelPartnerGranularity *GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity `json:"channelPartnerGranularity,omitempty"` + // ConditionalOverrides: The conditional overrides to apply for this + // configuration. If you list multiple overrides, only the first valid + // override is used. If you don't list any overrides, the API uses the + // normal adjustment and rebilling basis. + ConditionalOverrides []*GoogleCloudChannelV1ConditionalOverride `json:"conditionalOverrides,omitempty"` + // EffectiveInvoiceMonth: Required. The YearMonth when these adjustments // activate. The Day field needs to be "0" since we only accept // YearMonth repricing boundaries. @@ -3712,6 +3795,38 @@ func (s *GoogleCloudChannelV1Sku) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1SkuGroupCondition: A condition that applies the +// override if a line item SKU is found in the SKU group. +type GoogleCloudChannelV1SkuGroupCondition struct { + // SkuGroup: Specifies a SKU group + // (https://cloud.google.com/skus/sku-groups). Resource name of SKU + // group. Format: accounts/{account}/skuGroups/{sku_group}. Example: + // "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041". + SkuGroup string `json:"skuGroup,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SkuGroup") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SkuGroup") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1SkuGroupCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1SkuGroupCondition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1StartPaidServiceRequest: Request message for // CloudChannelService.StartPaidService. type GoogleCloudChannelV1StartPaidServiceRequest struct { diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index 68de4f735e3..235403fde8a 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20221129", + "revision": "20221207", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -814,7 +814,7 @@ "type": "string" }, "environment": { - "description": "Describe whether the function is gen1 or gen2.", + "description": "Describe whether the function is 1st Gen or 2nd Gen.", "enum": [ "ENVIRONMENT_UNSPECIFIED", "GEN_1", diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index 2ba0832a0bd..8adbe25ecb8 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -658,7 +658,7 @@ type Function struct { // Description: User-provided description of a function. Description string `json:"description,omitempty"` - // Environment: Describe whether the function is gen1 or gen2. + // Environment: Describe whether the function is 1st Gen or 2nd Gen. // // Possible values: // "ENVIRONMENT_UNSPECIFIED" - Unspecified diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index e3650203c57..726b2d9379b 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20221129", + "revision": "20221207", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -814,7 +814,7 @@ "type": "string" }, "environment": { - "description": "Describe whether the function is gen1 or gen2.", + "description": "Describe whether the function is 1st Gen or 2nd Gen.", "enum": [ "ENVIRONMENT_UNSPECIFIED", "GEN_1", diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index 2cda1d680bf..32021f460fc 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -658,7 +658,7 @@ type Function struct { // Description: User-provided description of a function. Description string `json:"description,omitempty"` - // Environment: Describe whether the function is gen1 or gen2. + // Environment: Describe whether the function is 1st Gen or 2nd Gen. // // Possible values: // "ENVIRONMENT_UNSPECIFIED" - Unspecified diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index 99f2ac0b9d6..8f6c42311c3 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20221129", + "revision": "20221207", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -814,7 +814,7 @@ "type": "string" }, "environment": { - "description": "Describe whether the function is gen1 or gen2.", + "description": "Describe whether the function is 1st Gen or 2nd Gen.", "enum": [ "ENVIRONMENT_UNSPECIFIED", "GEN_1", diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index df02922c166..8bbb09346b3 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -658,7 +658,7 @@ type Function struct { // Description: User-provided description of a function. Description string `json:"description,omitempty"` - // Environment: Describe whether the function is gen1 or gen2. + // Environment: Describe whether the function is 1st Gen or 2nd Gen. // // Possible values: // "ENVIRONMENT_UNSPECIFIED" - Unspecified diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index b1267e80e94..a1d60ba140d 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -40203,7 +40203,7 @@ } } }, - "revision": "20221126", + "revision": "20221205", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -56240,7 +56240,7 @@ "type": "string" }, "nocContactEmail": { - "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Stackdriver logs alerting and Cloud Notifications.", + "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Cloud Monitoring logs alerting and Cloud Notifications. This field is required for users who sign up for Cloud Interconnect using workforce identity federation.", "type": "string" }, "operationalStatus": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index be1d8e80139..60553986762 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -27119,8 +27119,9 @@ type Interconnect struct { // NocContactEmail: Email address to contact the customer NOC for // operations and maintenance notifications regarding this Interconnect. // If specified, this will be used for notifications in addition to all - // other forms described, such as Stackdriver logs alerting and Cloud - // Notifications. + // other forms described, such as Cloud Monitoring logs alerting and + // Cloud Notifications. This field is required for users who sign up for + // Cloud Interconnect using workforce identity federation. NocContactEmail string `json:"nocContactEmail,omitempty"` // OperationalStatus: [Output Only] The current status of this diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 1edaf6be98b..b74510d861a 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -35916,7 +35916,7 @@ } } }, - "revision": "20221126", + "revision": "20221205", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -49444,7 +49444,7 @@ "type": "string" }, "nocContactEmail": { - "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Stackdriver logs alerting and Cloud Notifications.", + "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Cloud Monitoring logs alerting and Cloud Notifications. This field is required for users who sign up for Cloud Interconnect using workforce identity federation.", "type": "string" }, "operationalStatus": { diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index 1f914e0fa5b..d60c9a50722 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -23048,8 +23048,9 @@ type Interconnect struct { // NocContactEmail: Email address to contact the customer NOC for // operations and maintenance notifications regarding this Interconnect. // If specified, this will be used for notifications in addition to all - // other forms described, such as Stackdriver logs alerting and Cloud - // Notifications. + // other forms described, such as Cloud Monitoring logs alerting and + // Cloud Notifications. This field is required for users who sign up for + // Cloud Interconnect using workforce identity federation. NocContactEmail string `json:"nocContactEmail,omitempty"` // OperationalStatus: [Output Only] The current status of this diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 9a475a243af..5d77fc979a7 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -32692,7 +32692,7 @@ } } }, - "revision": "20221126", + "revision": "20221205", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -45669,7 +45669,7 @@ "type": "string" }, "nocContactEmail": { - "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Stackdriver logs alerting and Cloud Notifications.", + "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Cloud Monitoring logs alerting and Cloud Notifications. This field is required for users who sign up for Cloud Interconnect using workforce identity federation.", "type": "string" }, "operationalStatus": { @@ -56409,13 +56409,6 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, - "resourcePolicies": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.", - "type": "object" - }, "satisfiesPzs": { "description": "[Output Only] Reserved for future use.", "type": "boolean" diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index df7f8c82d3b..754cba6cc5a 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -22148,8 +22148,9 @@ type Interconnect struct { // NocContactEmail: Email address to contact the customer NOC for // operations and maintenance notifications regarding this Interconnect. // If specified, this will be used for notifications in addition to all - // other forms described, such as Stackdriver logs alerting and Cloud - // Notifications. + // other forms described, such as Cloud Monitoring logs alerting and + // Cloud Notifications. This field is required for users who sign up for + // Cloud Interconnect using workforce identity federation. NocContactEmail string `json:"nocContactEmail,omitempty"` // OperationalStatus: [Output Only] The current status of this @@ -38771,11 +38772,6 @@ type Reservation struct { // be a dash. Name string `json:"name,omitempty"` - // ResourcePolicies: Resource policies to be added to this reservation. - // The key is defined by user, and the value is resource policy url. - // This is to define placement policy with reservation. - ResourcePolicies map[string]string `json:"resourcePolicies,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index fe21af88187..cdf22e38643 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -511,6 +511,38 @@ } }, "resources": { + "connectionSchemaMetadata": { + "methods": { + "refresh": { + "description": "Refresh runtime schema of a connection.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/connectionSchemaMetadata:refresh", + "httpMethod": "POST", + "id": "connectors.projects.locations.connections.connectionSchemaMetadata.refresh", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name. Format: projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/connectionSchemaMetadata$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:refresh", + "request": { + "$ref": "RefreshConnectionSchemaMetadataRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "runtimeActionSchemas": { "methods": { "list": { @@ -1047,7 +1079,7 @@ } } }, - "revision": "20221018", + "revision": "20221201", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -1571,13 +1603,15 @@ "LAUNCH_STAGE_UNSPECIFIED", "PREVIEW", "GA", - "DEPRECATED" + "DEPRECATED", + "PRIVATE_PREVIEW" ], "enumDescriptions": [ "LAUNCH_STAGE_UNSPECIFIED.", "PREVIEW.", "GA.", - "DEPRECATED." + "DEPRECATED.", + "PRIVATE_PREVIEW." ], "readOnly": true, "type": "string" @@ -1651,13 +1685,15 @@ "LAUNCH_STAGE_UNSPECIFIED", "PREVIEW", "GA", - "DEPRECATED" + "DEPRECATED", + "PRIVATE_PREVIEW" ], "enumDescriptions": [ "LAUNCH_STAGE_UNSPECIFIED.", "PREVIEW.", "GA.", - "DEPRECATED." + "DEPRECATED.", + "PRIVATE_PREVIEW." ], "readOnly": true, "type": "string" @@ -2523,13 +2559,15 @@ "LAUNCH_STAGE_UNSPECIFIED", "PREVIEW", "GA", - "DEPRECATED" + "DEPRECATED", + "PRIVATE_PREVIEW" ], "enumDescriptions": [ "LAUNCH_STAGE_UNSPECIFIED.", "PREVIEW.", "GA.", - "DEPRECATED." + "DEPRECATED.", + "PRIVATE_PREVIEW." ], "readOnly": true, "type": "string" @@ -2553,6 +2591,12 @@ }, "type": "object" }, + "RefreshConnectionSchemaMetadataRequest": { + "description": "Request message for ConnectorsService.RefreshConnectionSchemaMetadata.", + "id": "RefreshConnectionSchemaMetadataRequest", + "properties": {}, + "type": "object" + }, "Resource": { "description": "Resource definition", "id": "Resource", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index d7305e9444a..2a611aed03f 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -169,6 +169,7 @@ type ProjectsLocationsService struct { func NewProjectsLocationsConnectionsService(s *Service) *ProjectsLocationsConnectionsService { rs := &ProjectsLocationsConnectionsService{s: s} + rs.ConnectionSchemaMetadata = NewProjectsLocationsConnectionsConnectionSchemaMetadataService(s) rs.RuntimeActionSchemas = NewProjectsLocationsConnectionsRuntimeActionSchemasService(s) rs.RuntimeEntitySchemas = NewProjectsLocationsConnectionsRuntimeEntitySchemasService(s) return rs @@ -177,11 +178,22 @@ func NewProjectsLocationsConnectionsService(s *Service) *ProjectsLocationsConnec type ProjectsLocationsConnectionsService struct { s *Service + ConnectionSchemaMetadata *ProjectsLocationsConnectionsConnectionSchemaMetadataService + RuntimeActionSchemas *ProjectsLocationsConnectionsRuntimeActionSchemasService RuntimeEntitySchemas *ProjectsLocationsConnectionsRuntimeEntitySchemasService } +func NewProjectsLocationsConnectionsConnectionSchemaMetadataService(s *Service) *ProjectsLocationsConnectionsConnectionSchemaMetadataService { + rs := &ProjectsLocationsConnectionsConnectionSchemaMetadataService{s: s} + return rs +} + +type ProjectsLocationsConnectionsConnectionSchemaMetadataService struct { + s *Service +} + func NewProjectsLocationsConnectionsRuntimeActionSchemasService(s *Service) *ProjectsLocationsConnectionsRuntimeActionSchemasService { rs := &ProjectsLocationsConnectionsRuntimeActionSchemasService{s: s} return rs @@ -910,6 +922,7 @@ type Connector struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Resource name of the Connector. Format: @@ -985,6 +998,7 @@ type ConnectorVersion struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Resource name of the Version. Format: @@ -2281,6 +2295,7 @@ type Provider struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Resource name of the Provider. Format: @@ -2322,6 +2337,11 @@ func (s *Provider) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RefreshConnectionSchemaMetadataRequest: Request message for +// ConnectorsService.RefreshConnectionSchemaMetadata. +type RefreshConnectionSchemaMetadataRequest struct { +} + // Resource: Resource definition type Resource struct { // PathTemplate: Template to uniquely represent a GCP resource in a @@ -4963,6 +4983,150 @@ func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleap } +// method id "connectors.projects.locations.connections.connectionSchemaMetadata.refresh": + +type ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall struct { + s *Service + name string + refreshconnectionschemametadatarequest *RefreshConnectionSchemaMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Refresh: Refresh runtime schema of a connection. +// +// - name: Resource name. Format: +// projects/{project}/locations/{location}/connections/{connection}/con +// nectionSchemaMetadata. +func (r *ProjectsLocationsConnectionsConnectionSchemaMetadataService) Refresh(name string, refreshconnectionschemametadatarequest *RefreshConnectionSchemaMetadataRequest) *ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall { + c := &ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.refreshconnectionschemametadatarequest = refreshconnectionschemametadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall) Context(ctx context.Context) *ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.refreshconnectionschemametadatarequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:refresh") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "connectors.projects.locations.connections.connectionSchemaMetadata.refresh" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsConnectionSchemaMetadataRefreshCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Refresh runtime schema of a connection.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/connectionSchemaMetadata:refresh", + // "httpMethod": "POST", + // "id": "connectors.projects.locations.connections.connectionSchemaMetadata.refresh", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name. Format: projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/connectionSchemaMetadata$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:refresh", + // "request": { + // "$ref": "RefreshConnectionSchemaMetadataRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "connectors.projects.locations.connections.runtimeActionSchemas.list": type ProjectsLocationsConnectionsRuntimeActionSchemasListCall struct { diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 7affd802a93..f9db680cbc5 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2487,7 +2487,7 @@ } } }, - "revision": "20221031", + "revision": "20221114", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3352,6 +3352,20 @@ "$ref": "ShieldedNodes", "description": "Configuration for Shielded Nodes." }, + "desiredStackType": { + "description": "The desired stack type of the cluster. If a stack type is provided and does not match the current stack type of the cluster, update will attempt to change the stack type to the new type.", + "enum": [ + "STACK_TYPE_UNSPECIFIED", + "IPV4", + "IPV4_IPV6" + ], + "enumDescriptions": [ + "Default value, will be defaulted as IPV4 only", + "Cluster is IPV4 only", + "Cluster can use both IPv4 and IPv6" + ], + "type": "string" + }, "desiredVerticalPodAutoscaling": { "$ref": "VerticalPodAutoscaling", "description": "Cluster-level Vertical Pod Autoscaling configuration." diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index aa2093e6de4..0251d55c7bd 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -1534,6 +1534,18 @@ type ClusterUpdate struct { // DesiredShieldedNodes: Configuration for Shielded Nodes. DesiredShieldedNodes *ShieldedNodes `json:"desiredShieldedNodes,omitempty"` + // DesiredStackType: The desired stack type of the cluster. If a stack + // type is provided and does not match the current stack type of the + // cluster, update will attempt to change the stack type to the new + // type. + // + // Possible values: + // "STACK_TYPE_UNSPECIFIED" - Default value, will be defaulted as IPV4 + // only + // "IPV4" - Cluster is IPV4 only + // "IPV4_IPV6" - Cluster can use both IPv4 and IPv6 + DesiredStackType string `json:"desiredStackType,omitempty"` + // DesiredVerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling // configuration. DesiredVerticalPodAutoscaling *VerticalPodAutoscaling `json:"desiredVerticalPodAutoscaling,omitempty"` diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 90abbf8e643..d6987c60b58 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2512,7 +2512,7 @@ } } }, - "revision": "20221031", + "revision": "20221110", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3480,6 +3480,20 @@ "$ref": "ShieldedNodes", "description": "Configuration for Shielded Nodes." }, + "desiredStackType": { + "description": "The desired stack type of the cluster. If a stack type is provided and does not match the current stack type of the cluster, update will attempt to change the stack type to the new type.", + "enum": [ + "STACK_TYPE_UNSPECIFIED", + "IPV4", + "IPV4_IPV6" + ], + "enumDescriptions": [ + "By default, the clusters will be IPV4 only", + "The value used if the cluster is a IPV4 only", + "The value used if the cluster is a dual stack cluster" + ], + "type": "string" + }, "desiredTpuConfig": { "$ref": "TpuConfig", "description": "The desired Cloud TPU configuration." diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index cf2dcb720e8..9bb00bc6ee2 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -1680,6 +1680,18 @@ type ClusterUpdate struct { // DesiredShieldedNodes: Configuration for Shielded Nodes. DesiredShieldedNodes *ShieldedNodes `json:"desiredShieldedNodes,omitempty"` + // DesiredStackType: The desired stack type of the cluster. If a stack + // type is provided and does not match the current stack type of the + // cluster, update will attempt to change the stack type to the new + // type. + // + // Possible values: + // "STACK_TYPE_UNSPECIFIED" - By default, the clusters will be IPV4 + // only + // "IPV4" - The value used if the cluster is a IPV4 only + // "IPV4_IPV6" - The value used if the cluster is a dual stack cluster + DesiredStackType string `json:"desiredStackType,omitempty"` + // DesiredTpuConfig: The desired Cloud TPU configuration. DesiredTpuConfig *TpuConfig `json:"desiredTpuConfig,omitempty"` diff --git a/contentwarehouse/v1/contentwarehouse-api.json b/contentwarehouse/v1/contentwarehouse-api.json index 0988c031bc6..ad36d4f86c9 100644 --- a/contentwarehouse/v1/contentwarehouse-api.json +++ b/contentwarehouse/v1/contentwarehouse-api.json @@ -1075,7 +1075,7 @@ } } }, - "revision": "20221206", + "revision": "20221213", "rootUrl": "https://contentwarehouse.googleapis.com/", "schemas": { "AbuseiamAbuseType": { @@ -3529,7 +3529,11 @@ "BASECAMP_AFFINITY", "DRIVE_SEARCH_FILTER_AFFINITY", "CULTURE_EVENTS_CALENDAR_AFFINITY", - "DATABRIDGE_CONSOLE_AFFINITY" + "DATABRIDGE_CONSOLE_AFFINITY", + "COMMSTAR_AFFINITY", + "CDDB_AFFINITY", + "DATA_STUDIO_SPACES_AFFINITY", + "SOJI_AFFINITY" ], "enumDescriptions": [ "", @@ -3765,6 +3769,10 @@ "", "", "", + "", + "", + "", + "", "" ], "type": "string" @@ -6622,6 +6630,7 @@ "type": "array" }, "relation": { + "description": "See go/relation-vs-relationship for relation vs relationship explanation.", "items": { "$ref": "AppsPeopleOzExternalMergedpeopleapiRelation" }, @@ -8054,7 +8063,7 @@ "type": "object" }, "AppsPeopleOzExternalMergedpeopleapiRelation": { - "description": "Relation stores the related person between the contact or profile and a third person This field currently includes RelationshipToMe data in fields value and canonical_value for ContainerType CONTACT_ANNOTATION. This will be moved to RelationshipToMe in b/221081499.", + "description": "Relation stores the related person between the contact or profile and a third person. See go/relation-vs-relationship for relation vs relationship explanation. This field currently includes RelationshipToMe data in fields value and canonical_value for ContainerType CONTACT_ANNOTATION. This will be moved to RelationshipToMe in b/221081499.", "id": "AppsPeopleOzExternalMergedpeopleapiRelation", "properties": { "canonicalValue": { @@ -12190,7 +12199,7 @@ "id": "AssistantApiLensPerceptionCapabilitiesLensCapabilitiesTranslate", "properties": { "supportedLanguageTags": { - "description": "The list of language IETF BCP 47 tags that are supported. See the full list at go/androidlanguages.", + "description": "The list of language IETF BCP 47 tags that are supported. See the full details in the comment on the equivalent field in: http://google3/java/com/google/android/apps/gsa/search/shared/service/proto/lens_service_event.proto;l=55;rcl=355512559", "items": { "type": "string" }, @@ -19090,12 +19099,14 @@ "UNDEFINED", "CURATED", "ALARM", - "CUSTOM" + "CUSTOM", + "CUSTOM_SCRIPT" ], "enumDescriptions": [ "", "", "", + "", "SCHEDULED = 3 [deprecated = true];" ], "type": "string" @@ -24120,7 +24131,8 @@ "VERSION_MOVING_LIVE_0", "VERSION_MOVING_MANUAL_0", "VERSION_LITE_1", - "VERSION_CUSTOM" + "VERSION_CUSTOM", + "VERSION_REJECTED" ], "enumDescriptions": [ "", @@ -24143,7 +24155,8 @@ "Moving thumbnailer version 0 for live.", "Moving thumbnail generated manually.", "Lite Thumbnailer (previously known as FirstFrameThumbnailer)", - "Custom image (not generated). Likely client provided." + "Custom image (not generated). Likely client provided.", + "A gray fallback image for images that have been rejected." ], "type": "string" }, @@ -28450,7 +28463,8 @@ "PROVIDER_VATTENFALL", "PROVIDER_VIETGIS", "PROVIDER_UNITE", - "PROVIDER_NEOGY" + "PROVIDER_NEOGY", + "PROVIDER_AMPUP" ], "enumDescriptions": [ "ABSTRACT The root of all provider types. This should never be present on an actual feature, but can be useful when calling InCategory.", @@ -29158,7 +29172,8 @@ "", "", "", - "Note: Next available value is 0x126F." + "", + "Note: Next available value is 0x1270." ], "type": "string" }, @@ -33262,7 +33277,8 @@ "PROVIDER_VATTENFALL", "PROVIDER_VIETGIS", "PROVIDER_UNITE", - "PROVIDER_NEOGY" + "PROVIDER_NEOGY", + "PROVIDER_AMPUP" ], "enumDescriptions": [ "ABSTRACT The root of all provider types. This should never be present on an actual feature, but can be useful when calling InCategory.", @@ -33970,7 +33986,8 @@ "", "", "", - "Note: Next available value is 0x126F." + "", + "Note: Next available value is 0x1270." ], "type": "string" } @@ -35405,7 +35422,8 @@ "PROVIDER_VATTENFALL", "PROVIDER_VIETGIS", "PROVIDER_UNITE", - "PROVIDER_NEOGY" + "PROVIDER_NEOGY", + "PROVIDER_AMPUP" ], "enumDescriptions": [ "ABSTRACT The root of all provider types. This should never be present on an actual feature, but can be useful when calling InCategory.", @@ -36113,7 +36131,8 @@ "", "", "", - "Note: Next available value is 0x126F." + "", + "Note: Next available value is 0x1270." ], "type": "string" }, @@ -37902,7 +37921,8 @@ "PROVIDER_VATTENFALL", "PROVIDER_VIETGIS", "PROVIDER_UNITE", - "PROVIDER_NEOGY" + "PROVIDER_NEOGY", + "PROVIDER_AMPUP" ], "enumDescriptions": [ "ABSTRACT The root of all provider types. This should never be present on an actual feature, but can be useful when calling InCategory.", @@ -38610,7 +38630,8 @@ "", "", "", - "Note: Next available value is 0x126F." + "", + "Note: Next available value is 0x1270." ], "type": "string" } @@ -43386,7 +43407,7 @@ "REPLACE_POLICY_BINDING" ], "enumDescriptions": [ - "", + "The unknown operation type.", "Adds newly given policy bindings in the existing bindings list.", "Removes newly given policy bindings from the existing bindings list.", "Replaces existing policy bindings with the given policy binding list" @@ -43471,7 +43492,7 @@ "ACTION_PENDING" ], "enumDescriptions": [ - "", + "The unknown state.", "State indicating action executed successfully.", "State indicating action failed.", "State indicating action timed out.", @@ -43548,7 +43569,7 @@ "description": "Request Option for processing Cloud AI Document in CW Document." }, "createMask": { - "description": "Field mask for creating Document fields. If mask path is empty, it means all fields are masked. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Field mask for creating Document fields. If mask path is empty, it means all fields are masked. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.", "format": "google-fieldmask", "type": "string" }, @@ -43671,10 +43692,6 @@ "description": "Defines the structure for content warehouse document proto.", "id": "GoogleCloudContentwarehouseV1Document", "properties": { - "asyncEnabled": { - "description": "If true, makes the document visible to asynchronous policies and rules.", - "type": "boolean" - }, "cloudAiDocument": { "$ref": "GoogleCloudDocumentaiV1Document", "description": "Document AI format to save the structured content, including OCR." @@ -43773,8 +43790,12 @@ "description": "If true, text extraction will not be performed.", "type": "boolean" }, + "textExtractionEnabled": { + "description": "If true, text extraction will be performed.", + "type": "boolean" + }, "title": { - "description": "Title that describes the document. This is usually present in the top section of the document, and is a mandatory field for the question-answering feature.", + "description": "Title that describes the document. This can be the top heading or text that describes the document.", "type": "string" }, "updateTime": { @@ -44717,7 +44738,7 @@ "ON_UPDATE" ], "enumDescriptions": [ - "", + "Trigger for unknown action.", "Trigger for create document action.", "Trigger for update document action." ], @@ -44860,11 +44881,11 @@ "description": "The meta information collected about the end user, used to enforce access control and improve the search quality of the service." }, "requireTotalSize": { - "description": "Optional. Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size. Enabling this flag may adversely impact performance. Hint: If this is used with pagination, set this flag on the initial query but set this to false on subsequent page calls (keep the total count locally). Defaults to false.", + "description": "Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size. Enabling this flag may adversely impact performance. Hint: If this is used with pagination, set this flag on the initial query but set this to false on subsequent page calls (keep the total count locally). Defaults to false.", "type": "boolean" }, "totalResultSize": { - "description": "Optional. Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size.", + "description": "Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size.", "enum": [ "TOTAL_RESULT_SIZE_UNSPECIFIED", "ESTIMATED_SIZE", @@ -45190,6 +45211,7 @@ "type": "object" }, "GoogleCloudContentwarehouseV1UserInfo": { + "description": "The user information.", "id": "GoogleCloudContentwarehouseV1UserInfo", "properties": { "groupIds": { @@ -51462,9 +51484,13 @@ "type": "object" }, "ImageRepositoryAmarnaCloudSpeechSignals": { - "description": "Next Tag: 7", + "description": "Next Tag: 8", "id": "ImageRepositoryAmarnaCloudSpeechSignals", "properties": { + "duplicateOfYtS3Asr": { + "description": "If this field is set to true, it means that Youtube already processed the ASR from S3 for the langID. Please find the ASR result from transcript_asr in google3/image/repository/proto/video_search.proto instead.", + "type": "boolean" + }, "langWithoutLocale": { "description": "The language id input for creating this ASR without regional info. Same format as in go/ytlangid. This field is populated in Kronos Amarna Cloud Speech operator and passed to Amarna, but it is cleared before stored in Amarna's metadata table.", "type": "string" @@ -59158,7 +59184,7 @@ "type": "object" }, "KnowledgeAnswersIntentQueryFunctionCallSignals": { - "description": "Next ID: 34", + "description": "Next ID: 35", "id": "KnowledgeAnswersIntentQueryFunctionCallSignals", "properties": { "argumentComposingMid": { @@ -59271,6 +59297,10 @@ "description": "Denotes whether this is a sub-intent of an ambiguous SystemUncertain intent go/intent-disambiguation.", "type": "boolean" }, + "isNeuralCategoricalInterpretation": { + "description": "Whether the interpretation was generated from the neural categorical parser.", + "type": "boolean" + }, "isUiCompositionIntent": { "description": "Denotes this is a sub-intent used for composing an Assistant UI response. The assistant dialog should output ui_composition_shelf in the SystemResponse if it can fulfill the intent. More info in go/davinci-design and go/davinci-di-fulfillment", "type": "boolean" @@ -71419,7 +71449,8 @@ "VIDEO_GAME", "DIRECTOR", "ACTOR", - "MOVIE_SERIES" + "MOVIE_SERIES", + "APP" ], "enumDescriptions": [ "", @@ -71459,7 +71490,8 @@ "A video game (e.g. \"Skyrim\"). Note(shohs): As of Q4'18, this content type is not supported as a top-level content type to fulfill a query; rather, it is only used at the entity level to support queries such as \"play Skyrim soundtrack\".", "TV or film director. (e.g. \"James Cameron\").", "Actor: TV, film actor etc. (e.g. \"Tom Cruise\").", - "Movie series. (e.g. \"Home Alone\")." + "Movie series. (e.g. \"Home Alone\").", + "Used for App." ], "type": "string" }, @@ -76087,6 +76119,7 @@ "CULTURE_EVENTS_CALENDAR", "DATABRIDGE_CONSOLE", "COMMSTAR", + "CDDB", "DEPRECATED_QUICKSTART_FLUME", "DUO_CLIENT", "ALBERT", @@ -76720,6 +76753,7 @@ "CULTURE_EVENTS_CALENDAR Team contact: culture-events-calendar@google.com", "Databridge Console Team contact: databrige-eng@google.com", "Commstar Team contact: mdb.commstar-dev@google.com", + "Cddb Team contact: cddb-dev-team@google.com", "", "Duo Client Team contact: duo-eng@google.com", "Project albert (go/albert-frontend) Team contact: albert-eng@google.com", @@ -78494,6 +78528,11 @@ "format": "int64", "type": "string" }, + "loopCount": { + "description": "The number of times the animation plays. If 0, the animation will loop indefinitely. If positive, this number includes the initial playthrough. For example, a value of 3 means that each frame is shown 3 times.", + "format": "int32", + "type": "integer" + }, "numFrames": { "format": "int64", "type": "string" @@ -85139,17 +85178,19 @@ "type": "object" }, "QualityPreviewRanklabSnippet": { - "description": "Snippet candidate related information and signal scores. Next ID: 11", + "description": "Snippet candidate related information and signal scores. This message is used for both snippet scoring and ranklab features recording. Next ID: 12 ================== Features populated in production =======================", "id": "QualityPreviewRanklabSnippet", "properties": { "brainFeatures": { - "$ref": "QualityPreviewSnippetBrainFeatures" + "$ref": "QualityPreviewSnippetBrainFeatures", + "description": "Features from SnippetFlow in Superroot." }, "documentFeatures": { "$ref": "QualityPreviewSnippetDocumentFeatures" }, "experimentalFeatures": { - "$ref": "QualityPreviewSnippetExperimentalFeatures" + "$ref": "QualityPreviewSnippetExperimentalFeatures", + "description": "For experimental usage, not populated yet." }, "finalScore": { "description": "The final score of this candidate.", @@ -85175,6 +85216,10 @@ "$ref": "QualityPreviewSnippetQueryTermCoverageFeatures", "description": "Query term (including synonyms) coverage features." }, + "radishFeatures": { + "$ref": "QualityPreviewSnippetRadishFeatures", + "description": "Radish related information." + }, "snippetInfo": { "$ref": "QualityPreviewChosenSnippetInfo", "description": "Information to identify current chosen snippet." @@ -87685,7 +87730,7 @@ "type": "object" }, "QualityShoppingShoppingAttachmentPBlock": { - "description": "Next ID: 15", + "description": "Next ID: 18", "id": "QualityShoppingShoppingAttachmentPBlock", "properties": { "fullTitle": { @@ -87823,6 +87868,11 @@ "$ref": "QualityRankembedMustangMustangRankEmbedInfo" }, "type": "array" + }, + "weakGlobalProductClusterId": { + "description": "Matched/Inferred weak product identity - set only if the global_product_cluster_id is missing", + "format": "uint64", + "type": "string" } }, "type": "object" @@ -90286,11 +90336,6 @@ "format": "float", "type": "number" }, - "newConfidenceExperimentalDontUse": { - "description": "Experimental. This is used for doing experiments only. For example, new entity confidence can be populated here to experiment with replacing the one re-computed by NewAnnotationConfidence().", - "format": "float", - "type": "number" - }, "newsTopicalityScore": { "description": "DEPRECATED: this field is no longer set. As of early June 2018 it is referenced in hundreds of test files and is difficult to remove from the code base.", "format": "float", @@ -92098,7 +92143,8 @@ "FEMALE", "ASPECT", "TARGET_AUDIENCE", - "TARGET_PURPOSE" + "TARGET_PURPOSE", + "SETTING_BY_LOCATION" ], "enumDescriptions": [ "", @@ -92108,6 +92154,7 @@ "A range expressing unequivocally a (semantic) female gender. This could be for expressions that are intrinsically female (\"aunt\") or the female expression of an entity that is lexically gendered (\"chairwoman\" as opposed to \"chairman\" or \"chairperson\").", "The range designates an aspect, that is, a modifier of some other range.", "Facets.", + "", "" ], "type": "string" @@ -92226,9 +92273,10 @@ "FEMININE_HONORIFIC", "GENERIC_HONORIFIC", "NEGATIVE_SUPERLATIVE", + "SUPERLATIVE", "FACET_AUDIENCE", "FACET_PURPOSE", - "SUPERLATIVE" + "FACET_SETTING_BY_LOCATION" ], "enumDescriptions": [ "", @@ -92281,6 +92329,7 @@ "Feminine Honorific markers.", "Non-specific Honorifc markers.", "", + "", "Facets.", "", "" @@ -99622,7 +99671,7 @@ "type": "object" }, "SecurityCredentialsPrincipalProto": { - "description": "A Principal represents something to which permissions are assigned, often but not always a user or group of some kind. It is most appropriate for use in ACLs and authorization checks. Callers should prefer to use the wrapper classes in google3/security/credentials/public/principal.h google3/java/com/google/security/credentials/Principal.java google3/security/credentials/go/principal.go unless direct proto access is essential. If you update this protocol buffer, please update the wrapper classes as well.", + "description": "A Principal represents something to which permissions are assigned, often but not always a user or group of some kind. It is most appropriate for use in ACLs and authorization checks. Callers should prefer to use the wrapper classes in google3/security/credentials/public/principal.h google3/java/com/google/security/credentials/Principal.java google3/security/credentials/go/principal.go unless direct proto access is essential. If you update this protocol buffer, please update the wrapper classes as well. LINT.IfChange", "id": "SecurityCredentialsPrincipalProto", "properties": { "allAuthenticatedUsers": { @@ -99797,7 +99846,7 @@ "type": "object" }, "SecurityCredentialsRbacRoleProto": { - "description": "Principal associated with a given RBAC role. This principal is used by Sphinx Provisioning Service for RBAC (go/cedi-auth) provisionable (go/sphinx-rbacz-design).", + "description": "Principal associated with a given RBAC role. This principal is used by Sphinx Provisioning Service for RBAC provisionable (go/sphinx-rbacz).", "id": "SecurityCredentialsRbacRoleProto", "properties": { "name": { @@ -99811,14 +99860,14 @@ "type": "string" }, "rbacRoleName": { - "description": "Format: \"RbacNamespaceName.RbacRoleName(/field=value)*\", e.g., \"hr.v1.Reader\", \"hr.v1.Reader/language=EN_US/country=USA/room=NYC-9th-11A201\".", + "description": "Format: \"role/z?\" - \"role\" is the Sphinx globally unique name of the Sphinx role that provisions the RBAC role. - \"/z?\" suffix indicates which Zanzibar environment stores the role membership data (\"/zd\": dev, \"/zs\": staging, \"/zp\": prod, \"/zt\": local test instance). Example: \"mysystem_myrole/zp\"", "type": "string" } }, "type": "object" }, "SecurityCredentialsRbacSubjectProto": { - "description": "Principal associated with a given RBAC subject. This principal is used by Sphinx Provisioning Service for RBAC (go/cedi-auth) provisionable (go/sphinx-rbacz-design).", + "description": "Principal associated with a given RBAC subject. This principal is used by Sphinx Provisioning Service for RBAC provisionable (go/sphinx-rbacz).", "id": "SecurityCredentialsRbacSubjectProto", "properties": { "username": { @@ -106605,6 +106654,10 @@ "APPS_PERSONALIZED_CATEGORICAL_GAME_SEEKING_QUERIES_EVENT_LEVEL", "APPS_PERSONALIZED_CATEGORICAL_NON_TG_QUERIES_EVENT_LEVEL", "APPS_PERSONALIZED_VERTICAL_RFY_CLUSTER_EVENT_LEVEL", + "APPS_PERSONALIZED_NAVIGATIONAL_EVENT_LEVEL", + "APPS_PERSONALIZED_NAVIGATIONAL_GAME_EVENT_LEVEL", + "APPS_PERSONALIZED_MDP_EVENT_LEVEL", + "APPS_PERSONALIZED_MDP_GAME_EVENT_LEVEL", "CDP_PROMOTIONAL_IMAGE_LOCALE_MATCH", "CDP_PROMOTIONAL_IMAGE_LOCALE_MISMATCH", "CDP_SCREENSHOT_LOCALE_MISMATCH", @@ -106777,6 +106830,7 @@ "MDP_P13N_GAME_QUERY_L9_EVENT_LEVEL", "SECOND_PASS_POLARIS_RERANKING_EVENT_LEVEL", "SECOND_PASS_POLARIS_WITH_RANKING_CHANGE_EVENT_LEVEL", + "EXPLORATORY_BOOSTING_EVENT_LEVEL", "EVENT_LEVEL_TEST_CODE_LIMIT", "RESERVED_4", "RESERVED_5", @@ -107047,6 +107101,10 @@ "APPS_PERSONALIZED_CATEGORICAL_GAME_SEEKING_QUERIES_SESSION_LEVEL", "APPS_PERSONALIZED_CATEGORICAL_NON_TG_QUERIES_SESSION_LEVEL", "APPS_PERSONALIZED_VERTICAL_RFY_CLUSTER_SESSION_LEVEL", + "APPS_PERSONALIZED_NAVIGATIONAL_SESSION_LEVEL", + "APPS_PERSONALIZED_NAVIGATIONAL_GAME_SESSION_LEVEL", + "APPS_PERSONALIZED_MDP_SESSION_LEVEL", + "APPS_PERSONALIZED_MDP_GAME_SESSION_LEVEL", "PLAY_STORE_SHOW_CART", "MOVIES_RENTER", "LOYALTY_HOME_FIRST_TAB_SESSION_LEVEL", @@ -107513,6 +107571,8 @@ "APPS_SEARCH_DISCOVERY_CLUSTER_TRIGGERED_SESSION_LEVEL", "SUGGEST_CROSS_FORM_FACTOR_APPS_WEAR_SUGGESTIONS_ENABLED", "SUGGEST_CROSS_FORM_FACTOR_APPS_WEAR_SUGGESTIONS_AVAILABLE", + "SUGGEST_CROSS_FORM_FACTOR_APPS_TV_SUGGESTIONS_ENABLED", + "SUGGEST_CROSS_FORM_FACTOR_APPS_TV_SUGGESTIONS_AVAILABLE", "SUGGEST_APPS_SUBTEXT_SUGGESTIONS_SESSION_LEVEL", "INLINE_DETAILS_TQUALITY_CHECK_PASS_SESSION_LEVEL", "INLINE_DETAILS_TQUALITY_CHECK_FAIL_SESSION_LEVEL", @@ -107700,6 +107760,8 @@ "YOUTUBE_FROM_LANDING_PAGE_SESSION_LEVEL", "SECOND_PASS_POLARIS_RERANKING_SESSION_LEVEL", "SECOND_PASS_POLARIS_WITH_RANKING_CHANGE_SESSION_LEVEL", + "EXPLORATORY_BOOSTING_SESSION_LEVEL", + "PLAY_BOOKS_READING_PROGRESS_TOOLTIP_SESSION_LEVEL", "SESSION_LEVEL_TEST_CODE_LIMIT", "SHOULD_SEE_LIVE_OP_CLUSTER_USER_LEVEL", "CART_ABANDONMENT_USER_LEVEL", @@ -107743,6 +107805,10 @@ "APPS_PERSONALIZED_CATEGORICAL_GAME_SEEKING_QUERIES_USER_LEVEL", "APPS_PERSONALIZED_CATEGORICAL_NON_TG_QUERIES_USER_LEVEL", "APPS_PERSONALIZED_VERTICAL_RFY_CLUSTER_USER_LEVEL", + "APPS_PERSONALIZED_NAVIGATIONAL_USER_LEVEL", + "APPS_PERSONALIZED_NAVIGATIONAL_GAME_USER_LEVEL", + "APPS_PERSONALIZED_MDP_USER_LEVEL", + "APPS_PERSONALIZED_MDP_GAME_USER_LEVEL", "SUBSCRIPTION_CANCELLATION_PROMOTION_USER_LEVEL", "SUBSCRIPTION_UPDATE_FOP_FOR_DCB_AS_PRIMARY_SIGNUP_USER_LEVEL", "SUBSCRIPTION_UPDATE_FOP_FOR_DCB_AS_PRIMARY_USER_LEVEL", @@ -108140,9 +108206,10 @@ "YOUTUBE_OPTED_IN_NOTIFICATION_DRIVEN_PREFETCH_USER_LEVEL", "PLAY_ONBOARDING_QUEST_GAMES_HOME_SERVER_USER_LEVEL", "PCH_O2_WITH_CRE_USER_LEVEL", - "MERCH_USER_JOURNEY_ROBLOX_SPEND_USER_LEVEL", + "MERCH_USER_JOURNEY_SPEND_USER_LEVEL", "PBUY_FINE_TUNING_WITH_TEXT_TREAT_USER_LEVEL", "PLAY_GAMES_ACHIEVEMENT_LOYALTY_QUEST_USER_LEVEL", + "PLAY_BOOKS_READING_PROGRESS_TOOLTIP_USER_LEVEL", "USER_LEVEL_TEST_CODE_LIMIT" ], "enumDescriptions": [ @@ -108298,6 +108365,10 @@ "", "", "", + "", + "", + "", + "", "Indicates triggering of Topic RFY cluster", "Triggered Mini Topcharts in apps search.", "", @@ -108455,6 +108526,7 @@ "", "Second pass polaris reranking event level.", "Second pass polaris with ranking change event level.", + "Exploratory boosting event level.", "", "", "", @@ -108727,6 +108799,10 @@ "", "", "", + "", + "", + "", + "", "User visited the first tab of Loyalty Home.", "User visited the second tab of Loyalty Home.", "User visited the third tab of Loyalty Home.", @@ -109191,6 +109267,8 @@ "Session level test code that indicates that an apps discovery cluster was triggered on the search page.", "Session level test code that indicates that cross form factor wear Suggestion is enabled. b/222328256 for more details.", "Session level test code that indicates that at least one cross form factor wear suggestion is available. b/222328256 for more details.", + "Session level test code that indicates that cross form factor tv Suggestion is enabled. b/257494005 for more details.", + "Session level test code that indicates that at least one cross form factor tv suggestion is available. b/257494005 for more details.", "Session level test code that indicates the subtext is triggered for that group of suggestions. Could either be for XFF Cat, Nav or legacy subtext.", "Session level test codes containing result of tQuality lookup during market details url matching. A failed tQuality result suppresses inline details.", "", @@ -109378,6 +109456,8 @@ "", "Second pass polaris reranking session level.", "Second pass polaris with ranking change session level.", + "Exploratory boosting session level.", + "Session level test code for reading progress tooltip.", "", "User should see the live op cluster.", "Cart abandonment flow for purchase flow.", @@ -109421,6 +109501,10 @@ "", "", "", + "", + "", + "", + "", "Subscription cancellation flow for purchase flow per user.", "Subscription update fop flow at signup when the primary fop", "is dcb. Subscription update fop flow when the primary fop is dcb.", @@ -109818,9 +109902,10 @@ "User level test code for YouTube commerce, tracking users who opted in notification driven prefetch.", "User level test code for Play Onboarding quest, tracking users who are eligible for Play Onboarding quest in Games Home. This test code is logged on the server side.", "User level test code for tracking users who are being shown PersistentCartHeader through purchase flow. This test code is logged on the server side.", - "User level test code for Merch user journey roblox spend experiment. This test code is logged on the server side.", + "User level test code for Merch user journey experiment. This test code is logged on the Growth Engine server side.", "User level test code for new uplift modeling architecture with campaign features in treatment tower.", "User level test code for Non-Play Growth Events experiment (go/npge-prd). Logged on the server side and applied to users that visit Loyalty Home and are eligible to receive a quest with Play Games Achievement tasks, regardless of whether the quest was shown or held back.", + "User level test code for reading progress tooltip.", "" ], "type": "string" @@ -113461,7 +113546,7 @@ "type": "object" }, "VideoContentSearchVideoAnchorScoreInfo": { - "description": "Message to contain scoring / debugging information. If you want to add information which is not directly used in the final VideoAnchor data, it should be put here. Next ID: 25", + "description": "Message to contain scoring / debugging information. If you want to add information which is not directly used in the final VideoAnchor data, it should be put here. Next ID: 27", "id": "VideoContentSearchVideoAnchorScoreInfo", "properties": { "anchorCommonFeatureSet": { @@ -113472,6 +113557,10 @@ "$ref": "Proto2BridgeMessageSet", "description": "Additional attachments which extend MessageSet." }, + "babelCheckpointPath": { + "description": "The path to the particular babel checkpoint", + "type": "string" + }, "captionEntityAnchorFeatures": { "$ref": "VideoContentSearchCaptionEntityAnchorFeatures", "description": "Training features and debug info for caption entity anchors." @@ -113536,6 +113625,14 @@ "$ref": "VideoContentSearchMultimodalTopicTrainingFeatures", "description": "Features for a generated topic used to build training data for multimodal topics." }, + "normalizedBabelEmbedding": { + "description": "Normalized babel embedding of anchor.label(). If the label has more than one sentences, the embedding will be the averaged normalized embedding of each sentence.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, "ocrAnchorFeature": { "$ref": "VideoContentSearchOnScreenTextFeature", "description": "OCR anchor features." @@ -125748,7 +125845,7 @@ "type": "object" }, "YoutubeCommentsClusteringMiniStanza": { - "description": "Intended to be simpler to work with than the ExportedStanza it's derived from See documentation: https://g3doc.corp.google.com/company/teams/youtube/community_intelligence/eng_resources/data_sources.md#ministanza Next available: 75", + "description": "Intended to be simpler to work with than the ExportedStanza it's derived from See documentation: https://g3doc.corp.google.com/company/teams/youtube/community_intelligence/eng_resources/data_sources.md#ministanza Next available: 76", "id": "YoutubeCommentsClusteringMiniStanza", "properties": { "ansibleScores": { @@ -126281,6 +126378,10 @@ "format": "double", "type": "number" }, + "ytAuthorChannelId": { + "description": "The youtube channel id of the comment author.", + "type": "string" + }, "ytCommentQualityScore": { "description": "Existing quality corpus scores.", "format": "double", diff --git a/contentwarehouse/v1/contentwarehouse-gen.go b/contentwarehouse/v1/contentwarehouse-gen.go index f09f303e481..b6f101d0029 100644 --- a/contentwarehouse/v1/contentwarehouse-gen.go +++ b/contentwarehouse/v1/contentwarehouse-gen.go @@ -3127,6 +3127,10 @@ type AppsPeopleOzExternalMergedpeopleapiAffinity struct { // "DRIVE_SEARCH_FILTER_AFFINITY" // "CULTURE_EVENTS_CALENDAR_AFFINITY" // "DATABRIDGE_CONSOLE_AFFINITY" + // "COMMSTAR_AFFINITY" + // "CDDB_AFFINITY" + // "DATA_STUDIO_SPACES_AFFINITY" + // "SOJI_AFFINITY" AffinityType string `json:"affinityType,omitempty"` // ContainerId: The ID of the container @@ -7337,6 +7341,8 @@ type AppsPeopleOzExternalMergedpeopleapiPerson struct { // containers. ReadOnlyProfileInfo []*AppsPeopleOzExternalMergedpeopleapiReadOnlyProfileInfo `json:"readOnlyProfileInfo,omitempty"` + // Relation: See go/relation-vs-relationship for relation vs + // relationship explanation. Relation []*AppsPeopleOzExternalMergedpeopleapiRelation `json:"relation,omitempty"` // RelationshipInterest: DEPRECATED. No data is returned for this field @@ -9120,10 +9126,11 @@ func (s *AppsPeopleOzExternalMergedpeopleapiReadOnlyProfileInfoDomainInfo) Marsh } // AppsPeopleOzExternalMergedpeopleapiRelation: Relation stores the -// related person between the contact or profile and a third person This -// field currently includes RelationshipToMe data in fields value and -// canonical_value for ContainerType CONTACT_ANNOTATION. This will be -// moved to RelationshipToMe in b/221081499. +// related person between the contact or profile and a third person. See +// go/relation-vs-relationship for relation vs relationship explanation. +// This field currently includes RelationshipToMe data in fields value +// and canonical_value for ContainerType CONTACT_ANNOTATION. This will +// be moved to RelationshipToMe in b/221081499. type AppsPeopleOzExternalMergedpeopleapiRelation struct { // CanonicalValue: Canonicalized `value` of the relation from this // person to the user. This is currently used for data from contact @@ -14962,7 +14969,9 @@ func (s *AssistantApiLensPerceptionCapabilitiesLensCapabilitiesText) MarshalJSON // Translation capability. type AssistantApiLensPerceptionCapabilitiesLensCapabilitiesTranslate struct { // SupportedLanguageTags: The list of language IETF BCP 47 tags that are - // supported. See the full list at go/androidlanguages. + // supported. See the full details in the comment on the equivalent + // field in: + // http://google3/java/com/google/android/apps/gsa/search/shared/service/proto/lens_service_event.proto;l=55;rcl=355512559 SupportedLanguageTags []string `json:"supportedLanguageTags,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -24766,7 +24775,8 @@ type AssistantVerticalsHomeautomationProtoCommonStructureBasedRoutine struct { // "UNDEFINED" // "CURATED" // "ALARM" - // "CUSTOM" - SCHEDULED = 3 [deprecated = true]; + // "CUSTOM" + // "CUSTOM_SCRIPT" - SCHEDULED = 3 [deprecated = true]; Type string `json:"type,omitempty"` // UiPayload: UI format payload primarily for external team use. @@ -31621,6 +31631,8 @@ type DrishtiVesperThumbnail struct { // FirstFrameThumbnailer) // "VERSION_CUSTOM" - Custom image (not generated). Likely client // provided. + // "VERSION_REJECTED" - A gray fallback image for images that have + // been rejected. ThumbnailerModelVersion string `json:"thumbnailerModelVersion,omitempty"` // TimestampMs: Thumbnail timestamp in milliseconds. @@ -37161,7 +37173,8 @@ type GeostoreDataSourceProto struct { // "PROVIDER_VATTENFALL" // "PROVIDER_VIETGIS" // "PROVIDER_UNITE" - // "PROVIDER_NEOGY" - Note: Next available value is 0x126F. + // "PROVIDER_NEOGY" + // "PROVIDER_AMPUP" - Note: Next available value is 0x1270. Provider string `json:"provider,omitempty"` // RawMetadata: For every key that is used in raw_data from this source, @@ -41567,7 +41580,8 @@ type GeostoreInternalSourceSummaryProto struct { // "PROVIDER_VATTENFALL" // "PROVIDER_VIETGIS" // "PROVIDER_UNITE" - // "PROVIDER_NEOGY" - Note: Next available value is 0x126F. + // "PROVIDER_NEOGY" + // "PROVIDER_AMPUP" - Note: Next available value is 0x1270. Provider string `json:"provider,omitempty"` // ForceSendFields is a list of field names (e.g. "Dataset") to @@ -43734,7 +43748,8 @@ type GeostoreOntologyRawGConceptInstanceProto struct { // "PROVIDER_VATTENFALL" // "PROVIDER_VIETGIS" // "PROVIDER_UNITE" - // "PROVIDER_NEOGY" - Note: Next available value is 0x126F. + // "PROVIDER_NEOGY" + // "PROVIDER_AMPUP" - Note: Next available value is 0x1270. Provider string `json:"provider,omitempty"` SourceDataset string `json:"sourceDataset,omitempty"` @@ -46273,7 +46288,8 @@ type GeostoreProvenanceProto struct { // "PROVIDER_VATTENFALL" // "PROVIDER_VIETGIS" // "PROVIDER_UNITE" - // "PROVIDER_NEOGY" - Note: Next available value is 0x126F. + // "PROVIDER_NEOGY" + // "PROVIDER_AMPUP" - Note: Next available value is 0x1270. Provider string `json:"provider,omitempty"` // ForceSendFields is a list of field names (e.g. "Dataset") to @@ -53277,7 +53293,7 @@ type GoogleCloudContentwarehouseV1AccessControlAction struct { // OperationType: Identifies the type of operation. // // Possible values: - // "UNKNOWN" + // "UNKNOWN" - The unknown operation type. // "ADD_POLICY_BINDING" - Adds newly given policy bindings in the // existing bindings list. // "REMOVE_POLICY_BINDING" - Removes newly given policy bindings from @@ -53403,7 +53419,7 @@ type GoogleCloudContentwarehouseV1ActionOutput struct { // ActionState: State of an action. // // Possible values: - // "UNKNOWN" + // "UNKNOWN" - The unknown state. // "ACTION_SUCCEEDED" - State indicating action executed successfully. // "ACTION_FAILED" - State indicating action failed. // "ACTION_TIMED_OUT" - State indicating action timed out. @@ -53553,7 +53569,7 @@ type GoogleCloudContentwarehouseV1CreateDocumentRequest struct { // CreateMask: Field mask for creating Document fields. If mask path is // empty, it means all fields are masked. For the `FieldMask` // definition, see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. CreateMask string `json:"createMask,omitempty"` // Document: Required. The document to create. @@ -53829,10 +53845,6 @@ func (s *GoogleCloudContentwarehouseV1DeleteDocumentRequest) MarshalJSON() ([]by // GoogleCloudContentwarehouseV1Document: Defines the structure for // content warehouse document proto. type GoogleCloudContentwarehouseV1Document struct { - // AsyncEnabled: If true, makes the document visible to asynchronous - // policies and rules. - AsyncEnabled bool `json:"asyncEnabled,omitempty"` - // CloudAiDocument: Document AI format to save the structured content, // including OCR. CloudAiDocument *GoogleCloudDocumentaiV1Document `json:"cloudAiDocument,omitempty"` @@ -53912,9 +53924,11 @@ type GoogleCloudContentwarehouseV1Document struct { // performed. TextExtractionDisabled bool `json:"textExtractionDisabled,omitempty"` - // Title: Title that describes the document. This is usually present in - // the top section of the document, and is a mandatory field for the - // question-answering feature. + // TextExtractionEnabled: If true, text extraction will be performed. + TextExtractionEnabled bool `json:"textExtractionEnabled,omitempty"` + + // Title: Title that describes the document. This can be the top heading + // or text that describes the document. Title string `json:"title,omitempty"` // UpdateTime: Output only. The time when the document is last updated. @@ -53927,7 +53941,7 @@ type GoogleCloudContentwarehouseV1Document struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AsyncEnabled") to + // ForceSendFields is a list of field names (e.g. "CloudAiDocument") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -53935,12 +53949,13 @@ type GoogleCloudContentwarehouseV1Document struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncEnabled") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CloudAiDocument") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -55636,7 +55651,7 @@ type GoogleCloudContentwarehouseV1Rule struct { // TriggerType: Identifies the trigger type for running the policy. // // Possible values: - // "UNKNOWN" + // "UNKNOWN" - Trigger for unknown action. // "ON_CREATE" - Trigger for create document action. // "ON_UPDATE" - Trigger for update document action. TriggerType string `json:"triggerType,omitempty"` @@ -55889,16 +55904,16 @@ type GoogleCloudContentwarehouseV1SearchDocumentsRequest struct { // service. RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` - // RequireTotalSize: Optional. Controls if the search document request - // requires the return of a total size of matched documents. See + // RequireTotalSize: Controls if the search document request requires + // the return of a total size of matched documents. See // SearchDocumentsResponse.total_size. Enabling this flag may adversely // impact performance. Hint: If this is used with pagination, set this // flag on the initial query but set this to false on subsequent page // calls (keep the total count locally). Defaults to false. RequireTotalSize bool `json:"requireTotalSize,omitempty"` - // TotalResultSize: Optional. Controls if the search document request - // requires the return of a total size of matched documents. See + // TotalResultSize: Controls if the search document request requires the + // return of a total size of matched documents. See // SearchDocumentsResponse.total_size. // // Possible values: @@ -56522,6 +56537,7 @@ func (s *GoogleCloudContentwarehouseV1UpdateRuleSetRequest) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudContentwarehouseV1UserInfo: The user information. type GoogleCloudContentwarehouseV1UserInfo struct { // GroupIds: The unique group identifications which the user is belong // to. The format is "group:yyyy@example.com"; @@ -65179,8 +65195,14 @@ func (s *ImageRegionsImageRegions) UnmarshalJSON(data []byte) error { return nil } -// ImageRepositoryAmarnaCloudSpeechSignals: Next Tag: 7 +// ImageRepositoryAmarnaCloudSpeechSignals: Next Tag: 8 type ImageRepositoryAmarnaCloudSpeechSignals struct { + // DuplicateOfYtS3Asr: If this field is set to true, it means that + // Youtube already processed the ASR from S3 for the langID. Please find + // the ASR result from transcript_asr in + // google3/image/repository/proto/video_search.proto instead. + DuplicateOfYtS3Asr bool `json:"duplicateOfYtS3Asr,omitempty"` + // LangWithoutLocale: The language id input for creating this ASR // without regional info. Same format as in go/ytlangid. This field is // populated in Kronos Amarna Cloud Speech operator and passed to @@ -65198,7 +65220,7 @@ type ImageRepositoryAmarnaCloudSpeechSignals struct { // this field is derived from the SpeechRecognitionResult field above. TranscriptAsr *PseudoVideoData `json:"transcriptAsr,omitempty"` - // ForceSendFields is a list of field names (e.g. "LangWithoutLocale") + // ForceSendFields is a list of field names (e.g. "DuplicateOfYtS3Asr") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -65206,7 +65228,7 @@ type ImageRepositoryAmarnaCloudSpeechSignals struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LangWithoutLocale") to + // NullFields is a list of field names (e.g. "DuplicateOfYtS3Asr") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -75127,7 +75149,7 @@ func (s *KnowledgeAnswersIntentQueryFunctionCall) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// KnowledgeAnswersIntentQueryFunctionCallSignals: Next ID: 34 +// KnowledgeAnswersIntentQueryFunctionCallSignals: Next ID: 35 type KnowledgeAnswersIntentQueryFunctionCallSignals struct { // ArgumentComposingMid: The argument mid that was used to compose the // entity for a concept interpretation, along with the @@ -75213,6 +75235,10 @@ type KnowledgeAnswersIntentQueryFunctionCallSignals struct { // ambiguous SystemUncertain intent go/intent-disambiguation. IsDisambiguationIntent bool `json:"isDisambiguationIntent,omitempty"` + // IsNeuralCategoricalInterpretation: Whether the interpretation was + // generated from the neural categorical parser. + IsNeuralCategoricalInterpretation bool `json:"isNeuralCategoricalInterpretation,omitempty"` + // IsUiCompositionIntent: Denotes this is a sub-intent used for // composing an Assistant UI response. The assistant dialog should // output ui_composition_shelf in the SystemResponse if it can fulfill @@ -90818,6 +90844,7 @@ type NlpSemanticParsingModelsMediaMediaAnnotation struct { // "DIRECTOR" - TV or film director. (e.g. "James Cameron"). // "ACTOR" - Actor: TV, film actor etc. (e.g. "Tom Cruise"). // "MOVIE_SERIES" - Movie series. (e.g. "Home Alone"). + // "APP" - Used for App. ContentType string `json:"contentType,omitempty"` // Image: Images of the media. @@ -97723,6 +97750,7 @@ type PeoplestackFlexorgsProtoInternalExternal struct { // "DATABRIDGE_CONSOLE" - Databridge Console Team contact: // databrige-eng@google.com // "COMMSTAR" - Commstar Team contact: mdb.commstar-dev@google.com + // "CDDB" - Cddb Team contact: cddb-dev-team@google.com // "DEPRECATED_QUICKSTART_FLUME" // "DUO_CLIENT" - Duo Client Team contact: duo-eng@google.com // "ALBERT" - Project albert (go/albert-frontend) Team contact: @@ -99729,6 +99757,12 @@ type PhotosAnimationMetadata struct { // not animated), the duration will be 0. DurationMs int64 `json:"durationMs,omitempty,string"` + // LoopCount: The number of times the animation plays. If 0, the + // animation will loop indefinitely. If positive, this number includes + // the initial playthrough. For example, a value of 3 means that each + // frame is shown 3 times. + LoopCount int64 `json:"loopCount,omitempty"` + NumFrames int64 `json:"numFrames,omitempty,string"` // ForceSendFields is a list of field names (e.g. "DurationMs") to @@ -106804,12 +106838,16 @@ func (s *QualityPreviewChosenSnippetInfoTidbitInfo) MarshalJSON() ([]byte, error } // QualityPreviewRanklabSnippet: Snippet candidate related information -// and signal scores. Next ID: 11 +// and signal scores. This message is used for both snippet scoring and +// ranklab features recording. Next ID: 12 ================== Features +// populated in production ======================= type QualityPreviewRanklabSnippet struct { + // BrainFeatures: Features from SnippetFlow in Superroot. BrainFeatures *QualityPreviewSnippetBrainFeatures `json:"brainFeatures,omitempty"` DocumentFeatures *QualityPreviewSnippetDocumentFeatures `json:"documentFeatures,omitempty"` + // ExperimentalFeatures: For experimental usage, not populated yet. ExperimentalFeatures *QualityPreviewSnippetExperimentalFeatures `json:"experimentalFeatures,omitempty"` // FinalScore: The final score of this candidate. @@ -106832,6 +106870,9 @@ type QualityPreviewRanklabSnippet struct { // features. QueryTermCoverageFeatures *QualityPreviewSnippetQueryTermCoverageFeatures `json:"queryTermCoverageFeatures,omitempty"` + // RadishFeatures: Radish related information. + RadishFeatures *QualityPreviewSnippetRadishFeatures `json:"radishFeatures,omitempty"` + // SnippetInfo: Information to identify current chosen snippet. SnippetInfo *QualityPreviewChosenSnippetInfo `json:"snippetInfo,omitempty"` @@ -109848,7 +109889,7 @@ func (s *QualityShoppingShoppingAttachmentOffer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// QualityShoppingShoppingAttachmentPBlock: Next ID: 15 +// QualityShoppingShoppingAttachmentPBlock: Next ID: 18 type QualityShoppingShoppingAttachmentPBlock struct { // FullTitle: Field full_title may contain duplicate info from title and // list_title. @@ -110001,6 +110042,10 @@ type QualityShoppingShoppingAttachmentProduct struct { // ShoppingAnnotation.Product RelevanceEmbedding []*QualityRankembedMustangMustangRankEmbedInfo `json:"relevanceEmbedding,omitempty"` + // WeakGlobalProductClusterId: Matched/Inferred weak product identity - + // set only if the global_product_cluster_id is missing + WeakGlobalProductClusterId uint64 `json:"weakGlobalProductClusterId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "AggregateRating") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -113502,12 +113547,6 @@ type RepositoryWebrefDetailedEntityScores struct { NbScore float64 `json:"nbScore,omitempty"` - // NewConfidenceExperimentalDontUse: Experimental. This is used for - // doing experiments only. For example, new entity confidence can be - // populated here to experiment with replacing the one re-computed by - // NewAnnotationConfidence(). - NewConfidenceExperimentalDontUse float64 `json:"newConfidenceExperimentalDontUse,omitempty"` - // NewsTopicalityScore: DEPRECATED: this field is no longer set. As of // early June 2018 it is referenced in hundreds of test files and is // difficult to remove from the code base. @@ -113559,17 +113598,16 @@ func (s *RepositoryWebrefDetailedEntityScores) MarshalJSON() ([]byte, error) { func (s *RepositoryWebrefDetailedEntityScores) UnmarshalJSON(data []byte) error { type NoMethod RepositoryWebrefDetailedEntityScores var s1 struct { - AnchorScore gensupport.JSONFloat64 `json:"anchorScore"` - BodyScore gensupport.JSONFloat64 `json:"bodyScore"` - Connectedness gensupport.JSONFloat64 `json:"connectedness"` - DocScore gensupport.JSONFloat64 `json:"docScore"` - GeoTopicNormalizedScore gensupport.JSONFloat64 `json:"geoTopicNormalizedScore"` - LocalEntityLocationConfidence gensupport.JSONFloat64 `json:"localEntityLocationConfidence"` - NbScore gensupport.JSONFloat64 `json:"nbScore"` - NewConfidenceExperimentalDontUse gensupport.JSONFloat64 `json:"newConfidenceExperimentalDontUse"` - NewsTopicalityScore gensupport.JSONFloat64 `json:"newsTopicalityScore"` - NormalizedTopicality gensupport.JSONFloat64 `json:"normalizedTopicality"` - RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + AnchorScore gensupport.JSONFloat64 `json:"anchorScore"` + BodyScore gensupport.JSONFloat64 `json:"bodyScore"` + Connectedness gensupport.JSONFloat64 `json:"connectedness"` + DocScore gensupport.JSONFloat64 `json:"docScore"` + GeoTopicNormalizedScore gensupport.JSONFloat64 `json:"geoTopicNormalizedScore"` + LocalEntityLocationConfidence gensupport.JSONFloat64 `json:"localEntityLocationConfidence"` + NbScore gensupport.JSONFloat64 `json:"nbScore"` + NewsTopicalityScore gensupport.JSONFloat64 `json:"newsTopicalityScore"` + NormalizedTopicality gensupport.JSONFloat64 `json:"normalizedTopicality"` + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` *NoMethod } s1.NoMethod = (*NoMethod)(s) @@ -113583,7 +113621,6 @@ func (s *RepositoryWebrefDetailedEntityScores) UnmarshalJSON(data []byte) error s.GeoTopicNormalizedScore = float64(s1.GeoTopicNormalizedScore) s.LocalEntityLocationConfidence = float64(s1.LocalEntityLocationConfidence) s.NbScore = float64(s1.NbScore) - s.NewConfidenceExperimentalDontUse = float64(s1.NewConfidenceExperimentalDontUse) s.NewsTopicalityScore = float64(s1.NewsTopicalityScore) s.NormalizedTopicality = float64(s1.NormalizedTopicality) s.RelevanceScore = float64(s1.RelevanceScore) @@ -116055,6 +116092,7 @@ type RepositoryWebrefLexicalRange struct { // some other range. // "TARGET_AUDIENCE" - Facets. // "TARGET_PURPOSE" + // "SETTING_BY_LOCATION" Category string `json:"category,omitempty"` // Direction: Direction defines the relation between the measurable @@ -116255,9 +116293,10 @@ type RepositoryWebrefLightweightTokensMatchedLightweightToken struct { // "FEMININE_HONORIFIC" - Feminine Honorific markers. // "GENERIC_HONORIFIC" - Non-specific Honorifc markers. // "NEGATIVE_SUPERLATIVE" + // "SUPERLATIVE" // "FACET_AUDIENCE" - Facets. // "FACET_PURPOSE" - // "SUPERLATIVE" + // "FACET_SETTING_BY_LOCATION" Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -126254,7 +126293,7 @@ func (s *SecurityCredentialsPostiniUserProto) MarshalJSON() ([]byte, error) { // google3/java/com/google/security/credentials/Principal.java // google3/security/credentials/go/principal.go unless direct proto // access is essential. If you update this protocol buffer, please -// update the wrapper classes as well. +// update the wrapper classes as well. LINT.IfChange type SecurityCredentialsPrincipalProto struct { // AllAuthenticatedUsers: scope = ALL_AUTHENTICATED_USERS AllAuthenticatedUsers *SecurityCredentialsAllAuthenticatedUsersProto `json:"allAuthenticatedUsers,omitempty"` @@ -126395,7 +126434,7 @@ func (s *SecurityCredentialsPrincipalProto) MarshalJSON() ([]byte, error) { // SecurityCredentialsRbacRoleProto: Principal associated with a given // RBAC role. This principal is used by Sphinx Provisioning Service for -// RBAC (go/cedi-auth) provisionable (go/sphinx-rbacz-design). +// RBAC provisionable (go/sphinx-rbacz). type SecurityCredentialsRbacRoleProto struct { Name string `json:"name,omitempty"` @@ -126404,10 +126443,11 @@ type SecurityCredentialsRbacRoleProto struct { // RbacNamespace: DEPRECATED as of 01.11.2019 RbacNamespace string `json:"rbacNamespace,omitempty"` - // RbacRoleName: Format: - // "RbacNamespaceName.RbacRoleName(/field=value)*", e.g., - // "hr.v1.Reader", - // "hr.v1.Reader/language=EN_US/country=USA/room=NYC-9th-11A201". + // RbacRoleName: Format: "role/z?" - "role" is the Sphinx globally + // unique name of the Sphinx role that provisions the RBAC role. - "/z?" + // suffix indicates which Zanzibar environment stores the role + // membership data ("/zd": dev, "/zs": staging, "/zp": prod, "/zt": + // local test instance). Example: "mysystem_myrole/zp" RbacRoleName string `json:"rbacRoleName,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to @@ -126435,8 +126475,7 @@ func (s *SecurityCredentialsRbacRoleProto) MarshalJSON() ([]byte, error) { // SecurityCredentialsRbacSubjectProto: Principal associated with a // given RBAC subject. This principal is used by Sphinx Provisioning -// Service for RBAC (go/cedi-auth) provisionable -// (go/sphinx-rbacz-design). +// Service for RBAC provisionable (go/sphinx-rbacz). type SecurityCredentialsRbacSubjectProto struct { // Username: Format "username" without "@domain", e.g., "bogdand". Username string `json:"username,omitempty"` @@ -136397,6 +136436,10 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "APPS_PERSONALIZED_CATEGORICAL_GAME_SEEKING_QUERIES_EVENT_LEVEL" // "APPS_PERSONALIZED_CATEGORICAL_NON_TG_QUERIES_EVENT_LEVEL" // "APPS_PERSONALIZED_VERTICAL_RFY_CLUSTER_EVENT_LEVEL" + // "APPS_PERSONALIZED_NAVIGATIONAL_EVENT_LEVEL" + // "APPS_PERSONALIZED_NAVIGATIONAL_GAME_EVENT_LEVEL" + // "APPS_PERSONALIZED_MDP_EVENT_LEVEL" + // "APPS_PERSONALIZED_MDP_GAME_EVENT_LEVEL" // "CDP_PROMOTIONAL_IMAGE_LOCALE_MATCH" // "CDP_PROMOTIONAL_IMAGE_LOCALE_MISMATCH" // "CDP_SCREENSHOT_LOCALE_MISMATCH" @@ -136642,6 +136685,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // reranking event level. // "SECOND_PASS_POLARIS_WITH_RANKING_CHANGE_EVENT_LEVEL" - Second pass // polaris with ranking change event level. + // "EXPLORATORY_BOOSTING_EVENT_LEVEL" - Exploratory boosting event + // level. // "EVENT_LEVEL_TEST_CODE_LIMIT" // "RESERVED_4" // "RESERVED_5" @@ -136965,6 +137010,10 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "APPS_PERSONALIZED_CATEGORICAL_GAME_SEEKING_QUERIES_SESSION_LEVEL" // "APPS_PERSONALIZED_CATEGORICAL_NON_TG_QUERIES_SESSION_LEVEL" // "APPS_PERSONALIZED_VERTICAL_RFY_CLUSTER_SESSION_LEVEL" + // "APPS_PERSONALIZED_NAVIGATIONAL_SESSION_LEVEL" + // "APPS_PERSONALIZED_NAVIGATIONAL_GAME_SESSION_LEVEL" + // "APPS_PERSONALIZED_MDP_SESSION_LEVEL" + // "APPS_PERSONALIZED_MDP_GAME_SESSION_LEVEL" // "PLAY_STORE_SHOW_CART" // "MOVIES_RENTER" // "LOYALTY_HOME_FIRST_TAB_SESSION_LEVEL" - User visited the first tab @@ -137562,6 +137611,12 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "SUGGEST_CROSS_FORM_FACTOR_APPS_WEAR_SUGGESTIONS_AVAILABLE" - // Session level test code that indicates that at least one cross form // factor wear suggestion is available. b/222328256 for more details. + // "SUGGEST_CROSS_FORM_FACTOR_APPS_TV_SUGGESTIONS_ENABLED" - Session + // level test code that indicates that cross form factor tv Suggestion + // is enabled. b/257494005 for more details. + // "SUGGEST_CROSS_FORM_FACTOR_APPS_TV_SUGGESTIONS_AVAILABLE" - Session + // level test code that indicates that at least one cross form factor tv + // suggestion is available. b/257494005 for more details. // "SUGGEST_APPS_SUBTEXT_SUGGESTIONS_SESSION_LEVEL" - Session level // test code that indicates the subtext is triggered for that group of // suggestions. Could either be for XFF Cat, Nav or legacy subtext. @@ -137878,6 +137933,10 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // reranking session level. // "SECOND_PASS_POLARIS_WITH_RANKING_CHANGE_SESSION_LEVEL" - Second // pass polaris with ranking change session level. + // "EXPLORATORY_BOOSTING_SESSION_LEVEL" - Exploratory boosting session + // level. + // "PLAY_BOOKS_READING_PROGRESS_TOOLTIP_SESSION_LEVEL" - Session level + // test code for reading progress tooltip. // "SESSION_LEVEL_TEST_CODE_LIMIT" // "SHOULD_SEE_LIVE_OP_CLUSTER_USER_LEVEL" - User should see the live // op cluster. @@ -137969,6 +138028,10 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "APPS_PERSONALIZED_CATEGORICAL_GAME_SEEKING_QUERIES_USER_LEVEL" // "APPS_PERSONALIZED_CATEGORICAL_NON_TG_QUERIES_USER_LEVEL" // "APPS_PERSONALIZED_VERTICAL_RFY_CLUSTER_USER_LEVEL" + // "APPS_PERSONALIZED_NAVIGATIONAL_USER_LEVEL" + // "APPS_PERSONALIZED_NAVIGATIONAL_GAME_USER_LEVEL" + // "APPS_PERSONALIZED_MDP_USER_LEVEL" + // "APPS_PERSONALIZED_MDP_GAME_USER_LEVEL" // "SUBSCRIPTION_CANCELLATION_PROMOTION_USER_LEVEL" - Subscription // cancellation flow for purchase flow per user. // "SUBSCRIPTION_UPDATE_FOP_FOR_DCB_AS_PRIMARY_SIGNUP_USER_LEVEL" - @@ -138535,9 +138598,9 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "PCH_O2_WITH_CRE_USER_LEVEL" - User level test code for tracking // users who are being shown PersistentCartHeader through purchase flow. // This test code is logged on the server side. - // "MERCH_USER_JOURNEY_ROBLOX_SPEND_USER_LEVEL" - User level test code - // for Merch user journey roblox spend experiment. This test code is - // logged on the server side. + // "MERCH_USER_JOURNEY_SPEND_USER_LEVEL" - User level test code for + // Merch user journey experiment. This test code is logged on the Growth + // Engine server side. // "PBUY_FINE_TUNING_WITH_TEXT_TREAT_USER_LEVEL" - User level test // code for new uplift modeling architecture with campaign features in // treatment tower. @@ -138546,6 +138609,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // the server side and applied to users that visit Loyalty Home and are // eligible to receive a quest with Play Games Achievement tasks, // regardless of whether the quest was shown or held back. + // "PLAY_BOOKS_READING_PROGRESS_TOOLTIP_USER_LEVEL" - User level test + // code for reading progress tooltip. // "USER_LEVEL_TEST_CODE_LIMIT" TestCode []string `json:"testCode,omitempty"` @@ -143954,7 +144019,7 @@ func (s *VideoContentSearchVideoAnchorRatingScore) UnmarshalJSON(data []byte) er // VideoContentSearchVideoAnchorScoreInfo: Message to contain scoring / // debugging information. If you want to add information which is not // directly used in the final VideoAnchor data, it should be put here. -// Next ID: 25 +// Next ID: 27 type VideoContentSearchVideoAnchorScoreInfo struct { // AnchorCommonFeatureSet: Common features for any anchor types. AnchorCommonFeatureSet *VideoContentSearchAnchorCommonFeatureSet `json:"anchorCommonFeatureSet,omitempty"` @@ -143962,6 +144027,9 @@ type VideoContentSearchVideoAnchorScoreInfo struct { // Attachments: Additional attachments which extend MessageSet. Attachments *Proto2BridgeMessageSet `json:"attachments,omitempty"` + // BabelCheckpointPath: The path to the particular babel checkpoint + BabelCheckpointPath string `json:"babelCheckpointPath,omitempty"` + // CaptionEntityAnchorFeatures: Training features and debug info for // caption entity anchors. CaptionEntityAnchorFeatures *VideoContentSearchCaptionEntityAnchorFeatures `json:"captionEntityAnchorFeatures,omitempty"` @@ -144013,6 +144081,11 @@ type VideoContentSearchVideoAnchorScoreInfo struct { // to build training data for multimodal topics. MultimodalTopicTrainingFeatures *VideoContentSearchMultimodalTopicTrainingFeatures `json:"multimodalTopicTrainingFeatures,omitempty"` + // NormalizedBabelEmbedding: Normalized babel embedding of + // anchor.label(). If the label has more than one sentences, the + // embedding will be the averaged normalized embedding of each sentence. + NormalizedBabelEmbedding []float64 `json:"normalizedBabelEmbedding,omitempty"` + // OcrAnchorFeature: OCR anchor features. OcrAnchorFeature *VideoContentSearchOnScreenTextFeature `json:"ocrAnchorFeature,omitempty"` @@ -153669,7 +153742,7 @@ func (s *YoutubeBackstageSuperVodCommentInfo) MarshalJSON() ([]byte, error) { // YoutubeCommentsClusteringMiniStanza: Intended to be simpler to work // with than the ExportedStanza it's derived from See documentation: // https://g3doc.corp.google.com/company/teams/youtube/community_intelligence/eng_resources/data_sources.md#ministanza -// Next available: 75 +// Next available: 76 type YoutubeCommentsClusteringMiniStanza struct { // AnsibleScores: TnS Ansible scores map. Keyed by various model names. AnsibleScores map[string]float64 `json:"ansibleScores,omitempty"` @@ -154048,6 +154121,9 @@ type YoutubeCommentsClusteringMiniStanza struct { // WordEntropy: Word entropy of the comment. WordEntropy float64 `json:"wordEntropy,omitempty"` + // YtAuthorChannelId: The youtube channel id of the comment author. + YtAuthorChannelId string `json:"ytAuthorChannelId,omitempty"` + // YtCommentQualityScore: Existing quality corpus scores. YtCommentQualityScore float64 `json:"ytCommentQualityScore,omitempty"` diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index c4168fdf579..ac07d3f92ea 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -2240,7 +2240,7 @@ } } }, - "revision": "20221128", + "revision": "20221206", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -4744,7 +4744,8 @@ "GCS_WRITE_FOLDER", "PUBSUB_TOPIC", "PUBSUB_SUBSCRIPTION", - "BIGQUERY_TABLE" + "BIGQUERY_TABLE", + "JAVASCRIPT_UDF_FILE" ], "enumDescriptions": [ "Default input type.", @@ -4757,7 +4758,8 @@ "The parameter specifies a Cloud Storage folder to write to.", "The parameter specifies a Pub/Sub Topic.", "The parameter specifies a Pub/Sub Subscription.", - "The parameter specifies a BigQuery table." + "The parameter specifies a BigQuery table.", + "The parameter specifies a JavaScript UDF in Cloud Storage." ], "type": "string" }, @@ -7007,6 +7009,10 @@ "workerShutdownNotice": { "$ref": "WorkerShutdownNotice", "description": "Shutdown notice by workers." + }, + "workerThreadScalingReport": { + "$ref": "WorkerThreadScalingReport", + "description": "Thread scaling information reported by workers." } }, "type": "object" @@ -7045,6 +7051,10 @@ "workerShutdownNoticeResponse": { "$ref": "WorkerShutdownNoticeResponse", "description": "Service's response to shutdown notice (currently empty)." + }, + "workerThreadScalingReportResponse": { + "$ref": "WorkerThreadScalingReportResponse", + "description": "Service's thread scaling recommendation for workers." } }, "type": "object" @@ -7245,6 +7255,30 @@ "properties": {}, "type": "object" }, + "WorkerThreadScalingReport": { + "description": "Contains information about the thread scaling information of a worker.", + "id": "WorkerThreadScalingReport", + "properties": { + "currentThreadCount": { + "description": "Current number of active threads in a worker.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "WorkerThreadScalingReportResponse": { + "description": "Contains the thread scaling recommendation for a worker from the backend.", + "id": "WorkerThreadScalingReportResponse", + "properties": { + "recommendedThreadCount": { + "description": "Recommended number of threads for a worker.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "WriteInstruction": { "description": "An instruction that writes records. Takes one input, produces no outputs.", "id": "WriteInstruction", diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index 4940f091714..f6410904bdb 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -4366,6 +4366,8 @@ type ParameterMetadata struct { // "PUBSUB_SUBSCRIPTION" - The parameter specifies a Pub/Sub // Subscription. // "BIGQUERY_TABLE" - The parameter specifies a BigQuery table. + // "JAVASCRIPT_UDF_FILE" - The parameter specifies a JavaScript UDF in + // Cloud Storage. ParamType string `json:"paramType,omitempty"` // Regexes: Optional. Regexes that the parameter must match. @@ -7808,6 +7810,10 @@ type WorkerMessage struct { // WorkerShutdownNotice: Shutdown notice by workers. WorkerShutdownNotice *WorkerShutdownNotice `json:"workerShutdownNotice,omitempty"` + // WorkerThreadScalingReport: Thread scaling information reported by + // workers. + WorkerThreadScalingReport *WorkerThreadScalingReport `json:"workerThreadScalingReport,omitempty"` + // ForceSendFields is a list of field names (e.g. "Labels") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -7900,6 +7906,10 @@ type WorkerMessageResponse struct { // (currently empty). WorkerShutdownNoticeResponse *WorkerShutdownNoticeResponse `json:"workerShutdownNoticeResponse,omitempty"` + // WorkerThreadScalingReportResponse: Service's thread scaling + // recommendation for workers. + WorkerThreadScalingReportResponse *WorkerThreadScalingReportResponse `json:"workerThreadScalingReportResponse,omitempty"` + // ForceSendFields is a list of field names (e.g. // "WorkerHealthReportResponse") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -8172,6 +8182,67 @@ func (s *WorkerShutdownNotice) MarshalJSON() ([]byte, error) { type WorkerShutdownNoticeResponse struct { } +// WorkerThreadScalingReport: Contains information about the thread +// scaling information of a worker. +type WorkerThreadScalingReport struct { + // CurrentThreadCount: Current number of active threads in a worker. + CurrentThreadCount int64 `json:"currentThreadCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CurrentThreadCount") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrentThreadCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WorkerThreadScalingReport) MarshalJSON() ([]byte, error) { + type NoMethod WorkerThreadScalingReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkerThreadScalingReportResponse: Contains the thread scaling +// recommendation for a worker from the backend. +type WorkerThreadScalingReportResponse struct { + // RecommendedThreadCount: Recommended number of threads for a worker. + RecommendedThreadCount int64 `json:"recommendedThreadCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "RecommendedThreadCount") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RecommendedThreadCount") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WorkerThreadScalingReportResponse) MarshalJSON() ([]byte, error) { + type NoMethod WorkerThreadScalingReportResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // WriteInstruction: An instruction that writes records. Takes one // input, produces no outputs. type WriteInstruction struct { diff --git a/datapipelines/v1/datapipelines-api.json b/datapipelines/v1/datapipelines-api.json index 919052caa24..b184b9b3d90 100644 --- a/datapipelines/v1/datapipelines-api.json +++ b/datapipelines/v1/datapipelines-api.json @@ -109,34 +109,6 @@ "resources": { "locations": { "methods": { - "computeSchema": { - "description": "Computes the schema for the transform. Computation from `raw_schema` will always occur if it is set. This requires that the transform supports that encoding. If no raw schema is provided and if the transform is for an IO, then this will attempt to connect to the resource using the details provided in `config` and infer the schema from that. If the transform is not an IO, is a sink that doesn't exist yet, or is a sink with no schema requirement, then this will fall back to basing the schema off the one provided in `input_schemas`. The computed schema will be validated.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:computeSchema", - "httpMethod": "POST", - "id": "datapipelines.projects.locations.computeSchema", - "parameterOrder": [ - "location" - ], - "parameters": { - "location": { - "description": "Required. The full location formatted as \"projects/{your-project}/locations/{google-cloud-region}\". If attempting to infer the schema from an existing Google Cloud resource, the default Data Pipelines service account for this project will be used in making requests for the resource. If the region given for \"{google-cloud-region}\" is different than the region where the resource is stored, then the data will be transferred to and processed in the region specified here, but it will not be persistently stored in this region.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+location}:computeSchema", - "request": { - "$ref": "GoogleCloudDatapipelinesV1ComputeSchemaRequest" - }, - "response": { - "$ref": "GoogleCloudDatapipelinesV1Schema" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "listPipelines": { "description": "Lists pipelines. Returns a \"FORBIDDEN\" error if the caller doesn't have permission to access it.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", @@ -393,198 +365,15 @@ } } } - }, - "transformDescriptions": { - "methods": { - "batchGet": { - "description": "Gets transform descriptions in a batch, associated with a list of provided uniform resource names.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transformDescriptions:batchGet", - "httpMethod": "GET", - "id": "datapipelines.projects.locations.transformDescriptions.batchGet", - "parameterOrder": [ - "parent" - ], - "parameters": { - "names": { - "description": "Optional. The names of the transform descriptions being retrieved, formatted as \"projects/{project}/locations/{location}/transformdescriptions/{transform_description}\". If no name is provided, all of the transform descriptions will be returned.", - "location": "query", - "repeated": true, - "type": "string" - }, - "parent": { - "description": "Required. The project and location shared by all transform descriptions being retrieved, formatted as \"projects/{project}/locations/{location}\".", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/transformDescriptions:batchGet", - "response": { - "$ref": "GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the transform description associated with the provided uniform resource name.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transformDescriptions/{transformDescriptionsId}", - "httpMethod": "GET", - "id": "datapipelines.projects.locations.transformDescriptions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The full name formatted as \"projects/{your-project}/locations/{google-cloud-region}/transformdescriptions/{uniform-resource-name}\".", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/transformDescriptions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleCloudDatapipelinesV1TransformDescription" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } } } } }, - "revision": "20221106", + "revision": "20221204", "rootUrl": "https://datapipelines.googleapis.com/", "schemas": { - "GoogleCloudDatapipelinesV1ArrayValue": { - "description": "Represents an array of values. The elements can be of any type.", - "id": "GoogleCloudDatapipelinesV1ArrayValue", - "properties": { - "elements": { - "description": "The elements of the array.", - "items": { - "$ref": "GoogleCloudDatapipelinesV1FieldValue" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1AtomicValue": { - "description": "Represents a non-dividable value.", - "id": "GoogleCloudDatapipelinesV1AtomicValue", - "properties": { - "booleanValue": { - "description": "A boolean value.", - "type": "boolean" - }, - "byteValue": { - "description": "An 8-bit signed value.", - "format": "int32", - "type": "integer" - }, - "bytesValue": { - "description": "An array of raw bytes.", - "format": "byte", - "type": "string" - }, - "datetimeValue": { - "$ref": "GoogleTypeDateTime", - "description": "A datetime value." - }, - "decimalValue": { - "$ref": "GoogleTypeDecimal", - "description": "A large decimal value, equivalent to Java BigDecimal." - }, - "doubleValue": { - "description": "A 64-bit floating point value.", - "format": "double", - "type": "number" - }, - "floatValue": { - "description": "A 32-bit floating point value.", - "format": "float", - "type": "number" - }, - "int16Value": { - "description": "A 16-bit signed value.", - "format": "int32", - "type": "integer" - }, - "int32Value": { - "description": "A 32-bit signed value.", - "format": "int32", - "type": "integer" - }, - "int64Value": { - "description": "A 64-bit signed value.", - "format": "int64", - "type": "string" - }, - "stringValue": { - "description": "A string value.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse": { - "description": "Response message for BatchGetTransformDescriptions", - "id": "GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse", - "properties": { - "transformDescriptions": { - "description": "List of requested transform descriptions.", - "items": { - "$ref": "GoogleCloudDatapipelinesV1TransformDescription" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1ComputeSchemaRequest": { - "description": "Request message for ComputeSchema", - "id": "GoogleCloudDatapipelinesV1ComputeSchemaRequest", - "properties": { - "config": { - "$ref": "GoogleCloudDatapipelinesV1ConfiguredTransform", - "description": "Required. The configuration for the transform. If this is not a source, then each input with its schema must be set. It is not required to have any outputs set." - }, - "inputSchemas": { - "description": "Optional. In relation to the full pipeline graph, the schemas of the transforms that are used as inputs to the one for `config`. If `config` represents a transform for reading from some resource, then this should be empty. For all other transforms, at least one value must be provided.", - "items": { - "$ref": "GoogleCloudDatapipelinesV1Schema" - }, - "type": "array" - }, - "rawSchema": { - "$ref": "GoogleCloudDatapipelinesV1RawSchemaInfo", - "description": "Optional. If set, this will use the provided raw schema to compute the schema rather than connecting to any resources. Validation will still occur to make sure it is compatible with all input schemas. If the transform is an IO, the IO must support that schema type." - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1ConfiguredTransform": { - "description": "A fully configured transform that can be validated.", - "id": "GoogleCloudDatapipelinesV1ConfiguredTransform", - "properties": { - "config": { - "$ref": "GoogleCloudDatapipelinesV1Row", - "description": "Configuration values provided. These must match the schema provided in the row's schema." - }, - "uniformResourceName": { - "description": "Unique resource name of the transform. This should be the same as the equivalent `TransformDescription` value.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDatapipelinesV1DataflowJobDetails": { "description": "Pipeline job details specific to the Dataflow API. This is encapsulated here to allow for more executors to store their specific details separately.", "id": "GoogleCloudDatapipelinesV1DataflowJobDetails", @@ -611,148 +400,6 @@ }, "type": "object" }, - "GoogleCloudDatapipelinesV1EnumerationValue": { - "description": "Represents a selected value from an EnumerationType.", - "id": "GoogleCloudDatapipelinesV1EnumerationValue", - "properties": { - "name": { - "description": "Name of the enum option.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1Field": { - "description": "Info for a single field in the schema.", - "id": "GoogleCloudDatapipelinesV1Field", - "properties": { - "name": { - "description": "Name of the field.", - "type": "string" - }, - "type": { - "$ref": "GoogleCloudDatapipelinesV1FieldType", - "description": "Type info for the field." - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1FieldType": { - "description": "Type info about a field.", - "id": "GoogleCloudDatapipelinesV1FieldType", - "properties": { - "collectionElementType": { - "$ref": "GoogleCloudDatapipelinesV1FieldType", - "description": "If `type` is an array or iterable, this is the type contained in that array or iterable." - }, - "logicalType": { - "$ref": "GoogleCloudDatapipelinesV1LogicalType", - "description": "If `type` is a logical type, this is the info for the specific logical type." - }, - "mapType": { - "$ref": "GoogleCloudDatapipelinesV1MapType", - "description": "If `type` is a map, this is the key and value types for that map." - }, - "nullable": { - "description": "Whether or not this field is nullable.", - "type": "boolean" - }, - "rowSchema": { - "$ref": "GoogleCloudDatapipelinesV1Schema", - "description": "If `type` is a row, this is the schema of that row." - }, - "type": { - "description": "Specific type of the field. For non-atomic types, the corresponding type info for that non-atomic must be set.", - "enum": [ - "TYPE_NAME_UNSPECIFIED", - "TYPE_NAME_BYTE", - "TYPE_NAME_INT16", - "TYPE_NAME_INT32", - "TYPE_NAME_INT64", - "TYPE_NAME_DECIMAL", - "TYPE_NAME_FLOAT", - "TYPE_NAME_DOUBLE", - "TYPE_NAME_STRING", - "TYPE_NAME_DATETIME", - "TYPE_NAME_BOOLEAN", - "TYPE_NAME_BYTES", - "TYPE_NAME_ARRAY", - "TYPE_NAME_ITERABLE", - "TYPE_NAME_MAP", - "TYPE_NAME_ROW", - "TYPE_NAME_LOGICAL_TYPE" - ], - "enumDescriptions": [ - "Type name is not set (generally an error)", - "8-bit signed integer", - "16-bit signed integer", - "32-bit signed integer", - "64-bit signed integer", - "Large decimal type (equivalent to Java BigDecimal)", - "32-bit floating point integer", - "64-bit floating point integer", - "String", - "Datetime", - "Bool", - "Convenience for an ARRAY of BYTE values", - "Array of some other values.", - "Iterable of some other values.", - "Key/Value mapping between values.", - "Struct that follows a particular schema", - "Beam logical type" - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1FieldValue": { - "description": "A single value in a row. The value set must correspond to the correct type from the row's schema.", - "id": "GoogleCloudDatapipelinesV1FieldValue", - "properties": { - "arrayValue": { - "$ref": "GoogleCloudDatapipelinesV1ArrayValue", - "description": "The array value of this field. Corresponds to TYPE_NAME_ARRAY in the schema." - }, - "atomicValue": { - "$ref": "GoogleCloudDatapipelinesV1AtomicValue", - "description": "The atomic value of this field. Must correspond to the correct atomic type in the schema." - }, - "enumValue": { - "$ref": "GoogleCloudDatapipelinesV1EnumerationValue", - "description": "The enum value of this field. Corresponds to TYPE_NAME_LOGICAL_TYPE in the schema if that logical type represents an `EnumerationType` type." - }, - "fixedBytesValue": { - "$ref": "GoogleCloudDatapipelinesV1FixedBytesValue", - "description": "The fixed-length byte collection of this field. Corresponds to TYPE_NAME_LOGICAL_TYPE in the schema if that logical type represents a `FixedBytes` type." - }, - "iterableValue": { - "$ref": "GoogleCloudDatapipelinesV1IterableValue", - "description": "The iterable value of this field. Corresponds to TYPE_NAME_ITERABLE in the schema." - }, - "mapValue": { - "$ref": "GoogleCloudDatapipelinesV1MapValue", - "description": "The map value of this field. Corresponds to TYPE_NAME_MAP in the schema." - }, - "rowValue": { - "$ref": "GoogleCloudDatapipelinesV1Row", - "description": "The row value of this field. Corresponds to TYPE_NAME_ROW in the schema. This row also holds to its own schema." - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1FixedBytesValue": { - "description": "Represents a collection of bytes whose size is the same as the associated FixedBytes size value.", - "id": "GoogleCloudDatapipelinesV1FixedBytesValue", - "properties": { - "value": { - "description": "The raw bytes. It must be exactly the size specified in the schema.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDatapipelinesV1FlexTemplateRuntimeEnvironment": { "description": "The environment values to be set at runtime for a Flex Template.", "id": "GoogleCloudDatapipelinesV1FlexTemplateRuntimeEnvironment", @@ -852,20 +499,6 @@ }, "type": "object" }, - "GoogleCloudDatapipelinesV1IterableValue": { - "description": "Represents an iterable of values. The elements can be of any type.", - "id": "GoogleCloudDatapipelinesV1IterableValue", - "properties": { - "elements": { - "description": "The elements of the iterable.", - "items": { - "$ref": "GoogleCloudDatapipelinesV1FieldValue" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDatapipelinesV1Job": { "description": "Definition of the job information maintained by the pipeline. Fields in this entity are retrieved from the executor API (e.g. Dataflow API).", "id": "GoogleCloudDatapipelinesV1Job", @@ -1085,91 +718,6 @@ }, "type": "object" }, - "GoogleCloudDatapipelinesV1LogicalType": { - "description": "Represents the input for creating a specified logical type.", - "id": "GoogleCloudDatapipelinesV1LogicalType", - "properties": { - "enumerationType": { - "$ref": "GoogleCloudDatapipelinesV1LogicalTypeEnumerationType", - "description": "The enum represented by this logical type." - }, - "fixedBytes": { - "$ref": "GoogleCloudDatapipelinesV1LogicalTypeFixedBytes", - "description": "The fixed-size byte collection represented by this logical type." - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1LogicalTypeEnumerationType": { - "description": "Represents the Beam EnumerationType logical type.", - "id": "GoogleCloudDatapipelinesV1LogicalTypeEnumerationType", - "properties": { - "values": { - "description": "Names of the values. The numeric value is the same as the index.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1LogicalTypeFixedBytes": { - "description": "Represents the Beam FixedBytes logical type.", - "id": "GoogleCloudDatapipelinesV1LogicalTypeFixedBytes", - "properties": { - "sizeBytes": { - "description": "Number of bytes to allocate.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1MapType": { - "description": "Represents a map in a schema.", - "id": "GoogleCloudDatapipelinesV1MapType", - "properties": { - "mapKeyType": { - "$ref": "GoogleCloudDatapipelinesV1FieldType", - "description": "Key type of the map. Only atomic types are supported." - }, - "mapValueType": { - "$ref": "GoogleCloudDatapipelinesV1FieldType", - "description": "Value type of the map." - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1MapValue": { - "description": "Represents a key/value pairing.", - "id": "GoogleCloudDatapipelinesV1MapValue", - "properties": { - "entries": { - "description": "The entries in the map.", - "items": { - "$ref": "GoogleCloudDatapipelinesV1MapValueEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1MapValueEntry": { - "description": "A single entry in the map. Each entry must have a unique key.", - "id": "GoogleCloudDatapipelinesV1MapValueEntry", - "properties": { - "key": { - "$ref": "GoogleCloudDatapipelinesV1FieldValue", - "description": "The key value. Only atomic values are supported." - }, - "value": { - "$ref": "GoogleCloudDatapipelinesV1FieldValue", - "description": "The value associated with the key. It may be of any type." - } - }, - "type": "object" - }, "GoogleCloudDatapipelinesV1Pipeline": { "description": "The main pipeline entity and all the necessary metadata for launching and managing linked jobs.", "id": "GoogleCloudDatapipelinesV1Pipeline", @@ -1256,47 +804,6 @@ }, "type": "object" }, - "GoogleCloudDatapipelinesV1RawSchemaInfo": { - "description": "The raw schema and its type.", - "id": "GoogleCloudDatapipelinesV1RawSchemaInfo", - "properties": { - "rawSchema": { - "description": "The schema.", - "type": "string" - }, - "type": { - "description": "The type of the schema.", - "enum": [ - "RAW_SCHEMA_TYPE_UNSPECIFIED", - "RAW_SCHEMA_TYPE_AVRO" - ], - "enumDescriptions": [ - "The schema type is unknown.", - "The schema is an Avro schema." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1Row": { - "description": "Represents an Apache Beam row, though the `Any` nature of values is replaced with more concrete representations of valid values.", - "id": "GoogleCloudDatapipelinesV1Row", - "properties": { - "schema": { - "$ref": "GoogleCloudDatapipelinesV1SchemaSource", - "description": "Required. The schema of the row's data." - }, - "values": { - "description": "Required. The values of this Row. A fully built row is required to hold to the schema specified by `schema`.", - "items": { - "$ref": "GoogleCloudDatapipelinesV1FieldValue" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDatapipelinesV1RunPipelineRequest": { "description": "Request message for RunPipeline", "id": "GoogleCloudDatapipelinesV1RunPipelineRequest", @@ -1424,39 +931,6 @@ }, "type": "object" }, - "GoogleCloudDatapipelinesV1Schema": { - "description": "Represents a simplified Apache Beam schema.", - "id": "GoogleCloudDatapipelinesV1Schema", - "properties": { - "fields": { - "description": "Fields in the schema. Every field within a schema must have a unique name.", - "items": { - "$ref": "GoogleCloudDatapipelinesV1Field" - }, - "type": "array" - }, - "referenceId": { - "description": "An identifier of the schema for looking it up in a repository. This only needs to be set if the schema is stored in a repository.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDatapipelinesV1SchemaSource": { - "description": "Holds a schema or a reference to a schema in some repository.", - "id": "GoogleCloudDatapipelinesV1SchemaSource", - "properties": { - "localSchema": { - "$ref": "GoogleCloudDatapipelinesV1Schema", - "description": "Schema located locally with the message." - }, - "referenceId": { - "description": "The `reference_id` value of a schema in a repository.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDatapipelinesV1SdkVersion": { "description": "The version of the SDK used to run the job.", "id": "GoogleCloudDatapipelinesV1SdkVersion", @@ -1496,26 +970,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudDatapipelinesV1TransformDescription": { - "description": "Description of a schema-aware transform, which provides info on how it can be configured.", - "id": "GoogleCloudDatapipelinesV1TransformDescription", - "properties": { - "name": { - "description": "Output only. The full name of this resource formatted as: projects/{project}/locations/{location}/transformDescriptions/{transform_description} `transform_description` is the same as the `uniform_resource_name` field.", - "readOnly": true, - "type": "string" - }, - "options": { - "$ref": "GoogleCloudDatapipelinesV1Schema", - "description": "Available options for configuring the transform." - }, - "uniformResourceName": { - "description": "Unique resource name of the transform.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDatapipelinesV1Workload": { "description": "Workload details for creating the pipeline jobs.", "id": "GoogleCloudDatapipelinesV1Workload", @@ -1563,83 +1017,6 @@ } }, "type": "object" - }, - "GoogleTypeDateTime": { - "description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", - "id": "GoogleTypeDateTime", - "properties": { - "day": { - "description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", - "format": "int32", - "type": "integer" - }, - "hours": { - "description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", - "format": "int32", - "type": "integer" - }, - "minutes": { - "description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", - "format": "int32", - "type": "integer" - }, - "nanos": { - "description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", - "format": "int32", - "type": "integer" - }, - "seconds": { - "description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", - "format": "int32", - "type": "integer" - }, - "timeZone": { - "$ref": "GoogleTypeTimeZone", - "description": "Time zone." - }, - "utcOffset": { - "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", - "format": "google-duration", - "type": "string" - }, - "year": { - "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleTypeDecimal": { - "description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html", - "id": "GoogleTypeDecimal", - "properties": { - "value": { - "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -\u003e `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleTypeTimeZone": { - "description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", - "id": "GoogleTypeTimeZone", - "properties": { - "id": { - "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", - "type": "string" - }, - "version": { - "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", - "type": "string" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/datapipelines/v1/datapipelines-gen.go b/datapipelines/v1/datapipelines-gen.go index bffd8160300..b9a7bf37ed1 100644 --- a/datapipelines/v1/datapipelines-gen.go +++ b/datapipelines/v1/datapipelines-gen.go @@ -152,7 +152,6 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Pipelines = NewProjectsLocationsPipelinesService(s) - rs.TransformDescriptions = NewProjectsLocationsTransformDescriptionsService(s) return rs } @@ -160,8 +159,6 @@ type ProjectsLocationsService struct { s *Service Pipelines *ProjectsLocationsPipelinesService - - TransformDescriptions *ProjectsLocationsTransformDescriptionsService } func NewProjectsLocationsPipelinesService(s *Service) *ProjectsLocationsPipelinesService { @@ -185,233 +182,6 @@ type ProjectsLocationsPipelinesJobsService struct { s *Service } -func NewProjectsLocationsTransformDescriptionsService(s *Service) *ProjectsLocationsTransformDescriptionsService { - rs := &ProjectsLocationsTransformDescriptionsService{s: s} - return rs -} - -type ProjectsLocationsTransformDescriptionsService struct { - s *Service -} - -// GoogleCloudDatapipelinesV1ArrayValue: Represents an array of values. -// The elements can be of any type. -type GoogleCloudDatapipelinesV1ArrayValue struct { - // Elements: The elements of the array. - Elements []*GoogleCloudDatapipelinesV1FieldValue `json:"elements,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Elements") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Elements") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1ArrayValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1ArrayValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1AtomicValue: Represents a non-dividable -// value. -type GoogleCloudDatapipelinesV1AtomicValue struct { - // BooleanValue: A boolean value. - BooleanValue bool `json:"booleanValue,omitempty"` - - // ByteValue: An 8-bit signed value. - ByteValue int64 `json:"byteValue,omitempty"` - - // BytesValue: An array of raw bytes. - BytesValue string `json:"bytesValue,omitempty"` - - // DatetimeValue: A datetime value. - DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` - - // DecimalValue: A large decimal value, equivalent to Java BigDecimal. - DecimalValue *GoogleTypeDecimal `json:"decimalValue,omitempty"` - - // DoubleValue: A 64-bit floating point value. - DoubleValue float64 `json:"doubleValue,omitempty"` - - // FloatValue: A 32-bit floating point value. - FloatValue float64 `json:"floatValue,omitempty"` - - // Int16Value: A 16-bit signed value. - Int16Value int64 `json:"int16Value,omitempty"` - - // Int32Value: A 32-bit signed value. - Int32Value int64 `json:"int32Value,omitempty"` - - // Int64Value: A 64-bit signed value. - Int64Value int64 `json:"int64Value,omitempty,string"` - - // StringValue: A string value. - StringValue string `json:"stringValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BooleanValue") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BooleanValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1AtomicValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1AtomicValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDatapipelinesV1AtomicValue) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDatapipelinesV1AtomicValue - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse: -// Response message for BatchGetTransformDescriptions -type GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse struct { - // TransformDescriptions: List of requested transform descriptions. - TransformDescriptions []*GoogleCloudDatapipelinesV1TransformDescription `json:"transformDescriptions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "TransformDescriptions") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TransformDescriptions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1ComputeSchemaRequest: Request message for -// ComputeSchema -type GoogleCloudDatapipelinesV1ComputeSchemaRequest struct { - // Config: Required. The configuration for the transform. If this is not - // a source, then each input with its schema must be set. It is not - // required to have any outputs set. - Config *GoogleCloudDatapipelinesV1ConfiguredTransform `json:"config,omitempty"` - - // InputSchemas: Optional. In relation to the full pipeline graph, the - // schemas of the transforms that are used as inputs to the one for - // `config`. If `config` represents a transform for reading from some - // resource, then this should be empty. For all other transforms, at - // least one value must be provided. - InputSchemas []*GoogleCloudDatapipelinesV1Schema `json:"inputSchemas,omitempty"` - - // RawSchema: Optional. If set, this will use the provided raw schema to - // compute the schema rather than connecting to any resources. - // Validation will still occur to make sure it is compatible with all - // input schemas. If the transform is an IO, the IO must support that - // schema type. - RawSchema *GoogleCloudDatapipelinesV1RawSchemaInfo `json:"rawSchema,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Config") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1ComputeSchemaRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1ComputeSchemaRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1ConfiguredTransform: A fully configured -// transform that can be validated. -type GoogleCloudDatapipelinesV1ConfiguredTransform struct { - // Config: Configuration values provided. These must match the schema - // provided in the row's schema. - Config *GoogleCloudDatapipelinesV1Row `json:"config,omitempty"` - - // UniformResourceName: Unique resource name of the transform. This - // should be the same as the equivalent `TransformDescription` value. - UniformResourceName string `json:"uniformResourceName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Config") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1ConfiguredTransform) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1ConfiguredTransform - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDatapipelinesV1DataflowJobDetails: Pipeline job details // specific to the Dataflow API. This is encapsulated here to allow for // more executors to store their specific details separately. @@ -452,222 +222,6 @@ func (s *GoogleCloudDatapipelinesV1DataflowJobDetails) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDatapipelinesV1EnumerationValue: Represents a selected -// value from an EnumerationType. -type GoogleCloudDatapipelinesV1EnumerationValue struct { - // Name: Name of the enum option. - 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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1EnumerationValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1EnumerationValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1Field: Info for a single field in the -// schema. -type GoogleCloudDatapipelinesV1Field struct { - // Name: Name of the field. - Name string `json:"name,omitempty"` - - // Type: Type info for the field. - Type *GoogleCloudDatapipelinesV1FieldType `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1Field) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1Field - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1FieldType: Type info about a field. -type GoogleCloudDatapipelinesV1FieldType struct { - // CollectionElementType: If `type` is an array or iterable, this is the - // type contained in that array or iterable. - CollectionElementType *GoogleCloudDatapipelinesV1FieldType `json:"collectionElementType,omitempty"` - - // LogicalType: If `type` is a logical type, this is the info for the - // specific logical type. - LogicalType *GoogleCloudDatapipelinesV1LogicalType `json:"logicalType,omitempty"` - - // MapType: If `type` is a map, this is the key and value types for that - // map. - MapType *GoogleCloudDatapipelinesV1MapType `json:"mapType,omitempty"` - - // Nullable: Whether or not this field is nullable. - Nullable bool `json:"nullable,omitempty"` - - // RowSchema: If `type` is a row, this is the schema of that row. - RowSchema *GoogleCloudDatapipelinesV1Schema `json:"rowSchema,omitempty"` - - // Type: Specific type of the field. For non-atomic types, the - // corresponding type info for that non-atomic must be set. - // - // Possible values: - // "TYPE_NAME_UNSPECIFIED" - Type name is not set (generally an error) - // "TYPE_NAME_BYTE" - 8-bit signed integer - // "TYPE_NAME_INT16" - 16-bit signed integer - // "TYPE_NAME_INT32" - 32-bit signed integer - // "TYPE_NAME_INT64" - 64-bit signed integer - // "TYPE_NAME_DECIMAL" - Large decimal type (equivalent to Java - // BigDecimal) - // "TYPE_NAME_FLOAT" - 32-bit floating point integer - // "TYPE_NAME_DOUBLE" - 64-bit floating point integer - // "TYPE_NAME_STRING" - String - // "TYPE_NAME_DATETIME" - Datetime - // "TYPE_NAME_BOOLEAN" - Bool - // "TYPE_NAME_BYTES" - Convenience for an ARRAY of BYTE values - // "TYPE_NAME_ARRAY" - Array of some other values. - // "TYPE_NAME_ITERABLE" - Iterable of some other values. - // "TYPE_NAME_MAP" - Key/Value mapping between values. - // "TYPE_NAME_ROW" - Struct that follows a particular schema - // "TYPE_NAME_LOGICAL_TYPE" - Beam logical type - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "CollectionElementType") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CollectionElementType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1FieldType) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1FieldType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1FieldValue: A single value in a row. The -// value set must correspond to the correct type from the row's schema. -type GoogleCloudDatapipelinesV1FieldValue struct { - // ArrayValue: The array value of this field. Corresponds to - // TYPE_NAME_ARRAY in the schema. - ArrayValue *GoogleCloudDatapipelinesV1ArrayValue `json:"arrayValue,omitempty"` - - // AtomicValue: The atomic value of this field. Must correspond to the - // correct atomic type in the schema. - AtomicValue *GoogleCloudDatapipelinesV1AtomicValue `json:"atomicValue,omitempty"` - - // EnumValue: The enum value of this field. Corresponds to - // TYPE_NAME_LOGICAL_TYPE in the schema if that logical type represents - // an `EnumerationType` type. - EnumValue *GoogleCloudDatapipelinesV1EnumerationValue `json:"enumValue,omitempty"` - - // FixedBytesValue: The fixed-length byte collection of this field. - // Corresponds to TYPE_NAME_LOGICAL_TYPE in the schema if that logical - // type represents a `FixedBytes` type. - FixedBytesValue *GoogleCloudDatapipelinesV1FixedBytesValue `json:"fixedBytesValue,omitempty"` - - // IterableValue: The iterable value of this field. Corresponds to - // TYPE_NAME_ITERABLE in the schema. - IterableValue *GoogleCloudDatapipelinesV1IterableValue `json:"iterableValue,omitempty"` - - // MapValue: The map value of this field. Corresponds to TYPE_NAME_MAP - // in the schema. - MapValue *GoogleCloudDatapipelinesV1MapValue `json:"mapValue,omitempty"` - - // RowValue: The row value of this field. Corresponds to TYPE_NAME_ROW - // in the schema. This row also holds to its own schema. - RowValue *GoogleCloudDatapipelinesV1Row `json:"rowValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArrayValue") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArrayValue") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1FieldValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1FieldValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1FixedBytesValue: Represents a collection of -// bytes whose size is the same as the associated FixedBytes size value. -type GoogleCloudDatapipelinesV1FixedBytesValue struct { - // Value: The raw bytes. It must be exactly the size specified in the - // schema. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Value") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Value") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1FixedBytesValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1FixedBytesValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDatapipelinesV1FlexTemplateRuntimeEnvironment: The // environment values to be set at runtime for a Flex Template. type GoogleCloudDatapipelinesV1FlexTemplateRuntimeEnvironment struct { @@ -788,35 +342,6 @@ func (s *GoogleCloudDatapipelinesV1FlexTemplateRuntimeEnvironment) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDatapipelinesV1IterableValue: Represents an iterable of -// values. The elements can be of any type. -type GoogleCloudDatapipelinesV1IterableValue struct { - // Elements: The elements of the iterable. - Elements []*GoogleCloudDatapipelinesV1FieldValue `json:"elements,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Elements") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Elements") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1IterableValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1IterableValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDatapipelinesV1Job: Definition of the job information // maintained by the pipeline. Fields in this entity are retrieved from // the executor API (e.g. Dataflow API). @@ -1150,190 +675,6 @@ func (s *GoogleCloudDatapipelinesV1ListPipelinesResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDatapipelinesV1LogicalType: Represents the input for -// creating a specified logical type. -type GoogleCloudDatapipelinesV1LogicalType struct { - // EnumerationType: The enum represented by this logical type. - EnumerationType *GoogleCloudDatapipelinesV1LogicalTypeEnumerationType `json:"enumerationType,omitempty"` - - // FixedBytes: The fixed-size byte collection represented by this - // logical type. - FixedBytes *GoogleCloudDatapipelinesV1LogicalTypeFixedBytes `json:"fixedBytes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EnumerationType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EnumerationType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1LogicalType) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1LogicalType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1LogicalTypeEnumerationType: Represents the -// Beam EnumerationType logical type. -type GoogleCloudDatapipelinesV1LogicalTypeEnumerationType struct { - // Values: Names of the values. The numeric value is the same as the - // index. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Values") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Values") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1LogicalTypeEnumerationType) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1LogicalTypeEnumerationType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1LogicalTypeFixedBytes: Represents the Beam -// FixedBytes logical type. -type GoogleCloudDatapipelinesV1LogicalTypeFixedBytes struct { - // SizeBytes: Number of bytes to allocate. - SizeBytes int64 `json:"sizeBytes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SizeBytes") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SizeBytes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1LogicalTypeFixedBytes) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1LogicalTypeFixedBytes - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1MapType: Represents a map in a schema. -type GoogleCloudDatapipelinesV1MapType struct { - // MapKeyType: Key type of the map. Only atomic types are supported. - MapKeyType *GoogleCloudDatapipelinesV1FieldType `json:"mapKeyType,omitempty"` - - // MapValueType: Value type of the map. - MapValueType *GoogleCloudDatapipelinesV1FieldType `json:"mapValueType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MapKeyType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MapKeyType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1MapType) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1MapType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1MapValue: Represents a key/value pairing. -type GoogleCloudDatapipelinesV1MapValue struct { - // Entries: The entries in the map. - Entries []*GoogleCloudDatapipelinesV1MapValueEntry `json:"entries,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Entries") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Entries") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1MapValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1MapValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1MapValueEntry: A single entry in the map. -// Each entry must have a unique key. -type GoogleCloudDatapipelinesV1MapValueEntry struct { - // Key: The key value. Only atomic values are supported. - Key *GoogleCloudDatapipelinesV1FieldValue `json:"key,omitempty"` - - // Value: The value associated with the key. It may be of any type. - Value *GoogleCloudDatapipelinesV1FieldValue `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1MapValueEntry) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1MapValueEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDatapipelinesV1Pipeline: The main pipeline entity and all // the necessary metadata for launching and managing linked jobs. type GoogleCloudDatapipelinesV1Pipeline struct { @@ -1414,90 +755,21 @@ type GoogleCloudDatapipelinesV1Pipeline struct { // "PIPELINE_TYPE_UNSPECIFIED" - The pipeline type isn't specified. // "PIPELINE_TYPE_BATCH" - A batch pipeline. It runs jobs on a // specific schedule, and each job will automatically terminate once - // execution is finished. - // "PIPELINE_TYPE_STREAMING" - A streaming pipeline. The underlying - // job is continuously running until it is manually terminated by the - // user. This type of pipeline doesn't have a schedule to run on, and - // the linked job gets created when the pipeline is created. - Type string `json:"type,omitempty"` - - // Workload: Workload information for creating new jobs. - Workload *GoogleCloudDatapipelinesV1Workload `json:"workload,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1Pipeline) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1Pipeline - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1RawSchemaInfo: The raw schema and its type. -type GoogleCloudDatapipelinesV1RawSchemaInfo struct { - // RawSchema: The schema. - RawSchema string `json:"rawSchema,omitempty"` - - // Type: The type of the schema. - // - // Possible values: - // "RAW_SCHEMA_TYPE_UNSPECIFIED" - The schema type is unknown. - // "RAW_SCHEMA_TYPE_AVRO" - The schema is an Avro schema. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RawSchema") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "RawSchema") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1RawSchemaInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1RawSchemaInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // execution is finished. + // "PIPELINE_TYPE_STREAMING" - A streaming pipeline. The underlying + // job is continuously running until it is manually terminated by the + // user. This type of pipeline doesn't have a schedule to run on, and + // the linked job gets created when the pipeline is created. + Type string `json:"type,omitempty"` -// GoogleCloudDatapipelinesV1Row: Represents an Apache Beam row, though -// the `Any` nature of values is replaced with more concrete -// representations of valid values. -type GoogleCloudDatapipelinesV1Row struct { - // Schema: Required. The schema of the row's data. - Schema *GoogleCloudDatapipelinesV1SchemaSource `json:"schema,omitempty"` + // Workload: Workload information for creating new jobs. + Workload *GoogleCloudDatapipelinesV1Workload `json:"workload,omitempty"` - // Values: Required. The values of this Row. A fully built row is - // required to hold to the schema specified by `schema`. - Values []*GoogleCloudDatapipelinesV1FieldValue `json:"values,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Schema") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1505,8 +777,8 @@ type GoogleCloudDatapipelinesV1Row struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Schema") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1514,8 +786,8 @@ type GoogleCloudDatapipelinesV1Row struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDatapipelinesV1Row) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1Row +func (s *GoogleCloudDatapipelinesV1Pipeline) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatapipelinesV1Pipeline raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1711,77 +983,6 @@ func (s *GoogleCloudDatapipelinesV1ScheduleSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDatapipelinesV1Schema: Represents a simplified Apache Beam -// schema. -type GoogleCloudDatapipelinesV1Schema struct { - // Fields: Fields in the schema. Every field within a schema must have a - // unique name. - Fields []*GoogleCloudDatapipelinesV1Field `json:"fields,omitempty"` - - // ReferenceId: An identifier of the schema for looking it up in a - // repository. This only needs to be set if the schema is stored in a - // repository. - ReferenceId string `json:"referenceId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Fields") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fields") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1Schema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1Schema - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDatapipelinesV1SchemaSource: Holds a schema or a reference -// to a schema in some repository. -type GoogleCloudDatapipelinesV1SchemaSource struct { - // LocalSchema: Schema located locally with the message. - LocalSchema *GoogleCloudDatapipelinesV1Schema `json:"localSchema,omitempty"` - - // ReferenceId: The `reference_id` value of a schema in a repository. - ReferenceId string `json:"referenceId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LocalSchema") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LocalSchema") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1SchemaSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1SchemaSource - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDatapipelinesV1SdkVersion: The version of the SDK used to // run the job. type GoogleCloudDatapipelinesV1SdkVersion struct { @@ -1834,49 +1035,6 @@ func (s *GoogleCloudDatapipelinesV1SdkVersion) MarshalJSON() ([]byte, error) { type GoogleCloudDatapipelinesV1StopPipelineRequest struct { } -// GoogleCloudDatapipelinesV1TransformDescription: Description of a -// schema-aware transform, which provides info on how it can be -// configured. -type GoogleCloudDatapipelinesV1TransformDescription struct { - // Name: Output only. The full name of this resource formatted as: - // projects/{project}/locations/{location}/transformDescriptions/{transfo - // rm_description} `transform_description` is the same as the - // `uniform_resource_name` field. - Name string `json:"name,omitempty"` - - // Options: Available options for configuring the transform. - Options *GoogleCloudDatapipelinesV1Schema `json:"options,omitempty"` - - // UniformResourceName: Unique resource name of the transform. - UniformResourceName string `json:"uniformResourceName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDatapipelinesV1TransformDescription) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatapipelinesV1TransformDescription - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDatapipelinesV1Workload: Workload details for creating the // pipeline jobs. type GoogleCloudDatapipelinesV1Workload struct { @@ -1969,346 +1127,6 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDateTime: Represents civil time (or occasionally physical -// time). This type can represent a civil time in one of a few possible -// ways: * When utc_offset is set and time_zone is unset: a civil time -// on a calendar day with a particular offset from UTC. * When time_zone -// is set and utc_offset is unset: a civil time on a calendar day in a -// particular time zone. * When neither time_zone nor utc_offset is set: -// a civil time on a calendar day in local time. The date is relative to -// the Proleptic Gregorian Calendar. If year, month, or day are 0, the -// DateTime is considered not to have a specific year, month, or day -// respectively. This type may also be used to represent a physical time -// if all the date and time fields are set and either case of the -// `time_offset` oneof is set. Consider using `Timestamp` message for -// physical time instead. If your use case also would like to store the -// user's timezone, that can be done in another field. This type is more -// flexible than some applications may want. Make sure to document and -// validate your application's limitations. -type GoogleTypeDateTime struct { - // Day: Optional. Day of month. Must be from 1 to 31 and valid for the - // year and month, or 0 if specifying a datetime without a day. - Day int64 `json:"day,omitempty"` - - // Hours: Optional. Hours of day in 24 hour format. Should be from 0 to - // 23, defaults to 0 (midnight). An API may choose to allow the value - // "24:00:00" for scenarios like business closing time. - Hours int64 `json:"hours,omitempty"` - - // Minutes: Optional. Minutes of hour of day. Must be from 0 to 59, - // defaults to 0. - Minutes int64 `json:"minutes,omitempty"` - - // Month: Optional. Month of year. Must be from 1 to 12, or 0 if - // specifying a datetime without a month. - Month int64 `json:"month,omitempty"` - - // Nanos: Optional. Fractions of seconds in nanoseconds. Must be from 0 - // to 999,999,999, defaults to 0. - Nanos int64 `json:"nanos,omitempty"` - - // Seconds: Optional. Seconds of minutes of the time. Must normally be - // from 0 to 59, defaults to 0. An API may allow the value 60 if it - // allows leap-seconds. - Seconds int64 `json:"seconds,omitempty"` - - // TimeZone: Time zone. - TimeZone *GoogleTypeTimeZone `json:"timeZone,omitempty"` - - // UtcOffset: UTC offset. Must be whole seconds, between -18 hours and - // +18 hours. For example, a UTC offset of -4:00 would be represented as - // { seconds: -14400 }. - UtcOffset string `json:"utcOffset,omitempty"` - - // Year: Optional. Year of date. Must be from 1 to 9999, or 0 if - // specifying a datetime without a year. - Year int64 `json:"year,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Day") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleTypeDateTime) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDateTime - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleTypeDecimal: A representation of a decimal value, such as 2.5. -// Clients may convert values into language-native decimal formats, such -// as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: -// https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html -// [decimal.Decimal]: https://docs.python.org/3/library/decimal.html -type GoogleTypeDecimal struct { - // Value: The decimal value, as a string. The string representation - // consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), - // followed by a sequence of zero or more decimal digits ("the - // integer"), optionally followed by a fraction, optionally followed by - // an exponent. An empty string **should** be interpreted as `0`. The - // fraction consists of a decimal point followed by zero or more decimal - // digits. The string must contain at least one digit in either the - // integer or the fraction. The number formed by the sign, the integer - // and the fraction is referred to as the significand. The exponent - // consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed - // by one or more decimal digits. Services **should** normalize decimal - // values before storing them by: - Removing an explicitly-provided `+` - // sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with - // `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, - // with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an - // explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services - // **may** perform additional normalization based on its own needs and - // the internal decimal implementation selected, such as shifting the - // decimal point and exponent value together (example: `2.5E-1` <-> - // `0.25`). Additionally, services **may** preserve trailing zeroes in - // the fraction to indicate increased precision, but are not required to - // do so. Note that only the `.` character is supported to divide the - // integer and the fraction; `,` **should not** be supported regardless - // of locale. Additionally, thousand separators **should not** be - // supported. If a service does support them, values **must** be - // normalized. The ENBF grammar is: DecimalString = '' | [Sign] - // Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | - // [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { - // '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services - // **should** clearly document the range of supported values, the - // maximum supported precision (total number of digits), and, if - // applicable, the scale (number of digits after the decimal point), as - // well as how it behaves when receiving out-of-bounds values. Services - // **may** choose to accept values passed as input even when the value - // has a higher precision or scale than the service supports, and - // **should** round the value to fit the supported scale. Alternatively, - // the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` - // in gRPC) if precision would be lost. Services **should** error with - // `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service - // receives a value outside of the supported range. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Value") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Value") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleTypeDecimal) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDecimal - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone -// Database (https://www.iana.org/time-zones). -type GoogleTypeTimeZone struct { - // Id: IANA Time Zone Database time zone, e.g. "America/New_York". - Id string `json:"id,omitempty"` - - // Version: Optional. IANA Time Zone Database version number, e.g. - // "2019a". - Version string `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleTypeTimeZone) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeTimeZone - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "datapipelines.projects.locations.computeSchema": - -type ProjectsLocationsComputeSchemaCall struct { - s *Service - location string - googleclouddatapipelinesv1computeschemarequest *GoogleCloudDatapipelinesV1ComputeSchemaRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ComputeSchema: Computes the schema for the transform. Computation -// from `raw_schema` will always occur if it is set. This requires that -// the transform supports that encoding. If no raw schema is provided -// and if the transform is for an IO, then this will attempt to connect -// to the resource using the details provided in `config` and infer the -// schema from that. If the transform is not an IO, is a sink that -// doesn't exist yet, or is a sink with no schema requirement, then this -// will fall back to basing the schema off the one provided in -// `input_schemas`. The computed schema will be validated. -// -// - location: The full location formatted as -// "projects/{your-project}/locations/{google-cloud-region}". If -// attempting to infer the schema from an existing Google Cloud -// resource, the default Data Pipelines service account for this -// project will be used in making requests for the resource. If the -// region given for "{google-cloud-region}" is different than the -// region where the resource is stored, then the data will be -// transferred to and processed in the region specified here, but it -// will not be persistently stored in this region. -func (r *ProjectsLocationsService) ComputeSchema(location string, googleclouddatapipelinesv1computeschemarequest *GoogleCloudDatapipelinesV1ComputeSchemaRequest) *ProjectsLocationsComputeSchemaCall { - c := &ProjectsLocationsComputeSchemaCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddatapipelinesv1computeschemarequest = googleclouddatapipelinesv1computeschemarequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsComputeSchemaCall) Fields(s ...googleapi.Field) *ProjectsLocationsComputeSchemaCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsComputeSchemaCall) Context(ctx context.Context) *ProjectsLocationsComputeSchemaCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsComputeSchemaCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsComputeSchemaCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddatapipelinesv1computeschemarequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:computeSchema") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "location": c.location, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "datapipelines.projects.locations.computeSchema" call. -// Exactly one of *GoogleCloudDatapipelinesV1Schema or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudDatapipelinesV1Schema.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 *ProjectsLocationsComputeSchemaCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatapipelinesV1Schema, 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 := &GoogleCloudDatapipelinesV1Schema{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Computes the schema for the transform. Computation from `raw_schema` will always occur if it is set. This requires that the transform supports that encoding. If no raw schema is provided and if the transform is for an IO, then this will attempt to connect to the resource using the details provided in `config` and infer the schema from that. If the transform is not an IO, is a sink that doesn't exist yet, or is a sink with no schema requirement, then this will fall back to basing the schema off the one provided in `input_schemas`. The computed schema will be validated.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:computeSchema", - // "httpMethod": "POST", - // "id": "datapipelines.projects.locations.computeSchema", - // "parameterOrder": [ - // "location" - // ], - // "parameters": { - // "location": { - // "description": "Required. The full location formatted as \"projects/{your-project}/locations/{google-cloud-region}\". If attempting to infer the schema from an existing Google Cloud resource, the default Data Pipelines service account for this project will be used in making requests for the resource. If the region given for \"{google-cloud-region}\" is different than the region where the resource is stored, then the data will be transferred to and processed in the region specified here, but it will not be persistently stored in this region.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+location}:computeSchema", - // "request": { - // "$ref": "GoogleCloudDatapipelinesV1ComputeSchemaRequest" - // }, - // "response": { - // "$ref": "GoogleCloudDatapipelinesV1Schema" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "datapipelines.projects.locations.listPipelines": type ProjectsLocationsListPipelinesCall struct { @@ -3631,322 +2449,3 @@ func (c *ProjectsLocationsPipelinesJobsListCall) Pages(ctx context.Context, f fu c.PageToken(x.NextPageToken) } } - -// method id "datapipelines.projects.locations.transformDescriptions.batchGet": - -type ProjectsLocationsTransformDescriptionsBatchGetCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// BatchGet: Gets transform descriptions in a batch, associated with a -// list of provided uniform resource names. -// -// - parent: The project and location shared by all transform -// descriptions being retrieved, formatted as -// "projects/{project}/locations/{location}". -func (r *ProjectsLocationsTransformDescriptionsService) BatchGet(parent string) *ProjectsLocationsTransformDescriptionsBatchGetCall { - c := &ProjectsLocationsTransformDescriptionsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Names sets the optional parameter "names": The names of the transform -// descriptions being retrieved, formatted as -// "projects/{project}/locations/{location}/transformdescriptions/{transf -// orm_description}". If no name is provided, all of the transform -// descriptions will be returned. -func (c *ProjectsLocationsTransformDescriptionsBatchGetCall) Names(names ...string) *ProjectsLocationsTransformDescriptionsBatchGetCall { - c.urlParams_.SetMulti("names", append([]string{}, names...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsTransformDescriptionsBatchGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransformDescriptionsBatchGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsTransformDescriptionsBatchGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTransformDescriptionsBatchGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsTransformDescriptionsBatchGetCall) Context(ctx context.Context) *ProjectsLocationsTransformDescriptionsBatchGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsTransformDescriptionsBatchGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTransformDescriptionsBatchGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/transformDescriptions:batchGet") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "datapipelines.projects.locations.transformDescriptions.batchGet" call. -// Exactly one of -// *GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse.Serve -// rResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsTransformDescriptionsBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse, 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 := &GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets transform descriptions in a batch, associated with a list of provided uniform resource names.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transformDescriptions:batchGet", - // "httpMethod": "GET", - // "id": "datapipelines.projects.locations.transformDescriptions.batchGet", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "names": { - // "description": "Optional. The names of the transform descriptions being retrieved, formatted as \"projects/{project}/locations/{location}/transformdescriptions/{transform_description}\". If no name is provided, all of the transform descriptions will be returned.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "parent": { - // "description": "Required. The project and location shared by all transform descriptions being retrieved, formatted as \"projects/{project}/locations/{location}\".", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/transformDescriptions:batchGet", - // "response": { - // "$ref": "GoogleCloudDatapipelinesV1BatchGetTransformDescriptionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "datapipelines.projects.locations.transformDescriptions.get": - -type ProjectsLocationsTransformDescriptionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the transform description associated with the provided -// uniform resource name. -// -// - name: The full name formatted as -// "projects/{your-project}/locations/{google-cloud-region}/transformde -// scriptions/{uniform-resource-name}". -func (r *ProjectsLocationsTransformDescriptionsService) Get(name string) *ProjectsLocationsTransformDescriptionsGetCall { - c := &ProjectsLocationsTransformDescriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsTransformDescriptionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTransformDescriptionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsTransformDescriptionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTransformDescriptionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsTransformDescriptionsGetCall) Context(ctx context.Context) *ProjectsLocationsTransformDescriptionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsTransformDescriptionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTransformDescriptionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "datapipelines.projects.locations.transformDescriptions.get" call. -// Exactly one of *GoogleCloudDatapipelinesV1TransformDescription or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDatapipelinesV1TransformDescription.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 *ProjectsLocationsTransformDescriptionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDatapipelinesV1TransformDescription, 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 := &GoogleCloudDatapipelinesV1TransformDescription{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the transform description associated with the provided uniform resource name.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transformDescriptions/{transformDescriptionsId}", - // "httpMethod": "GET", - // "id": "datapipelines.projects.locations.transformDescriptions.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The full name formatted as \"projects/{your-project}/locations/{google-cloud-region}/transformdescriptions/{uniform-resource-name}\".", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/transformDescriptions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudDatapipelinesV1TransformDescription" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index 0fc15a9ddfd..e1934b13b44 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -1663,6 +1663,65 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "nodeGroups": { + "methods": { + "get": { + "description": "Gets the resource representation for a node group in a cluster.", + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups/{nodeGroupsId}", + "httpMethod": "GET", + "id": "dataproc.projects.regions.clusters.nodeGroups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the node group to retrieve. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}", + "location": "path", + "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+/nodeGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "NodeGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resize": { + "description": "Resizes a node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).", + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups/{nodeGroupsId}:resize", + "httpMethod": "POST", + "id": "dataproc.projects.regions.clusters.nodeGroups.resize", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the node group to resize. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}", + "location": "path", + "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+/nodeGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:resize", + "request": { + "$ref": "ResizeNodeGroupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } }, "jobs": { @@ -2564,7 +2623,7 @@ } } }, - "revision": "20221114", + "revision": "20221130", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2628,6 +2687,21 @@ }, "type": "object" }, + "AuxiliaryNodeGroup": { + "description": "Node group identification and configuration information.", + "id": "AuxiliaryNodeGroup", + "properties": { + "nodeGroup": { + "$ref": "NodeGroup", + "description": "Required. Node group configuration." + }, + "nodeGroupId": { + "description": "Optional. A node group ID. Generated if not specified.The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of from 3 to 33 characters.", + "type": "string" + } + }, + "type": "object" + }, "AuxiliaryServicesConfig": { "description": "Auxiliary services configuration for a Cluster.", "id": "AuxiliaryServicesConfig", @@ -2950,6 +3024,13 @@ "$ref": "AutoscalingConfig", "description": "Optional. Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset." }, + "auxiliaryNodeGroups": { + "description": "Optional. The node group settings.", + "items": { + "$ref": "AuxiliaryNodeGroup" + }, + "type": "array" + }, "configBucket": { "description": "Optional. A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Dataproc staging and temp buckets (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). This field requires a Cloud Storage bucket name, not a gs://... URI to a Cloud Storage bucket.", "type": "string" @@ -3315,6 +3396,23 @@ }, "type": "object" }, + "DriverSchedulingConfig": { + "description": "Driver scheduling configuration.", + "id": "DriverSchedulingConfig", + "properties": { + "memoryMb": { + "description": "Required. The amount of memory in MB the driver is requesting.", + "format": "int32", + "type": "integer" + }, + "vcores": { + "description": "Required. The number of vCPUs the driver is requesting.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } ", "id": "Empty", @@ -3371,7 +3469,7 @@ "id": "ExecutionConfig", "properties": { "idleTtl": { - "description": "Optional. The duration to keep the session alive while it's idling. Passing this threshold will cause the session to be terminated. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). Defaults to 10 minutes if not set.", + "description": "Optional. The duration to keep the session alive while it's idling. Passing this threshold will cause the session to be terminated. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). Defaults to 4 hours if not set.", "format": "google-duration", "type": "string" }, @@ -3970,6 +4068,10 @@ "readOnly": true, "type": "string" }, + "driverSchedulingConfig": { + "$ref": "DriverSchedulingConfig", + "description": "Optional. Driver scheduling configuration." + }, "hadoopJob": { "$ref": "HadoopJob", "description": "Optional. Job is a Hadoop job." @@ -4125,12 +4227,12 @@ "id": "JobScheduling", "properties": { "maxFailuresPerHour": { - "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.Note: Currently, this restartable job option is not supported in Dataproc workflow template (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) jobs.", + "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed.A job may be reported as thrashing if the driver exits with a non-zero code four times within a 10-minute window.Maximum value is 10.Note: This restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).", "format": "int32", "type": "integer" }, "maxFailuresTotal": { - "description": "Optional. Maximum number of times in total a driver may be restarted as a result of driver exiting with non-zero code before job is reported failed. Maximum value is 240.Note: Currently, this restartable job option is not supported in Dataproc workflow template (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) jobs.", + "description": "Optional. Maximum total number of times a driver may be restarted as a result of the driver exiting with a non-zero code. After the maximum number is reached, the job will be reported as failed.Maximum value is 240.Note: Currently, this restartable job option is not supported in Dataproc workflow templates (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template).", "format": "int32", "type": "integer" } @@ -4589,8 +4691,45 @@ }, "type": "object" }, + "NodeGroup": { + "description": "Dataproc Node Group. The Dataproc NodeGroup resource is not related to the Dataproc NodeGroupAffinity resource.", + "id": "NodeGroup", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Node group labels. Label keys must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group must have no more than 32 labelsn.", + "type": "object" + }, + "name": { + "description": "The Node group resource name (https://aip.dev/122).", + "type": "string" + }, + "nodeGroupConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The node group instance group configuration." + }, + "roles": { + "description": "Required. Node group roles.", + "items": { + "enum": [ + "ROLE_UNSPECIFIED", + "DRIVER" + ], + "enumDescriptions": [ + "Required unspecified role.", + "Job drivers run on the node pool." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "NodeGroupAffinity": { - "description": "Node Group Affinity for clusters using sole-tenant node groups.", + "description": "Node Group Affinity for clusters using sole-tenant node groups. The Dataproc NodeGroupAffinity resource is not related to the Dataproc NodeGroup resource.", "id": "NodeGroupAffinity", "properties": { "nodeGroupUri": { @@ -5150,6 +5289,27 @@ }, "type": "object" }, + "ResizeNodeGroupRequest": { + "description": "A request to resize a node group.", + "id": "ResizeNodeGroupRequest", + "properties": { + "gracefulDecommissionTimeout": { + "description": "Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) allows the removal of nodes from the Compute Engine node group without interrupting jobs in progress. This timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day. (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).Only supported on Dataproc image versions 1.2 and higher.", + "format": "google-duration", + "type": "string" + }, + "requestId": { + "description": "Optional. A unique ID used to identify the request. If the server receives two ResizeNodeGroupRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "type": "string" + }, + "size": { + "description": "Required. The number of running instances for the node group to maintain. The group adds or removes instances to maintain the number of instances specified by this parameter.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "RuntimeConfig": { "description": "Runtime configuration for a workload.", "id": "RuntimeConfig", @@ -5181,6 +5341,11 @@ "description": "Output only. Approximate workload resource usage calculated after workload finishes (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)).", "readOnly": true }, + "currentUsage": { + "$ref": "UsageSnapshot", + "description": "Output only. Snapshot of current workload resource usage.", + "readOnly": true + }, "diagnosticOutputUri": { "description": "Output only. A URI pointing to the location of the diagnostics tarball.", "readOnly": true, @@ -5868,6 +6033,28 @@ }, "type": "object" }, + "UsageSnapshot": { + "description": "The usage snaphot represents the resources consumed by a workload at a specified time.", + "id": "UsageSnapshot", + "properties": { + "milliDcu": { + "description": "Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing)).", + "format": "int64", + "type": "string" + }, + "shuffleStorageGb": { + "description": "Optional. Shuffle Storage in gigabytes (GB). (see Dataproc Serverless pricing (https://cloud.google.com/dataproc-serverless/pricing))", + "format": "int64", + "type": "string" + }, + "snapshotTime": { + "description": "Optional. The timestamp of the usage snapshot.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "ValueValidation": { "description": "Validation based on a list of allowed values.", "id": "ValueValidation", diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index 2a36c50704d..6bee75f444a 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -246,11 +246,23 @@ type ProjectsRegionsAutoscalingPoliciesService struct { func NewProjectsRegionsClustersService(s *Service) *ProjectsRegionsClustersService { rs := &ProjectsRegionsClustersService{s: s} + rs.NodeGroups = NewProjectsRegionsClustersNodeGroupsService(s) return rs } type ProjectsRegionsClustersService struct { s *Service + + NodeGroups *ProjectsRegionsClustersNodeGroupsService +} + +func NewProjectsRegionsClustersNodeGroupsService(s *Service) *ProjectsRegionsClustersNodeGroupsService { + rs := &ProjectsRegionsClustersNodeGroupsService{s: s} + return rs +} + +type ProjectsRegionsClustersNodeGroupsService struct { + s *Service } func NewProjectsRegionsJobsService(s *Service) *ProjectsRegionsJobsService { @@ -426,6 +438,41 @@ func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuxiliaryNodeGroup: Node group identification and configuration +// information. +type AuxiliaryNodeGroup struct { + // NodeGroup: Required. Node group configuration. + NodeGroup *NodeGroup `json:"nodeGroup,omitempty"` + + // NodeGroupId: Optional. A node group ID. Generated if not + // specified.The ID must contain only letters (a-z, A-Z), numbers (0-9), + // underscores (_), and hyphens (-). Cannot begin or end with underscore + // or hyphen. Must consist of from 3 to 33 characters. + NodeGroupId string `json:"nodeGroupId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NodeGroup") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NodeGroup") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AuxiliaryNodeGroup) MarshalJSON() ([]byte, error) { + type NoMethod AuxiliaryNodeGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AuxiliaryServicesConfig: Auxiliary services configuration for a // Cluster. type AuxiliaryServicesConfig struct { @@ -914,6 +961,9 @@ type ClusterConfig struct { // is unset. AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"` + // AuxiliaryNodeGroups: Optional. The node group settings. + AuxiliaryNodeGroups []*AuxiliaryNodeGroup `json:"auxiliaryNodeGroups,omitempty"` + // ConfigBucket: Optional. A Cloud Storage bucket used to stage job // dependencies, config files, and job driver console output. If you do // not specify a staging bucket, Cloud Dataproc will determine a Cloud @@ -1443,6 +1493,38 @@ func (s *DiskConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DriverSchedulingConfig: Driver scheduling configuration. +type DriverSchedulingConfig struct { + // MemoryMb: Required. The amount of memory in MB the driver is + // requesting. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // Vcores: Required. The number of vCPUs the driver is requesting. + Vcores int64 `json:"vcores,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MemoryMb") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MemoryMb") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DriverSchedulingConfig) MarshalJSON() ([]byte, error) { + type NoMethod DriverSchedulingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1560,7 +1642,7 @@ type ExecutionConfig struct { // terminated. Minimum value is 10 minutes; maximum value is 14 days // (see JSON representation of Duration // (https://developers.google.com/protocol-buffers/docs/proto3#json)). - // Defaults to 10 minutes if not set. + // Defaults to 4 hours if not set. IdleTtl string `json:"idleTtl,omitempty"` // KmsKey: Optional. The Cloud KMS key to use for encryption. @@ -2621,6 +2703,9 @@ type Job struct { // of the stdout of the job's driver program. DriverOutputResourceUri string `json:"driverOutputResourceUri,omitempty"` + // DriverSchedulingConfig: Optional. Driver scheduling configuration. + DriverSchedulingConfig *DriverSchedulingConfig `json:"driverSchedulingConfig,omitempty"` + // HadoopJob: Optional. Job is a Hadoop job. HadoopJob *HadoopJob `json:"hadoopJob,omitempty"` @@ -2829,20 +2914,18 @@ type JobScheduling struct { // MaxFailuresPerHour: Optional. Maximum number of times per hour a // driver may be restarted as a result of driver exiting with non-zero // code before job is reported failed.A job may be reported as thrashing - // if driver exits with non-zero code 4 times within 10 minute - // window.Maximum value is 10.Note: Currently, this restartable job - // option is not supported in Dataproc workflow template - // (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - // jobs. + // if the driver exits with a non-zero code four times within a + // 10-minute window.Maximum value is 10.Note: This restartable job + // option is not supported in Dataproc workflow templates + // (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). MaxFailuresPerHour int64 `json:"maxFailuresPerHour,omitempty"` - // MaxFailuresTotal: Optional. Maximum number of times in total a driver - // may be restarted as a result of driver exiting with non-zero code - // before job is reported failed. Maximum value is 240.Note: Currently, - // this restartable job option is not supported in Dataproc workflow - // template - // (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - // jobs. + // MaxFailuresTotal: Optional. Maximum total number of times a driver + // may be restarted as a result of the driver exiting with a non-zero + // code. After the maximum number is reached, the job will be reported + // as failed.Maximum value is 240.Note: Currently, this restartable job + // option is not supported in Dataproc workflow templates + // (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). MaxFailuresTotal int64 `json:"maxFailuresTotal,omitempty"` // ForceSendFields is a list of field names (e.g. "MaxFailuresPerHour") @@ -3642,8 +3725,61 @@ func (s *NamespacedGkeDeploymentTarget) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodeGroup: Dataproc Node Group. The Dataproc NodeGroup resource is +// not related to the Dataproc NodeGroupAffinity resource. +type NodeGroup struct { + // Labels: Optional. Node group labels. Label keys must consist of from + // 1 to 63 characters and conform to RFC 1035 + // (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If + // specified, they must consist of from 1 to 63 characters and conform + // to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group + // must have no more than 32 labelsn. + Labels map[string]string `json:"labels,omitempty"` + + // Name: The Node group resource name (https://aip.dev/122). + Name string `json:"name,omitempty"` + + // NodeGroupConfig: Optional. The node group instance group + // configuration. + NodeGroupConfig *InstanceGroupConfig `json:"nodeGroupConfig,omitempty"` + + // Roles: Required. Node group roles. + // + // Possible values: + // "ROLE_UNSPECIFIED" - Required unspecified role. + // "DRIVER" - Job drivers run on the node pool. + Roles []string `json:"roles,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Labels") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Labels") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeGroup) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NodeGroupAffinity: Node Group Affinity for clusters using sole-tenant -// node groups. +// node groups. The Dataproc NodeGroupAffinity resource is not related +// to the Dataproc NodeGroup resource. type NodeGroupAffinity struct { // NodeGroupUri: Required. The URI of a sole-tenant node group resource // (https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups) @@ -4523,6 +4659,62 @@ func (s *ReservationAffinity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ResizeNodeGroupRequest: A request to resize a node group. +type ResizeNodeGroupRequest struct { + // GracefulDecommissionTimeout: Optional. Timeout for graceful YARN + // decomissioning. Graceful decommissioning + // (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) + // allows the removal of nodes from the Compute Engine node group + // without interrupting jobs in progress. This timeout specifies how + // long to wait for jobs in progress to finish before forcefully + // removing nodes (and potentially interrupting jobs). Default timeout + // is 0 (for forceful decommission), and the maximum allowed timeout is + // 1 day. (see JSON representation of Duration + // (https://developers.google.com/protocol-buffers/docs/proto3#json)).Only + // supported on Dataproc image versions 1.2 and higher. + GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"` + + // RequestId: Optional. A unique ID used to identify the request. If the + // server receives two ResizeNodeGroupRequest + // (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) + // with the same ID, the second request is ignored and the first + // google.longrunning.Operation created and stored in the backend is + // returned.Recommendation: Set this value to a UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID + // must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), + // and hyphens (-). The maximum length is 40 characters. + RequestId string `json:"requestId,omitempty"` + + // Size: Required. The number of running instances for the node group to + // maintain. The group adds or removes instances to maintain the number + // of instances specified by this parameter. + Size int64 `json:"size,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "GracefulDecommissionTimeout") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "GracefulDecommissionTimeout") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResizeNodeGroupRequest) MarshalJSON() ([]byte, error) { + type NoMethod ResizeNodeGroupRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RuntimeConfig: Runtime configuration for a workload. type RuntimeConfig struct { // ContainerImage: Optional. Optional custom container image for the job @@ -4568,6 +4760,10 @@ type RuntimeInfo struct { // (https://cloud.google.com/dataproc-serverless/pricing)). ApproximateUsage *UsageMetrics `json:"approximateUsage,omitempty"` + // CurrentUsage: Output only. Snapshot of current workload resource + // usage. + CurrentUsage *UsageSnapshot `json:"currentUsage,omitempty"` + // DiagnosticOutputUri: Output only. A URI pointing to the location of // the diagnostics tarball. DiagnosticOutputUri string `json:"diagnosticOutputUri,omitempty"` @@ -5698,6 +5894,45 @@ func (s *UsageMetrics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UsageSnapshot: The usage snaphot represents the resources consumed by +// a workload at a specified time. +type UsageSnapshot struct { + // MilliDcu: Optional. Milli (one-thousandth) Dataproc Compute Units + // (DCUs) (see Dataproc Serverless pricing + // (https://cloud.google.com/dataproc-serverless/pricing)). + MilliDcu int64 `json:"milliDcu,omitempty,string"` + + // ShuffleStorageGb: Optional. Shuffle Storage in gigabytes (GB). (see + // Dataproc Serverless pricing + // (https://cloud.google.com/dataproc-serverless/pricing)) + ShuffleStorageGb int64 `json:"shuffleStorageGb,omitempty,string"` + + // SnapshotTime: Optional. The timestamp of the usage snapshot. + SnapshotTime string `json:"snapshotTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MilliDcu") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MilliDcu") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UsageSnapshot) MarshalJSON() ([]byte, error) { + type NoMethod UsageSnapshot + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ValueValidation: Validation based on a list of allowed values. type ValueValidation struct { // Values: Required. List of allowed values for the parameter. @@ -13817,6 +14052,300 @@ func (c *ProjectsRegionsClustersTestIamPermissionsCall) Do(opts ...googleapi.Cal } +// method id "dataproc.projects.regions.clusters.nodeGroups.get": + +type ProjectsRegionsClustersNodeGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the resource representation for a node group in a cluster. +// +// - name: The name of the node group to retrieve. Format: +// projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{n +// odeGroup}. +func (r *ProjectsRegionsClustersNodeGroupsService) Get(name string) *ProjectsRegionsClustersNodeGroupsGetCall { + c := &ProjectsRegionsClustersNodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsRegionsClustersNodeGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersNodeGroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsRegionsClustersNodeGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersNodeGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsRegionsClustersNodeGroupsGetCall) Context(ctx context.Context) *ProjectsRegionsClustersNodeGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsRegionsClustersNodeGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsRegionsClustersNodeGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataproc.projects.regions.clusters.nodeGroups.get" call. +// Exactly one of *NodeGroup or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *NodeGroup.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 *ProjectsRegionsClustersNodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, 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 := &NodeGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the resource representation for a node group in a cluster.", + // "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups/{nodeGroupsId}", + // "httpMethod": "GET", + // "id": "dataproc.projects.regions.clusters.nodeGroups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the node group to retrieve. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}", + // "location": "path", + // "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+/nodeGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "NodeGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataproc.projects.regions.clusters.nodeGroups.resize": + +type ProjectsRegionsClustersNodeGroupsResizeCall struct { + s *Service + name string + resizenodegrouprequest *ResizeNodeGroupRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resize: Resizes a node group in a cluster. The returned +// Operation.metadata is NodeGroupOperationMetadata +// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). +// +// - name: The name of the node group to resize. Format: +// projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{n +// odeGroup}. +func (r *ProjectsRegionsClustersNodeGroupsService) Resize(name string, resizenodegrouprequest *ResizeNodeGroupRequest) *ProjectsRegionsClustersNodeGroupsResizeCall { + c := &ProjectsRegionsClustersNodeGroupsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.resizenodegrouprequest = resizenodegrouprequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsRegionsClustersNodeGroupsResizeCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersNodeGroupsResizeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsRegionsClustersNodeGroupsResizeCall) Context(ctx context.Context) *ProjectsRegionsClustersNodeGroupsResizeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsRegionsClustersNodeGroupsResizeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsRegionsClustersNodeGroupsResizeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resizenodegrouprequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resize") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataproc.projects.regions.clusters.nodeGroups.resize" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsRegionsClustersNodeGroupsResizeCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Resizes a node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).", + // "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups/{nodeGroupsId}:resize", + // "httpMethod": "POST", + // "id": "dataproc.projects.regions.clusters.nodeGroups.resize", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the node group to resize. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}", + // "location": "path", + // "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+/nodeGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:resize", + // "request": { + // "$ref": "ResizeNodeGroupRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dataproc.projects.regions.jobs.cancel": type ProjectsRegionsJobsCancelCall struct { diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index 40f4231b6dd..503d7e4aa5f 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -577,6 +577,11 @@ "parent" ], "parameters": { + "force": { + "description": "Optional. If set to true, will skip validations.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent that owns the collection of PrivateConnections.", "location": "path", @@ -1217,7 +1222,7 @@ } } }, - "revision": "20221026", + "revision": "20221128", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AvroFileFormat": { @@ -2601,6 +2606,7 @@ "id": "SingleTargetDataset", "properties": { "datasetId": { + "description": "The dataset ID of the target dataset.", "type": "string" } }, diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index 2b89dad4ae4..07f5cca88d4 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -2322,6 +2322,7 @@ func (s *Route) MarshalJSON() ([]byte, error) { // SingleTargetDataset: A single target dataset to which all data will // be streamed. type SingleTargetDataset struct { + // DatasetId: The dataset ID of the target dataset. DatasetId string `json:"datasetId,omitempty"` // ForceSendFields is a list of field names (e.g. "DatasetId") to @@ -5162,6 +5163,13 @@ func (r *ProjectsLocationsPrivateConnectionsService) Create(parent string, priva return c } +// Force sets the optional parameter "force": If set to true, will skip +// validations. +func (c *ProjectsLocationsPrivateConnectionsCreateCall) Force(force bool) *ProjectsLocationsPrivateConnectionsCreateCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // PrivateConnectionId sets the optional parameter // "privateConnectionId": Required. The private connectivity identifier. func (c *ProjectsLocationsPrivateConnectionsCreateCall) PrivateConnectionId(privateConnectionId string) *ProjectsLocationsPrivateConnectionsCreateCall { @@ -5285,6 +5293,11 @@ func (c *ProjectsLocationsPrivateConnectionsCreateCall) Do(opts ...googleapi.Cal // "parent" // ], // "parameters": { + // "force": { + // "description": "Optional. If set to true, will skip validations.", + // "location": "query", + // "type": "boolean" + // }, // "parent": { // "description": "Required. The parent that owns the collection of PrivateConnections.", // "location": "path", diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 741e72c0380..f96b25815db 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -793,7 +793,7 @@ } } }, - "revision": "20221130", + "revision": "20221212", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1282,7 +1282,7 @@ "additionalProperties": { "type": "string" }, - "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", "type": "object" }, "validateOnly": { diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index f53b521af5d..c1825714aa1 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -1223,8 +1223,8 @@ type GoogleCloudDiscoveryengineV1alphaRecommendRequest struct { // characters must use UTF-8 encoding, and international characters are // allowed. * The key portion of a label must be unique. However, you // can use the same key with multiple resources. * Keys must start with - // a lowercase letter or international character. See Google Cloud - // Document + // a lowercase letter or international character. See Requirements for + // labels // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) // for more details. UserLabels map[string]string `json:"userLabels,omitempty"` diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index ca7a16adf52..61d332a6f24 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -793,7 +793,7 @@ } } }, - "revision": "20221130", + "revision": "20221212", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1393,7 +1393,7 @@ "additionalProperties": { "type": "string" }, - "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", "type": "object" }, "validateOnly": { diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 2c5e198be41..57e6b63e54c 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -1419,8 +1419,8 @@ type GoogleCloudDiscoveryengineV1betaRecommendRequest struct { // characters must use UTF-8 encoding, and international characters are // allowed. * The key portion of a label must be unique. However, you // can use the same key with multiple resources. * Keys must start with - // a lowercase letter or international character. See Google Cloud - // Document + // a lowercase letter or international character. See Requirements for + // labels // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) // for more details. UserLabels map[string]string `json:"userLabels,omitempty"` diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index e9b0a1a3745..3df6e46874d 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -8491,7 +8491,7 @@ } } }, - "revision": "20221205", + "revision": "20221208", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -8756,7 +8756,7 @@ "id": "AdvertiserBillingConfig", "properties": { "billingProfileId": { - "description": "The ID of a billing profile assigned to the advertiser.", + "description": "The ID of a billing profile assigned to the advertiser. This field will default to the default billing profile ID of the advertiser's parent partner if a value is not provided.", "format": "int64", "type": "string" } @@ -9164,7 +9164,7 @@ "type": "string" }, "assignedTargetingOptionIdAlias": { - "description": "Output only. An alias for the assigned targeting option id field. This field is only supported for targeting types with enum targeting enabled. This value can be used in place of the assignedTargetingOptionId required for GET and DELETE targeting methods. An alias for the assignedTargetingOptionId. This value can be used in place of `assignedTargetingOptionId` when retrieving or deleting existing targeting. This field will only be supported for all assigned targeting options of the following targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY` This field is also supported for line item assigned targeting options of the following targeting types: * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`", + "description": "Output only. An alias for the assigned_targeting_option_id. This value can be used in place of `assignedTargetingOptionId` when retrieving or deleting existing targeting. This field will only be supported for all assigned targeting options of the following targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY` This field is also supported for line item assigned targeting options of the following targeting types: * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`", "readOnly": true, "type": "string" }, diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index 83f1ff6dd2d..80e9f9a62a0 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -973,7 +973,8 @@ func (s *AdvertiserAdServerConfig) MarshalJSON() ([]byte, error) { // AdvertiserBillingConfig: Billing related settings of an advertiser. type AdvertiserBillingConfig struct { // BillingProfileId: The ID of a billing profile assigned to the - // advertiser. + // advertiser. This field will default to the default billing profile ID + // of the advertiser's parent partner if a value is not provided. BillingProfileId int64 `json:"billingProfileId,omitempty,string"` // ForceSendFields is a list of field names (e.g. "BillingProfileId") to @@ -1769,15 +1770,11 @@ type AssignedTargetingOption struct { AssignedTargetingOptionId string `json:"assignedTargetingOptionId,omitempty"` // AssignedTargetingOptionIdAlias: Output only. An alias for the - // assigned targeting option id field. This field is only supported for - // targeting types with enum targeting enabled. This value can be used - // in place of the assignedTargetingOptionId required for GET and DELETE - // targeting methods. An alias for the assignedTargetingOptionId. This - // value can be used in place of `assignedTargetingOptionId` when - // retrieving or deleting existing targeting. This field will only be - // supported for all assigned targeting options of the following - // targeting types: * `TARGETING_TYPE_AGE_RANGE` * - // `TARGETING_TYPE_DEVICE_TYPE` * + // assigned_targeting_option_id. This value can be used in place of + // `assignedTargetingOptionId` when retrieving or deleting existing + // targeting. This field will only be supported for all assigned + // targeting options of the following targeting types: * + // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_DEVICE_TYPE` * // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 1c88821d69e..1fcad43a84a 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -3412,7 +3412,7 @@ } } }, - "revision": "20221115", + "revision": "20221210", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -7047,7 +7047,7 @@ "type": "object" }, "GooglePrivacyDlpV2PublishSummaryToCscc": { - "description": "Publish the result summary of a DlpJob to the Cloud Security Command Center (CSCC Alpha). This action is only available for projects which are parts of an organization and whitelisted for the alpha Cloud Security Command Center. The action will publish the count of finding instances and their info types. The summary of findings will be persisted in CSCC and are governed by CSCC service-specific policy, see https://cloud.google.com/terms/service-terms Only a single instance of this action can be specified. Compatible with: Inspect", + "description": "Publish the result summary of a DlpJob to [Security Command Center](https://cloud.google.com/security-command-center). This action is available for only projects that belong to an organization. This action publishes the count of finding instances and their infoTypes. The summary of findings are persisted in Security Command Center and are governed by [service-specific policies for Security Command Center](https://cloud.google.com/terms/service-terms). Only a single instance of this action can be specified. Compatible with: Inspect", "id": "GooglePrivacyDlpV2PublishSummaryToCscc", "properties": {}, "type": "object" diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index f2a7841311f..acf682c3ee2 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -6890,14 +6890,14 @@ type GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog struct { } // GooglePrivacyDlpV2PublishSummaryToCscc: Publish the result summary of -// a DlpJob to the Cloud Security Command Center (CSCC Alpha). This -// action is only available for projects which are parts of an -// organization and whitelisted for the alpha Cloud Security Command -// Center. The action will publish the count of finding instances and -// their info types. The summary of findings will be persisted in CSCC -// and are governed by CSCC service-specific policy, see -// https://cloud.google.com/terms/service-terms Only a single instance -// of this action can be specified. Compatible with: Inspect +// a DlpJob to Security Command Center +// (https://cloud.google.com/security-command-center). This action is +// available for only projects that belong to an organization. This +// action publishes the count of finding instances and their infoTypes. +// The summary of findings are persisted in Security Command Center and +// are governed by service-specific policies for Security Command Center +// (https://cloud.google.com/terms/service-terms). Only a single +// instance of this action can be specified. Compatible with: Inspect type GooglePrivacyDlpV2PublishSummaryToCscc struct { } diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index 679581b56cc..3a4136bff7b 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -1197,7 +1197,7 @@ } } }, - "revision": "20221021", + "revision": "20221207", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -1393,7 +1393,7 @@ "id": "Destination", "properties": { "cloudFunction": { - "description": "The Cloud Function resource name. Only Cloud Functions V2 is supported. Format: `projects/{project}/locations/{location}/functions/{function}`", + "description": "The Cloud Function resource name. Only Cloud Functions V2 is supported. Format: `projects/{project}/locations/{location}/functions/{function}` This is a read-only field. Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.", "type": "string" }, "cloudRun": { diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index 05fb6d3a659..c126d91258b 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -588,7 +588,10 @@ func (s *CloudRun) MarshalJSON() ([]byte, error) { type Destination struct { // CloudFunction: The Cloud Function resource name. Only Cloud Functions // V2 is supported. Format: - // `projects/{project}/locations/{location}/functions/{function}` + // `projects/{project}/locations/{location}/functions/{function}` This + // is a read-only field. Creating Cloud Functions V2 triggers is only + // supported via the Cloud Functions product. An error will be returned + // if the user sets this value. CloudFunction string `json:"cloudFunction,omitempty"` // CloudRun: Cloud Run fully-managed resource that receives the events. diff --git a/file/v1/file-api.json b/file/v1/file-api.json index 3ffc50742f9..e5d84df98f8 100644 --- a/file/v1/file-api.json +++ b/file/v1/file-api.json @@ -846,7 +846,7 @@ } } }, - "revision": "20221111", + "revision": "20221207", "rootUrl": "https://file.googleapis.com/", "schemas": { "Backup": { @@ -1587,7 +1587,7 @@ "type": "object" }, "MaintenancePolicy": { - "description": "Defines policies to service maintenance events.", + "description": "LINT.IfChange Defines policies to service maintenance events.", "id": "MaintenancePolicy", "properties": { "createTime": { diff --git a/file/v1/file-gen.go b/file/v1/file-gen.go index 55c03366795..8668617431d 100644 --- a/file/v1/file-gen.go +++ b/file/v1/file-gen.go @@ -1314,7 +1314,8 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MaintenancePolicy: Defines policies to service maintenance events. +// MaintenancePolicy: LINT.IfChange Defines policies to service +// maintenance events. type MaintenancePolicy struct { // CreateTime: Output only. The time when the resource was created. CreateTime string `json:"createTime,omitempty"` diff --git a/file/v1beta1/file-api.json b/file/v1beta1/file-api.json index 8ad2b624d10..bde83bd3222 100644 --- a/file/v1beta1/file-api.json +++ b/file/v1beta1/file-api.json @@ -1041,7 +1041,7 @@ } } }, - "revision": "20221111", + "revision": "20221207", "rootUrl": "https://file.googleapis.com/", "schemas": { "Backup": { @@ -1840,7 +1840,7 @@ "type": "object" }, "MaintenancePolicy": { - "description": "Defines policies to service maintenance events.", + "description": "LINT.IfChange Defines policies to service maintenance events.", "id": "MaintenancePolicy", "properties": { "createTime": { diff --git a/file/v1beta1/file-gen.go b/file/v1beta1/file-gen.go index 7806e0037a3..28aa7761a7a 100644 --- a/file/v1beta1/file-gen.go +++ b/file/v1beta1/file-gen.go @@ -1392,7 +1392,8 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MaintenancePolicy: Defines policies to service maintenance events. +// MaintenancePolicy: LINT.IfChange Defines policies to service +// maintenance events. type MaintenancePolicy struct { // CreateTime: Output only. The time when the resource was created. CreateTime string `json:"createTime,omitempty"` diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 23cf94090a1..abd78da901b 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -146,6 +146,47 @@ "https://www.googleapis.com/auth/datastore" ] }, + "delete": { + "description": "Deletes a database.", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}", + "httpMethod": "DELETE", + "id": "firestore.projects.databases.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "If set to true and the Database is not found, the request will succeed but no action will be taken.", + "location": "query", + "type": "boolean" + }, + "etag": { + "description": "The current etag of the Database. If an etag is provided and does not match the current etag of the database, deletion will be blocked and a FAILED_PRECONDITION error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the response, but do not actually delete the database.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, "exportDocuments": { "description": "Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import", "flatPath": "v1/projects/{projectsId}/databases/{databasesId}:exportDocuments", @@ -788,7 +829,7 @@ ], "parameters": { "collectionId": { - "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", "location": "path", "required": true, "type": "string" @@ -800,18 +841,18 @@ "type": "string" }, "orderBy": { - "description": "The order to sort results by. For example: `priority desc, name`.", + "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of documents to return.", + "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The `next_page_token` value returned from a previous List request, if any.", + "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", "location": "query", "type": "string" }, @@ -823,18 +864,18 @@ "type": "string" }, "readTime": { - "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "description": "Perform the read at the provided time. This may not be older than 270 seconds.", "format": "google-datetime", "location": "query", "type": "string" }, "showMissing": { - "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", "location": "query", "type": "boolean" }, "transaction": { - "description": "Reads documents in a transaction.", + "description": "Perform the read as part of an already active transaction.", "format": "byte", "location": "query", "type": "string" @@ -889,7 +930,7 @@ ], "parameters": { "collectionId": { - "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", "location": "path", "required": true, "type": "string" @@ -901,18 +942,18 @@ "type": "string" }, "orderBy": { - "description": "The order to sort results by. For example: `priority desc, name`.", + "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of documents to return.", + "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The `next_page_token` value returned from a previous List request, if any.", + "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", "location": "query", "type": "string" }, @@ -924,18 +965,18 @@ "type": "string" }, "readTime": { - "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "description": "Perform the read at the provided time. This may not be older than 270 seconds.", "format": "google-datetime", "location": "query", "type": "string" }, "showMissing": { - "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", "location": "query", "type": "boolean" }, "transaction": { - "description": "Reads documents in a transaction.", + "description": "Perform the read as part of an already active transaction.", "format": "byte", "location": "query", "type": "string" @@ -1382,7 +1423,7 @@ } } }, - "revision": "20221029", + "revision": "20221210", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -2088,13 +2129,6 @@ }, "type": "array" }, - "namespaceIds": { - "description": "An empty list represents all namespaces. This is the preferred usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.", - "items": { - "type": "string" - }, - "type": "array" - }, "outputUriPrefix": { "description": "The output URI. Currently only supports Google Cloud Storage URIs of the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional Google Cloud Storage namespace path. When choosing a name, be sure to consider Google Cloud Storage naming guidelines: https://cloud.google.com/storage/docs/naming. If the URI is a bucket (without a namespace path), a prefix will be generated based on the start time.", "type": "string" @@ -2270,13 +2304,6 @@ "inputUriPrefix": { "description": "Location of the exported files. This must match the output_uri_prefix of an ExportDocumentsResponse from an export that has completed successfully. See: google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix.", "type": "string" - }, - "namespaceIds": { - "description": "An empty list represents all namespaces. This is the preferred usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" @@ -2735,7 +2762,7 @@ "type": "array" }, "nextPageToken": { - "description": "The next page token.", + "description": "A token to retrieve the next page of documents. If this field is omitted, there are no subsequent pages.", "type": "string" } }, diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 40bc2b5e533..66c7d7ec60e 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1507,13 +1507,6 @@ type GoogleFirestoreAdminV1ExportDocumentsRequest struct { // collections. CollectionIds []string `json:"collectionIds,omitempty"` - // NamespaceIds: An empty list represents all namespaces. This is the - // preferred usage for databases that don't use namespaces. An empty - // string element represents the default namespace. This should be used - // if the database has data in non-default namespaces, but doesn't want - // to include them. Each namespace in this list must be unique. - NamespaceIds []string `json:"namespaceIds,omitempty"` - // OutputUriPrefix: The output URI. Currently only supports Google Cloud // Storage URIs of the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where // `BUCKET_NAME` is the name of the Google Cloud Storage bucket and @@ -1790,13 +1783,6 @@ type GoogleFirestoreAdminV1ImportDocumentsRequest struct { // google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix. InputUriPrefix string `json:"inputUriPrefix,omitempty"` - // NamespaceIds: An empty list represents all namespaces. This is the - // preferred usage for databases that don't use namespaces. An empty - // string element represents the default namespace. This should be used - // if the database has data in non-default namespaces, but doesn't want - // to include them. Each namespace in this list must be unique. - NamespaceIds []string `json:"namespaceIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "CollectionIds") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2586,7 +2572,8 @@ type ListDocumentsResponse struct { // Documents: The Documents found. Documents []*Document `json:"documents,omitempty"` - // NextPageToken: The next page token. + // NextPageToken: A token to retrieve the next page of documents. If + // this field is omitted, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -4123,6 +4110,180 @@ func (c *ProjectsDatabasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleL } +// method id "firestore.projects.databases.delete": + +type ProjectsDatabasesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a database. +// +// - name: A name of the form +// `projects/{project_id}/databases/{database_id}`. +func (r *ProjectsDatabasesService) Delete(name string) *ProjectsDatabasesDeleteCall { + c := &ProjectsDatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true and the Database is not found, the request will succeed but no +// action will be taken. +func (c *ProjectsDatabasesDeleteCall) AllowMissing(allowMissing bool) *ProjectsDatabasesDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// Database. If an etag is provided and does not match the current etag +// of the database, deletion will be blocked and a FAILED_PRECONDITION +// error will be returned. +func (c *ProjectsDatabasesDeleteCall) Etag(etag string) *ProjectsDatabasesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the response, but do not actually +// delete the database. +func (c *ProjectsDatabasesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsDatabasesDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDatabasesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsDatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a database.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}", + // "httpMethod": "DELETE", + // "id": "firestore.projects.databases.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set to true and the Database is not found, the request will succeed but no action will be taken.", + // "location": "query", + // "type": "boolean" + // }, + // "etag": { + // "description": "The current etag of the Database. If an etag is provided and does not match the current etag of the database, deletion will be blocked and a FAILED_PRECONDITION error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the response, but do not actually delete the database.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + // method id "firestore.projects.databases.exportDocuments": type ProjectsDatabasesExportDocumentsCall struct { @@ -7210,8 +7371,10 @@ type ProjectsDatabasesDocumentsListCall struct { // List: Lists documents. // -// - collectionId: The collection ID, relative to `parent`, to list. For -// example: `chatrooms` or `messages`. +// - collectionId: Optional. The collection ID, relative to `parent`, to +// list. For example: `chatrooms` or `messages`. This is optional, and +// when not provided, Firestore will list documents from all +// collections under the provided `parent`. // - parent: The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_p @@ -7234,48 +7397,54 @@ func (c *ProjectsDatabasesDocumentsListCall) MaskFieldPaths(maskFieldPaths ...st return c } -// OrderBy sets the optional parameter "orderBy": The order to sort -// results by. For example: `priority desc, name`. +// OrderBy sets the optional parameter "orderBy": The optional ordering +// of the documents to return. For example: `priority desc, __name__ +// desc`. This mirrors the `ORDER BY` used in Firestore queries but in a +// string representation. When absent, documents are ordered based on +// `__name__ ASC`. func (c *ProjectsDatabasesDocumentsListCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of documents to return. +// of documents to return in a single response. Firestore may return +// fewer than this value. func (c *ProjectsDatabasesDocumentsListCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The -// `next_page_token` value returned from a previous List request, if -// any. +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDocuments` response. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// (with the exception of `page_size`) must match the values set in the +// request that generated the page token. func (c *ProjectsDatabasesDocumentsListCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadTime sets the optional parameter "readTime": Reads documents as -// they were at the given time. This may not be older than 270 seconds. +// ReadTime sets the optional parameter "readTime": Perform the read at +// the provided time. This may not be older than 270 seconds. func (c *ProjectsDatabasesDocumentsListCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("readTime", readTime) return c } // ShowMissing sets the optional parameter "showMissing": If the list -// should show missing documents. A missing document is a document that -// does not exist but has sub-documents. These documents will be -// returned with a key but will not have fields, Document.create_time, -// or Document.update_time set. Requests with `show_missing` may not -// specify `where` or `order_by`. +// should show missing documents. A document is missing if it does not +// exist, but there are sub-documents nested underneath it. When true, +// such missing documents will be returned with a key but will not have +// fields, `create_time`, or `update_time` set. Requests with +// `show_missing` may not specify `where` or `order_by`. func (c *ProjectsDatabasesDocumentsListCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) return c } -// Transaction sets the optional parameter "transaction": Reads -// documents in a transaction. +// Transaction sets the optional parameter "transaction": Perform the +// read as part of an already active transaction. func (c *ProjectsDatabasesDocumentsListCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("transaction", transaction) return c @@ -7391,7 +7560,7 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "collectionId": { - // "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + // "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", // "location": "path", // "required": true, // "type": "string" @@ -7403,18 +7572,18 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "orderBy": { - // "description": "The order to sort results by. For example: `priority desc, name`.", + // "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of documents to return.", + // "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The `next_page_token` value returned from a previous List request, if any.", + // "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", // "location": "query", // "type": "string" // }, @@ -7426,18 +7595,18 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "readTime": { - // "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + // "description": "Perform the read at the provided time. This may not be older than 270 seconds.", // "format": "google-datetime", // "location": "query", // "type": "string" // }, // "showMissing": { - // "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + // "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", // "location": "query", // "type": "boolean" // }, // "transaction": { - // "description": "Reads documents in a transaction.", + // "description": "Perform the read as part of an already active transaction.", // "format": "byte", // "location": "query", // "type": "string" @@ -7659,8 +7828,10 @@ type ProjectsDatabasesDocumentsListDocumentsCall struct { // ListDocuments: Lists documents. // -// - collectionId: The collection ID, relative to `parent`, to list. For -// example: `chatrooms` or `messages`. +// - collectionId: Optional. The collection ID, relative to `parent`, to +// list. For example: `chatrooms` or `messages`. This is optional, and +// when not provided, Firestore will list documents from all +// collections under the provided `parent`. // - parent: The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_p @@ -7683,48 +7854,54 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) MaskFieldPaths(maskFieldPa return c } -// OrderBy sets the optional parameter "orderBy": The order to sort -// results by. For example: `priority desc, name`. +// OrderBy sets the optional parameter "orderBy": The optional ordering +// of the documents to return. For example: `priority desc, __name__ +// desc`. This mirrors the `ORDER BY` used in Firestore queries but in a +// string representation. When absent, documents are ordered based on +// `__name__ ASC`. func (c *ProjectsDatabasesDocumentsListDocumentsCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of documents to return. +// of documents to return in a single response. Firestore may return +// fewer than this value. func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The -// `next_page_token` value returned from a previous List request, if -// any. +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDocuments` response. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// (with the exception of `page_size`) must match the values set in the +// request that generated the page token. func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadTime sets the optional parameter "readTime": Reads documents as -// they were at the given time. This may not be older than 270 seconds. +// ReadTime sets the optional parameter "readTime": Perform the read at +// the provided time. This may not be older than 270 seconds. func (c *ProjectsDatabasesDocumentsListDocumentsCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("readTime", readTime) return c } // ShowMissing sets the optional parameter "showMissing": If the list -// should show missing documents. A missing document is a document that -// does not exist but has sub-documents. These documents will be -// returned with a key but will not have fields, Document.create_time, -// or Document.update_time set. Requests with `show_missing` may not -// specify `where` or `order_by`. +// should show missing documents. A document is missing if it does not +// exist, but there are sub-documents nested underneath it. When true, +// such missing documents will be returned with a key but will not have +// fields, `create_time`, or `update_time` set. Requests with +// `show_missing` may not specify `where` or `order_by`. func (c *ProjectsDatabasesDocumentsListDocumentsCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) return c } -// Transaction sets the optional parameter "transaction": Reads -// documents in a transaction. +// Transaction sets the optional parameter "transaction": Perform the +// read as part of an already active transaction. func (c *ProjectsDatabasesDocumentsListDocumentsCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("transaction", transaction) return c @@ -7840,7 +8017,7 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO // ], // "parameters": { // "collectionId": { - // "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + // "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", // "location": "path", // "required": true, // "type": "string" @@ -7852,18 +8029,18 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "orderBy": { - // "description": "The order to sort results by. For example: `priority desc, name`.", + // "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of documents to return.", + // "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The `next_page_token` value returned from a previous List request, if any.", + // "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", // "location": "query", // "type": "string" // }, @@ -7875,18 +8052,18 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "readTime": { - // "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + // "description": "Perform the read at the provided time. This may not be older than 270 seconds.", // "format": "google-datetime", // "location": "query", // "type": "string" // }, // "showMissing": { - // "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + // "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", // "location": "query", // "type": "boolean" // }, // "transaction": { - // "description": "Reads documents in a transaction.", + // "description": "Perform the read as part of an already active transaction.", // "format": "byte", // "location": "query", // "type": "string" diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index e190623e967..d1220c10626 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -429,7 +429,7 @@ ], "parameters": { "collectionId": { - "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", "location": "path", "required": true, "type": "string" @@ -441,18 +441,18 @@ "type": "string" }, "orderBy": { - "description": "The order to sort results by. For example: `priority desc, name`.", + "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of documents to return.", + "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The `next_page_token` value returned from a previous List request, if any.", + "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", "location": "query", "type": "string" }, @@ -464,18 +464,18 @@ "type": "string" }, "readTime": { - "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "description": "Perform the read at the provided time. This may not be older than 270 seconds.", "format": "google-datetime", "location": "query", "type": "string" }, "showMissing": { - "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", "location": "query", "type": "boolean" }, "transaction": { - "description": "Reads documents in a transaction.", + "description": "Perform the read as part of an already active transaction.", "format": "byte", "location": "query", "type": "string" @@ -530,7 +530,7 @@ ], "parameters": { "collectionId": { - "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", "location": "path", "required": true, "type": "string" @@ -542,18 +542,18 @@ "type": "string" }, "orderBy": { - "description": "The order to sort results by. For example: `priority desc, name`.", + "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of documents to return.", + "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The `next_page_token` value returned from a previous List request, if any.", + "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", "location": "query", "type": "string" }, @@ -565,18 +565,18 @@ "type": "string" }, "readTime": { - "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "description": "Perform the read at the provided time. This may not be older than 270 seconds.", "format": "google-datetime", "location": "query", "type": "string" }, "showMissing": { - "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", "location": "query", "type": "boolean" }, "transaction": { - "description": "Reads documents in a transaction.", + "description": "Perform the read as part of an already active transaction.", "format": "byte", "location": "query", "type": "string" @@ -950,7 +950,7 @@ } } }, - "revision": "20220915", + "revision": "20221210", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -1940,7 +1940,7 @@ "type": "array" }, "nextPageToken": { - "description": "The next page token.", + "description": "A token to retrieve the next page of documents. If this field is omitted, there are no subsequent pages.", "type": "string" } }, diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 4747e645623..e92033beff0 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -1957,7 +1957,8 @@ type ListDocumentsResponse struct { // Documents: The Documents found. Documents []*Document `json:"documents,omitempty"` - // NextPageToken: The next page token. + // NextPageToken: A token to retrieve the next page of documents. If + // this field is omitted, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -4682,8 +4683,10 @@ type ProjectsDatabasesDocumentsListCall struct { // List: Lists documents. // -// - collectionId: The collection ID, relative to `parent`, to list. For -// example: `chatrooms` or `messages`. +// - collectionId: Optional. The collection ID, relative to `parent`, to +// list. For example: `chatrooms` or `messages`. This is optional, and +// when not provided, Firestore will list documents from all +// collections under the provided `parent`. // - parent: The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_p @@ -4706,48 +4709,54 @@ func (c *ProjectsDatabasesDocumentsListCall) MaskFieldPaths(maskFieldPaths ...st return c } -// OrderBy sets the optional parameter "orderBy": The order to sort -// results by. For example: `priority desc, name`. +// OrderBy sets the optional parameter "orderBy": The optional ordering +// of the documents to return. For example: `priority desc, __name__ +// desc`. This mirrors the `ORDER BY` used in Firestore queries but in a +// string representation. When absent, documents are ordered based on +// `__name__ ASC`. func (c *ProjectsDatabasesDocumentsListCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of documents to return. +// of documents to return in a single response. Firestore may return +// fewer than this value. func (c *ProjectsDatabasesDocumentsListCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The -// `next_page_token` value returned from a previous List request, if -// any. +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDocuments` response. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// (with the exception of `page_size`) must match the values set in the +// request that generated the page token. func (c *ProjectsDatabasesDocumentsListCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadTime sets the optional parameter "readTime": Reads documents as -// they were at the given time. This may not be older than 270 seconds. +// ReadTime sets the optional parameter "readTime": Perform the read at +// the provided time. This may not be older than 270 seconds. func (c *ProjectsDatabasesDocumentsListCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("readTime", readTime) return c } // ShowMissing sets the optional parameter "showMissing": If the list -// should show missing documents. A missing document is a document that -// does not exist but has sub-documents. These documents will be -// returned with a key but will not have fields, Document.create_time, -// or Document.update_time set. Requests with `show_missing` may not -// specify `where` or `order_by`. +// should show missing documents. A document is missing if it does not +// exist, but there are sub-documents nested underneath it. When true, +// such missing documents will be returned with a key but will not have +// fields, `create_time`, or `update_time` set. Requests with +// `show_missing` may not specify `where` or `order_by`. func (c *ProjectsDatabasesDocumentsListCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) return c } -// Transaction sets the optional parameter "transaction": Reads -// documents in a transaction. +// Transaction sets the optional parameter "transaction": Perform the +// read as part of an already active transaction. func (c *ProjectsDatabasesDocumentsListCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListCall { c.urlParams_.Set("transaction", transaction) return c @@ -4863,7 +4872,7 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "collectionId": { - // "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + // "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", // "location": "path", // "required": true, // "type": "string" @@ -4875,18 +4884,18 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "orderBy": { - // "description": "The order to sort results by. For example: `priority desc, name`.", + // "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of documents to return.", + // "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The `next_page_token` value returned from a previous List request, if any.", + // "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", // "location": "query", // "type": "string" // }, @@ -4898,18 +4907,18 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "readTime": { - // "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + // "description": "Perform the read at the provided time. This may not be older than 270 seconds.", // "format": "google-datetime", // "location": "query", // "type": "string" // }, // "showMissing": { - // "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + // "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", // "location": "query", // "type": "boolean" // }, // "transaction": { - // "description": "Reads documents in a transaction.", + // "description": "Perform the read as part of an already active transaction.", // "format": "byte", // "location": "query", // "type": "string" @@ -5131,8 +5140,10 @@ type ProjectsDatabasesDocumentsListDocumentsCall struct { // ListDocuments: Lists documents. // -// - collectionId: The collection ID, relative to `parent`, to list. For -// example: `chatrooms` or `messages`. +// - collectionId: Optional. The collection ID, relative to `parent`, to +// list. For example: `chatrooms` or `messages`. This is optional, and +// when not provided, Firestore will list documents from all +// collections under the provided `parent`. // - parent: The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_p @@ -5155,48 +5166,54 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) MaskFieldPaths(maskFieldPa return c } -// OrderBy sets the optional parameter "orderBy": The order to sort -// results by. For example: `priority desc, name`. +// OrderBy sets the optional parameter "orderBy": The optional ordering +// of the documents to return. For example: `priority desc, __name__ +// desc`. This mirrors the `ORDER BY` used in Firestore queries but in a +// string representation. When absent, documents are ordered based on +// `__name__ ASC`. func (c *ProjectsDatabasesDocumentsListDocumentsCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of documents to return. +// of documents to return in a single response. Firestore may return +// fewer than this value. func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The -// `next_page_token` value returned from a previous List request, if -// any. +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDocuments` response. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// (with the exception of `page_size`) must match the values set in the +// request that generated the page token. func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadTime sets the optional parameter "readTime": Reads documents as -// they were at the given time. This may not be older than 270 seconds. +// ReadTime sets the optional parameter "readTime": Perform the read at +// the provided time. This may not be older than 270 seconds. func (c *ProjectsDatabasesDocumentsListDocumentsCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("readTime", readTime) return c } // ShowMissing sets the optional parameter "showMissing": If the list -// should show missing documents. A missing document is a document that -// does not exist but has sub-documents. These documents will be -// returned with a key but will not have fields, Document.create_time, -// or Document.update_time set. Requests with `show_missing` may not -// specify `where` or `order_by`. +// should show missing documents. A document is missing if it does not +// exist, but there are sub-documents nested underneath it. When true, +// such missing documents will be returned with a key but will not have +// fields, `create_time`, or `update_time` set. Requests with +// `show_missing` may not specify `where` or `order_by`. func (c *ProjectsDatabasesDocumentsListDocumentsCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) return c } -// Transaction sets the optional parameter "transaction": Reads -// documents in a transaction. +// Transaction sets the optional parameter "transaction": Perform the +// read as part of an already active transaction. func (c *ProjectsDatabasesDocumentsListDocumentsCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("transaction", transaction) return c @@ -5312,7 +5329,7 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO // ], // "parameters": { // "collectionId": { - // "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`.", + // "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", // "location": "path", // "required": true, // "type": "string" @@ -5324,18 +5341,18 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "orderBy": { - // "description": "The order to sort results by. For example: `priority desc, name`.", + // "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of documents to return.", + // "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The `next_page_token` value returned from a previous List request, if any.", + // "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", // "location": "query", // "type": "string" // }, @@ -5347,18 +5364,18 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "readTime": { - // "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + // "description": "Perform the read at the provided time. This may not be older than 270 seconds.", // "format": "google-datetime", // "location": "query", // "type": "string" // }, // "showMissing": { - // "description": "If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`.", + // "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", // "location": "query", // "type": "boolean" // }, // "transaction": { - // "description": "Reads documents in a transaction.", + // "description": "Perform the read as part of an already active transaction.", // "format": "byte", // "location": "query", // "type": "string" diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 1eec1783c8a..ebd89d73948 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -905,7 +905,7 @@ } } }, - "revision": "20221031", + "revision": "20221207", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -1082,7 +1082,7 @@ "id": "ConfigManagementConfigSync", "properties": { "allowVerticalScale": { - "description": "Set to true to allow the vertical scaling. Defaults to false which disallows vertical scaling.", + "description": "Set to true to allow the vertical scaling. Defaults to false which disallows vertical scaling. This field is deprecated.", "type": "boolean" }, "enabled": { @@ -2561,6 +2561,10 @@ "$ref": "ConfigManagementMembershipSpec", "description": "Config Management-specific spec." }, + "fleetInherited": { + "description": "True if value of `feature_spec` was inherited from a fleet-level default.", + "type": "boolean" + }, "fleetobservability": { "$ref": "FleetObservabilityMembershipSpec", "description": "Fleet observability membership spec" diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index c4db34c2a3a..a2fd4609998 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -574,7 +574,8 @@ func (s *CommonFeatureState) MarshalJSON() ([]byte, error) { // ConfigManagementConfigSync: Configuration for Config Sync type ConfigManagementConfigSync struct { // AllowVerticalScale: Set to true to allow the vertical scaling. - // Defaults to false which disallows vertical scaling. + // Defaults to false which disallows vertical scaling. This field is + // deprecated. AllowVerticalScale bool `json:"allowVerticalScale,omitempty"` // Enabled: Enables the installation of ConfigSync. If set to true, @@ -2824,6 +2825,10 @@ type MembershipFeatureSpec struct { // Configmanagement: Config Management-specific spec. Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"` + // FleetInherited: True if value of `feature_spec` was inherited from a + // fleet-level default. + FleetInherited bool `json:"fleetInherited,omitempty"` + // Fleetobservability: Fleet observability membership spec Fleetobservability *FleetObservabilityMembershipSpec `json:"fleetobservability,omitempty"` diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index 02c99b843f4..c640b145b68 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1179,7 +1179,7 @@ } } }, - "revision": "20221031", + "revision": "20221207", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -1490,7 +1490,7 @@ "id": "ConfigManagementConfigSync", "properties": { "allowVerticalScale": { - "description": "Set to true to allow the vertical scaling. Defaults to false which disallows vertical scaling.", + "description": "Set to true to allow the vertical scaling. Defaults to false which disallows vertical scaling. This field is deprecated.", "type": "boolean" }, "enabled": { @@ -3123,6 +3123,10 @@ "$ref": "ConfigManagementMembershipSpec", "description": "Config Management-specific spec." }, + "fleetInherited": { + "description": "True if value of `feature_spec` was inherited from a fleet-level default.", + "type": "boolean" + }, "fleetobservability": { "$ref": "FleetObservabilityMembershipSpec", "description": "Fleet observability membership spec" diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 51364ca2ad6..7ec3741ba4a 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -875,7 +875,8 @@ func (s *ConfigManagementBinauthzVersion) MarshalJSON() ([]byte, error) { // ConfigManagementConfigSync: Configuration for Config Sync type ConfigManagementConfigSync struct { // AllowVerticalScale: Set to true to allow the vertical scaling. - // Defaults to false which disallows vertical scaling. + // Defaults to false which disallows vertical scaling. This field is + // deprecated. AllowVerticalScale bool `json:"allowVerticalScale,omitempty"` // Enabled: Enables the installation of ConfigSync. If set to true, @@ -3355,6 +3356,10 @@ type MembershipFeatureSpec struct { // Configmanagement: Config Management-specific spec. Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"` + // FleetInherited: True if value of `feature_spec` was inherited from a + // fleet-level default. + FleetInherited bool `json:"fleetInherited,omitempty"` + // Fleetobservability: Fleet observability membership spec Fleetobservability *FleetObservabilityMembershipSpec `json:"fleetobservability,omitempty"` diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 7d05bc39e30..d44d32728ca 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -670,7 +670,7 @@ } } }, - "revision": "20221031", + "revision": "20221207", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -893,7 +893,7 @@ "id": "ConfigManagementConfigSync", "properties": { "allowVerticalScale": { - "description": "Set to true to allow the vertical scaling. Defaults to false which disallows vertical scaling.", + "description": "Set to true to allow the vertical scaling. Defaults to false which disallows vertical scaling. This field is deprecated.", "type": "boolean" }, "enabled": { @@ -2129,6 +2129,10 @@ "$ref": "ConfigManagementMembershipSpec", "description": "Config Management-specific spec." }, + "fleetInherited": { + "description": "True if value of `feature_spec` was inherited from a fleet-level default.", + "type": "boolean" + }, "fleetobservability": { "$ref": "FleetObservabilityMembershipSpec", "description": "Fleet observability membership spec" diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index dbb4888ef24..ee68be848be 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -653,7 +653,8 @@ func (s *ConfigManagementBinauthzVersion) MarshalJSON() ([]byte, error) { // ConfigManagementConfigSync: Configuration for Config Sync type ConfigManagementConfigSync struct { // AllowVerticalScale: Set to true to allow the vertical scaling. - // Defaults to false which disallows vertical scaling. + // Defaults to false which disallows vertical scaling. This field is + // deprecated. AllowVerticalScale bool `json:"allowVerticalScale,omitempty"` // Enabled: Enables the installation of ConfigSync. If set to true, @@ -2474,6 +2475,10 @@ type MembershipFeatureSpec struct { // Configmanagement: Config Management-specific spec. Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"` + // FleetInherited: True if value of `feature_spec` was inherited from a + // fleet-level default. + FleetInherited bool `json:"fleetInherited,omitempty"` + // Fleetobservability: Fleet observability membership spec Fleetobservability *FleetObservabilityMembershipSpec `json:"fleetobservability,omitempty"` diff --git a/ids/v1/ids-api.json b/ids/v1/ids-api.json index 074ec74a781..19d6d33a5ba 100644 --- a/ids/v1/ids-api.json +++ b/ids/v1/ids-api.json @@ -349,6 +349,45 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates the parameters of a single Endpoint.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}", + "httpMethod": "PATCH", + "id": "ids.projects.locations.endpoints.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The name of the endpoint.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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 will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he 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": "Field mask is used to specify the fields to be overwritten in the Endpoint 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": "Endpoint" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:setIamPolicy", @@ -535,7 +574,7 @@ } } }, - "revision": "20220828", + "revision": "20221113", "rootUrl": "https://ids.googleapis.com/", "schemas": { "AuditConfig": { @@ -699,6 +738,13 @@ "readOnly": true, "type": "string" }, + "threatExceptions": { + "description": "List of threat IDs to be excepted from generating alerts.", + "items": { + "type": "string" + }, + "type": "array" + }, "trafficLogs": { "description": "Whether the endpoint should report traffic logs in addition to threat logs.", "type": "boolean" diff --git a/ids/v1/ids-gen.go b/ids/v1/ids-gen.go index 1b5aadbe32d..bfa3e5156c0 100644 --- a/ids/v1/ids-gen.go +++ b/ids/v1/ids-gen.go @@ -421,6 +421,10 @@ type Endpoint struct { // "UPDATING" - Being updated. State string `json:"state,omitempty"` + // ThreatExceptions: List of threat IDs to be excepted from generating + // alerts. + ThreatExceptions []string `json:"threatExceptions,omitempty"` + // TrafficLogs: Whether the endpoint should report traffic logs in // addition to threat logs. TrafficLogs bool `json:"trafficLogs,omitempty"` @@ -2282,6 +2286,188 @@ func (c *ProjectsLocationsEndpointsListCall) Pages(ctx context.Context, f func(* } } +// method id "ids.projects.locations.endpoints.patch": + +type ProjectsLocationsEndpointsPatchCall struct { + s *Service + name string + endpoint *Endpoint + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Endpoint. +// +// - name: Output only. The name of the endpoint. +func (r *ProjectsLocationsEndpointsService) Patch(name string, endpoint *Endpoint) *ProjectsLocationsEndpointsPatchCall { + c := &ProjectsLocationsEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.endpoint = endpoint + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// 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 will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsEndpointsPatchCall) RequestId(requestId string) *ProjectsLocationsEndpointsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Endpoint 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 *ProjectsLocationsEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEndpointsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpoint) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "ids.projects.locations.endpoints.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointsPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Endpoint.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}", + // "httpMethod": "PATCH", + // "id": "ids.projects.locations.endpoints.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The name of the endpoint.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional 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 will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he 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": "Field mask is used to specify the fields to be overwritten in the Endpoint 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": "Endpoint" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "ids.projects.locations.endpoints.setIamPolicy": type ProjectsLocationsEndpointsSetIamPolicyCall struct { diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index fc2ae6112da..659e3a68a0d 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -1259,7 +1259,7 @@ } } }, - "revision": "20221130", + "revision": "20221207", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AuditConfig": { @@ -1432,7 +1432,7 @@ "type": "string" }, "subnetwork": { - "description": "Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:`projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}", + "description": "Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}", "type": "string" } }, diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index 0fb4c348346..c15fa44d891 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -525,8 +525,8 @@ type Consumer struct { // all hosts in a subnet in the same region and same network. There must // be at least one IP address available in the subnet's primary range. // The subnet is specified in the following - // form:`projects/{project_number}/regions/{region_id}/subnetworks/{subne - // twork_id} + // form:projects/{project_number}/regions/{region_id}/subnetworks/{subnet + // work_id} Subnetwork string `json:"subnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "EndpointUri") to diff --git a/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index a2db4571a82..6e95da4ffce 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -1551,7 +1551,7 @@ } } }, - "revision": "20221130", + "revision": "20221207", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1758,7 +1758,7 @@ "type": "string" }, "subnetwork": { - "description": "Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:`projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}", + "description": "Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}", "type": "string" } }, @@ -2604,7 +2604,12 @@ "RemoveIamPolicyRequest": { "description": "Request message for DataprocMetastore.RemoveIamPolicy.", "id": "RemoveIamPolicyRequest", - "properties": {}, + "properties": { + "asynchronous": { + "description": "Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false.", + "type": "boolean" + } + }, "type": "object" }, "RemoveIamPolicyResponse": { diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index 05d081d101e..3f5b41ede61 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -612,8 +612,8 @@ type Consumer struct { // all hosts in a subnet in the same region and same network. There must // be at least one IP address available in the subnet's primary range. // The subnet is specified in the following - // form:`projects/{project_number}/regions/{region_id}/subnetworks/{subne - // twork_id} + // form:projects/{project_number}/regions/{region_id}/subnetworks/{subnet + // work_id} Subnetwork string `json:"subnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "EndpointUri") to @@ -2066,6 +2066,31 @@ func (s *QueryMetadataResponse) MarshalJSON() ([]byte, error) { // RemoveIamPolicyRequest: Request message for // DataprocMetastore.RemoveIamPolicy. type RemoveIamPolicyRequest struct { + // Asynchronous: Optional. Removes IAM policy attached to database or + // table asynchronously when it is set. The default is false. + Asynchronous bool `json:"asynchronous,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asynchronous") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asynchronous") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RemoveIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod RemoveIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // RemoveIamPolicyResponse: Response message for diff --git a/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index 7bcb8112278..22901d43d80 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1551,7 +1551,7 @@ } } }, - "revision": "20221130", + "revision": "20221207", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1758,7 +1758,7 @@ "type": "string" }, "subnetwork": { - "description": "Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:`projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}", + "description": "Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}", "type": "string" } }, @@ -2604,7 +2604,12 @@ "RemoveIamPolicyRequest": { "description": "Request message for DataprocMetastore.RemoveIamPolicy.", "id": "RemoveIamPolicyRequest", - "properties": {}, + "properties": { + "asynchronous": { + "description": "Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false.", + "type": "boolean" + } + }, "type": "object" }, "RemoveIamPolicyResponse": { diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index 549d838003d..a2f83db8265 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -612,8 +612,8 @@ type Consumer struct { // all hosts in a subnet in the same region and same network. There must // be at least one IP address available in the subnet's primary range. // The subnet is specified in the following - // form:`projects/{project_number}/regions/{region_id}/subnetworks/{subne - // twork_id} + // form:projects/{project_number}/regions/{region_id}/subnetworks/{subnet + // work_id} Subnetwork string `json:"subnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "EndpointUri") to @@ -2066,6 +2066,31 @@ func (s *QueryMetadataResponse) MarshalJSON() ([]byte, error) { // RemoveIamPolicyRequest: Request message for // DataprocMetastore.RemoveIamPolicy. type RemoveIamPolicyRequest struct { + // Asynchronous: Optional. Removes IAM policy attached to database or + // table asynchronously when it is set. The default is false. + Asynchronous bool `json:"asynchronous,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asynchronous") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asynchronous") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RemoveIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod RemoveIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // RemoveIamPolicyResponse: Response message for diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index a5ccb15e35a..a638eb686b4 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -1393,7 +1393,7 @@ } } }, - "revision": "20221020", + "revision": "20221201", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1582,7 +1582,7 @@ "type": "object" }, "Hub": { - "description": "A Network Connectivity Center hub is a collection of spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the data transfer feature, the resources associated with those spokes must all reside in the same VPC network. Spokes that do not use data transfer can be associated with any VPC network in your project.", + "description": "A Network Connectivity Center hub is a global management resource to which you attach spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the site-to-site data transfer feature, the resources associated with those spokes must all be in the same VPC network. Spokes that do not use site-to-site data transfer can be associated with any VPC network in your project.", "id": "Hub", "properties": { "createTime": { @@ -2094,7 +2094,7 @@ "type": "object" }, "Spoke": { - "description": "A Network Connectivity Center spoke represents a connection between your Google Cloud network resources and a non-Google-Cloud network. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances", + "description": "A Network Connectivity Center spoke represents one or more network connectivity resources. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances", "id": "Spoke", "properties": { "createTime": { diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index ff9c860ea56..ea006f7d744 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -660,12 +660,13 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Hub: A Network Connectivity Center hub is a collection of spokes. A -// single hub can contain spokes from multiple regions. However, if any -// of a hub's spokes use the data transfer feature, the resources -// associated with those spokes must all reside in the same VPC network. -// Spokes that do not use data transfer can be associated with any VPC -// network in your project. +// Hub: A Network Connectivity Center hub is a global management +// resource to which you attach spokes. A single hub can contain spokes +// from multiple regions. However, if any of a hub's spokes use the +// site-to-site data transfer feature, the resources associated with +// those spokes must all be in the same VPC network. Spokes that do not +// use site-to-site data transfer can be associated with any VPC network +// in your project. type Hub struct { // CreateTime: Output only. The time the hub was created. CreateTime string `json:"createTime,omitempty"` @@ -1516,12 +1517,11 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Spoke: A Network Connectivity Center spoke represents a connection -// between your Google Cloud network resources and a non-Google-Cloud -// network. When you create a spoke, you associate it with a hub. You -// must also identify a value for exactly one of the following fields: * -// linked_vpn_tunnels * linked_interconnect_attachments * -// linked_router_appliance_instances +// Spoke: A Network Connectivity Center spoke represents one or more +// network connectivity resources. When you create a spoke, you +// associate it with a hub. You must also identify a value for exactly +// one of the following fields: * linked_vpn_tunnels * +// linked_interconnect_attachments * linked_router_appliance_instances type Spoke struct { // CreateTime: Output only. The time the spoke was created. CreateTime string `json:"createTime,omitempty"` diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index 95be47679c7..c75baa9bfa8 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -105,6 +105,137 @@ }, "protocol": "rest", "resources": { + "organizations": { + "resources": { + "locations": { + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "networksecurity.organizations.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "networksecurity.organizations.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "networksecurity.organizations.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, "projects": { "resources": { "locations": { @@ -177,6 +308,97 @@ } }, "resources": { + "addressGroups": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:getIamPolicy", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.addressGroups.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:setIamPolicy", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.addressGroups.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:testIamPermissions", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.addressGroups.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "authorizationPolicies": { "methods": { "create": { @@ -1037,7 +1259,7 @@ } } }, - "revision": "20220902", + "revision": "20221205", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AuthorizationPolicy": { diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index b40061a43d2..a18b4597a43 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -118,6 +118,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Organizations = NewOrganizationsService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -127,6 +128,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Organizations *OrganizationsService + Projects *ProjectsService } @@ -137,6 +140,39 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + rs.Locations = NewOrganizationsLocationsService(s) + return rs +} + +type OrganizationsService struct { + s *Service + + Locations *OrganizationsLocationsService +} + +func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { + rs := &OrganizationsLocationsService{s: s} + rs.Operations = NewOrganizationsLocationsOperationsService(s) + return rs +} + +type OrganizationsLocationsService struct { + s *Service + + Operations *OrganizationsLocationsOperationsService +} + +func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService { + rs := &OrganizationsLocationsOperationsService{s: s} + return rs +} + +type OrganizationsLocationsOperationsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -151,6 +187,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.AddressGroups = NewProjectsLocationsAddressGroupsService(s) rs.AuthorizationPolicies = NewProjectsLocationsAuthorizationPoliciesService(s) rs.ClientTlsPolicies = NewProjectsLocationsClientTlsPoliciesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -161,6 +198,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + AddressGroups *ProjectsLocationsAddressGroupsService + AuthorizationPolicies *ProjectsLocationsAuthorizationPoliciesService ClientTlsPolicies *ProjectsLocationsClientTlsPoliciesService @@ -170,6 +209,15 @@ type ProjectsLocationsService struct { ServerTlsPolicies *ProjectsLocationsServerTlsPoliciesService } +func NewProjectsLocationsAddressGroupsService(s *Service) *ProjectsLocationsAddressGroupsService { + rs := &ProjectsLocationsAddressGroupsService{s: s} + return rs +} + +type ProjectsLocationsAddressGroupsService struct { + s *Service +} + func NewProjectsLocationsAuthorizationPoliciesService(s *Service) *ProjectsLocationsAuthorizationPoliciesService { rs := &ProjectsLocationsAuthorizationPoliciesService{s: s} return rs @@ -1617,77 +1665,79 @@ func (s *ValidationCA) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "networksecurity.projects.locations.get": +// method id "networksecurity.organizations.locations.operations.cancel": -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *OrganizationsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OrganizationsLocationsOperationsCancelCall { + c := &OrganizationsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.canceloperationrequest = canceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -1698,14 +1748,14 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.get" call. -// Exactly one of *Location or error will be non-nil. Any non-2xx status +// Do executes the "networksecurity.organizations.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Location.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1724,7 +1774,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1736,25 +1786,28 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.get", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "networksecurity.organizations.locations.operations.cancel", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Resource name for the location.", + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, // "response": { - // "$ref": "Location" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1763,103 +1816,66 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } -// method id "networksecurity.projects.locations.list": +// method id "networksecurity.organizations.locations.operations.delete": -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. // -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *OrganizationsLocationsOperationsService) Delete(name string) *OrganizationsLocationsOperationsDeleteCall { + c := &OrganizationsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsOperationsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -1870,14 +1886,14 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +// Do executes the "networksecurity.organizations.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1896,7 +1912,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1908,41 +1924,25 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1beta1/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.list", + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.organizations.locations.operations.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The resource that owns the locations collection, if applicable.", + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta1/{+name}/locations", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1951,25 +1951,1193 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// method id "networksecurity.organizations.locations.operations.get": + +type OrganizationsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { + c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsGetCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.organizations.locations.operations.list": + +type OrganizationsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall { + c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.organizations.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "networksecurity.organizations.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1beta1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.addressGroups.getIamPolicy": + +type ProjectsLocationsAddressGroupsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAddressGroupsService) GetIamPolicy(resource string) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c := &ProjectsLocationsAddressGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAddressGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.addressGroups.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.setIamPolicy": + +type ProjectsLocationsAddressGroupsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAddressGroupsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAddressGroupsSetIamPolicyCall { + c := &ProjectsLocationsAddressGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAddressGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.addressGroups.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.addressGroups.testIamPermissions": + +type ProjectsLocationsAddressGroupsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAddressGroupsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAddressGroupsTestIamPermissionsCall { + c := &ProjectsLocationsAddressGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAddressGroupsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAddressGroupsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAddressGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.addressGroups.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsAddressGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.addressGroups.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } // method id "networksecurity.projects.locations.authorizationPolicies.create": diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json index 63606b629dc..93a28d7fd72 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json @@ -396,7 +396,7 @@ } } }, - "revision": "20221201", + "revision": "20221212", "rootUrl": "https://paymentsresellersubscription.googleapis.com/", "schemas": { "GoogleCloudPaymentsResellerSubscriptionV1Amount": { @@ -1122,7 +1122,8 @@ "LINE_ITEM_STATE_INACTIVE", "LINE_ITEM_STATE_NEW", "LINE_ITEM_STATE_ACTIVATING", - "LINE_ITEM_STATE_DEACTIVATING" + "LINE_ITEM_STATE_DEACTIVATING", + "LINE_ITEM_STATE_WAITING_TO_DEACTIVATE" ], "enumDescriptions": [ "Unspecified state.", @@ -1130,7 +1131,8 @@ "The line item is in INACTIVE state.", "The line item is new, and is not activated or charged yet.", "The line item is being activated in order to be charged. If a free trial applies to the line item, the line item is pending a prorated charge at the end of the free trial period, as indicated by `line_item_free_trial_end_time`.", - "The line item is being deactivated." + "The line item is being deactivated, and a prorated refund in being processed.", + "The line item is scheduled to be deactivated at the end of the current cycle." ], "readOnly": true, "type": "string" diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go index 7188b43f8e3..7ded7c1946f 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go @@ -1274,7 +1274,9 @@ type GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem struct { // line item is pending a prorated charge at the end of the free trial // period, as indicated by `line_item_free_trial_end_time`. // "LINE_ITEM_STATE_DEACTIVATING" - The line item is being - // deactivated. + // deactivated, and a prorated refund in being processed. + // "LINE_ITEM_STATE_WAITING_TO_DEACTIVATE" - The line item is + // scheduled to be deactivated at the end of the current cycle. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "Description") to diff --git a/playintegrity/v1/playintegrity-api.json b/playintegrity/v1/playintegrity-api.json index 8198b75ddca..4fc294ef863 100644 --- a/playintegrity/v1/playintegrity-api.json +++ b/playintegrity/v1/playintegrity-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://playintegrity.googleapis.com/", "batchPath": "batch", "canonicalName": "Play Integrity", - "description": "Play Integrity", + "description": "The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.", "discoveryVersion": "v1", "documentationLink": "https://developer.android.com/google/play/integrity", "fullyEncodeReservedExpansion": true, @@ -138,7 +138,7 @@ } } }, - "revision": "20221031", + "revision": "20221212", "rootUrl": "https://playintegrity.googleapis.com/", "schemas": { "AccountActivity": { diff --git a/pubsublite/v1/pubsublite-api.json b/pubsublite/v1/pubsublite-api.json index 6bb85efb998..f838d049d14 100644 --- a/pubsublite/v1/pubsublite-api.json +++ b/pubsublite/v1/pubsublite-api.json @@ -1040,7 +1040,7 @@ } } }, - "revision": "20220318", + "revision": "20221206", "rootUrl": "https://pubsublite.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -1224,6 +1224,58 @@ "properties": {}, "type": "object" }, + "ExportConfig": { + "description": "Configuration for a Pub/Sub Lite subscription that writes messages to a destination. User subscriber clients must not connect to this subscription.", + "id": "ExportConfig", + "properties": { + "currentState": { + "description": "Output only. The current state of the export, which may be different to the desired state due to errors. This field is output only.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "PAUSED", + "PERMISSION_DENIED", + "NOT_FOUND" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Messages are being exported.", + "Exporting messages is suspended.", + "Messages cannot be exported due to permission denied errors. Output only.", + "Messages cannot be exported due to missing resources. Output only." + ], + "readOnly": true, + "type": "string" + }, + "deadLetterTopic": { + "description": "Optional. The name of an optional Pub/Sub Lite topic to publish messages that can not be exported to the destination. For example, the message can not be published to the Pub/Sub service because it does not satisfy the constraints documented at https://cloud.google.com/pubsub/docs/publisher. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}. Must be within the same project and location as the subscription. The topic may be changed or removed.", + "type": "string" + }, + "desiredState": { + "description": "The desired state of this export. Setting this to values other than `ACTIVE` and `PAUSED` will result in an error.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "PAUSED", + "PERMISSION_DENIED", + "NOT_FOUND" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Messages are being exported.", + "Exporting messages is suspended.", + "Messages cannot be exported due to permission denied errors. Output only.", + "Messages cannot be exported due to missing resources. Output only." + ], + "type": "string" + }, + "pubsubConfig": { + "$ref": "PubSubConfig", + "description": "Messages are automatically written from the Pub/Sub Lite topic associated with this subscription to a Pub/Sub topic." + } + }, + "type": "object" + }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "ListOperationsResponse", @@ -1447,6 +1499,17 @@ }, "type": "object" }, + "PubSubConfig": { + "description": "Configuration for exporting to a Pub/Sub topic.", + "id": "PubSubConfig", + "properties": { + "topic": { + "description": "The name of the Pub/Sub topic. Structured like: projects/{project_number}/topics/{topic_id}. The topic may be changed.", + "type": "string" + } + }, + "type": "object" + }, "Reservation": { "description": "Metadata about a reservation resource.", "id": "Reservation", @@ -1557,6 +1620,10 @@ "$ref": "DeliveryConfig", "description": "The settings for this subscription's message delivery." }, + "exportConfig": { + "$ref": "ExportConfig", + "description": "If present, messages are automatically written from the Pub/Sub Lite topic associated with this subscription to a destination." + }, "name": { "description": "The name of the subscription. Structured like: projects/{project_number}/locations/{location}/subscriptions/{subscription_id}", "type": "string" diff --git a/pubsublite/v1/pubsublite-gen.go b/pubsublite/v1/pubsublite-gen.go index 5679473c45d..36146d5462e 100644 --- a/pubsublite/v1/pubsublite-gen.go +++ b/pubsublite/v1/pubsublite-gen.go @@ -730,6 +730,74 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// ExportConfig: Configuration for a Pub/Sub Lite subscription that +// writes messages to a destination. User subscriber clients must not +// connect to this subscription. +type ExportConfig struct { + // CurrentState: Output only. The current state of the export, which may + // be different to the desired state due to errors. This field is output + // only. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - Messages are being exported. + // "PAUSED" - Exporting messages is suspended. + // "PERMISSION_DENIED" - Messages cannot be exported due to permission + // denied errors. Output only. + // "NOT_FOUND" - Messages cannot be exported due to missing resources. + // Output only. + CurrentState string `json:"currentState,omitempty"` + + // DeadLetterTopic: Optional. The name of an optional Pub/Sub Lite topic + // to publish messages that can not be exported to the destination. For + // example, the message can not be published to the Pub/Sub service + // because it does not satisfy the constraints documented at + // https://cloud.google.com/pubsub/docs/publisher. Structured like: + // projects/{project_number}/locations/{location}/topics/{topic_id}. + // Must be within the same project and location as the subscription. The + // topic may be changed or removed. + DeadLetterTopic string `json:"deadLetterTopic,omitempty"` + + // DesiredState: The desired state of this export. Setting this to + // values other than `ACTIVE` and `PAUSED` will result in an error. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - Messages are being exported. + // "PAUSED" - Exporting messages is suspended. + // "PERMISSION_DENIED" - Messages cannot be exported due to permission + // denied errors. Output only. + // "NOT_FOUND" - Messages cannot be exported due to missing resources. + // Output only. + DesiredState string `json:"desiredState,omitempty"` + + // PubsubConfig: Messages are automatically written from the Pub/Sub + // Lite topic associated with this subscription to a Pub/Sub topic. + PubsubConfig *PubSubConfig `json:"pubsubConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CurrentState") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrentState") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExportConfig) MarshalJSON() ([]byte, error) { + type NoMethod ExportConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListOperationsResponse: The response message for // Operations.ListOperations. type ListOperationsResponse struct { @@ -1171,6 +1239,36 @@ func (s *PartitionCursor) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PubSubConfig: Configuration for exporting to a Pub/Sub topic. +type PubSubConfig struct { + // Topic: The name of the Pub/Sub topic. Structured like: + // projects/{project_number}/topics/{topic_id}. The topic may be + // changed. + Topic string `json:"topic,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Topic") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Topic") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PubSubConfig) MarshalJSON() ([]byte, error) { + type NoMethod PubSubConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Reservation: Metadata about a reservation resource. type Reservation struct { // Name: The name of the reservation. Structured like: @@ -1377,6 +1475,11 @@ type Subscription struct { // delivery. DeliveryConfig *DeliveryConfig `json:"deliveryConfig,omitempty"` + // ExportConfig: If present, messages are automatically written from the + // Pub/Sub Lite topic associated with this subscription to a + // destination. + ExportConfig *ExportConfig `json:"exportConfig,omitempty"` + // Name: The name of the subscription. Structured like: // projects/{project_number}/locations/{location}/subscriptions/{subscrip // tion_id} diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 1cc19c5f96d..555a35844c5 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -514,7 +514,7 @@ } } }, - "revision": "20221204", + "revision": "20221212", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -968,7 +968,7 @@ "id": "GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest", "properties": { "skipBillingCheck": { - "description": "Optional. Whether or not to do billing check. A reCAPTCHA Enterprise or migrated key behaves differently than a reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To avoid any disruption of your usage, we check that a billing account is present. If your usage of reCAPTCHA is under the free quota, you can safely skip the billing check and proceed with the migration. See https://cloud.google.com/recaptcha-enterprise/docs/billing-information.", + "description": "Optional. If true, skips the billing check. A reCAPTCHA Enterprise key or migrated key behaves differently than a reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To avoid any disruption of your usage, we check that a billing account is present. If your usage of reCAPTCHA is under the free quota, you can safely skip the billing check and proceed with the migration. See https://cloud.google.com/recaptcha-enterprise/docs/billing-information.", "type": "boolean" } }, diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index 93e42dd94b2..ba17dc48894 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -918,8 +918,8 @@ func (s *GoogleCloudRecaptchaenterpriseV1Metrics) MarshalJSON() ([]byte, error) // GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest: The migrate key // request message. type GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest struct { - // SkipBillingCheck: Optional. Whether or not to do billing check. A - // reCAPTCHA Enterprise or migrated key behaves differently than a + // SkipBillingCheck: Optional. If true, skips the billing check. A + // reCAPTCHA Enterprise key or migrated key behaves differently than a // reCAPTCHA (non-Enterprise version) key when you reach a quota limit // (see // https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 90e84edb14f..064e54074ba 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -1149,7 +1149,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1177,7 +1177,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1390,7 +1390,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1446,7 +1446,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1618,6 +1618,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", + "location": "query", + "type": "boolean" } }, "path": "v2/{+parent}/userEvents:write", @@ -1780,7 +1785,7 @@ } } }, - "revision": "20221130", + "revision": "20221214", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2462,7 +2467,7 @@ "id": "GoogleCloudRetailV2Control", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of serving configuration ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", + "description": "Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", "items": { "type": "string" }, @@ -5010,7 +5015,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaModelPageOptimizationConfig": { - "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configurations to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", + "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", "properties": { "pageOptimizationEventType": { diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 814329981e0..b4732500b3e 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -1590,10 +1590,10 @@ func (s *GoogleCloudRetailV2ConditionTimeRange) MarshalJSON() ([]byte, error) { // linked to a ServingConfig and affect search or recommendation results // at serving time. type GoogleCloudRetailV2Control struct { - // AssociatedServingConfigIds: Output only. List of serving - // configuration ids that are associated with this control in the same - // Catalog. Note the association is managed via the ServingConfig, this - // is an output only denormalized view. + // AssociatedServingConfigIds: Output only. List of serving config ids + // that are associated with this control in the same Catalog. Note the + // association is managed via the ServingConfig, this is an output only + // denormalized view. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // DisplayName: Required. The human readable control display name. Used @@ -6527,8 +6527,8 @@ func (s *GoogleCloudRetailV2alphaModel) MarshalJSON() ([]byte, error) { // GoogleCloudRetailV2alphaModelPageOptimizationConfig: The // PageOptimizationConfig for model training. This determines how many -// panels to optimize for, and which serving configurations to consider -// for each panel. The purpose of this model is to optimize which +// panels to optimize for, and which serving configs to consider for +// each panel. The purpose of this model is to optimize which // ServingConfig to show on which panels in way that optimizes the // visitors shopping journey. type GoogleCloudRetailV2alphaModelPageOptimizationConfig struct { @@ -13471,10 +13471,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or -// placement for it. For more information, see [Managing serving -// configurations] -// (https://cloud.google.com/retail/docs/manage-configs). The full -// list of available serving configs can be seen at +// placement for it. For more information, see [Manage serving +// configs] (https://cloud.google.com/retail/docs/manage-configs). The +// full list of available serving configs can be seen at // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs. func (r *ProjectsLocationsCatalogsPlacementsService) Predict(placement string, googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest) *ProjectsLocationsCatalogsPlacementsPredictCall { c := &ProjectsLocationsCatalogsPlacementsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13584,7 +13583,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -13626,9 +13625,8 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // /default_serving_config` or the name of the legacy placement // resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving -// configuration name and the set of models that will be used to make -// the search. +// ault_search`. This field is used to identify the serving config +// name and the set of models that will be used to make the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { c := &ProjectsLocationsCatalogsPlacementsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.placement = placement @@ -13737,7 +13735,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -14750,10 +14748,9 @@ type ProjectsLocationsCatalogsServingConfigsPredictCall struct { // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or -// placement for it. For more information, see [Managing serving -// configurations] -// (https://cloud.google.com/retail/docs/manage-configs). The full -// list of available serving configs can be seen at +// placement for it. For more information, see [Manage serving +// configs] (https://cloud.google.com/retail/docs/manage-configs). The +// full list of available serving configs can be seen at // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs. func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -14863,7 +14860,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleap // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -15051,9 +15048,8 @@ type ProjectsLocationsCatalogsServingConfigsSearchCall struct { // /default_serving_config` or the name of the legacy placement // resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving -// configuration name and the set of models that will be used to make -// the search. +// ault_search`. This field is used to identify the serving config +// name and the set of models that will be used to make the search. func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.placement = placement @@ -15162,7 +15158,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -15889,6 +15885,16 @@ func (r *ProjectsLocationsCatalogsUserEventsService) Write(parent string, google return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, +// the user event will be written asynchronously after validation, and +// the API will respond without waiting for the write. Therefore, silent +// failures can occur even if the API returns success. In case of silent +// failures, error messages can be found in Stackdriver logs. +func (c *ProjectsLocationsCatalogsUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCatalogsUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15994,6 +16000,11 @@ func (c *ProjectsLocationsCatalogsUserEventsWriteCall) Do(opts ...googleapi.Call // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", // "required": true, // "type": "string" + // }, + // "writeAsync": { + // "description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v2/{+parent}/userEvents:write", diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index e4118a6d5b5..2d7078e9b86 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -1464,7 +1464,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1492,7 +1492,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1705,7 +1705,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1761,7 +1761,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1933,6 +1933,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", + "location": "query", + "type": "boolean" } }, "path": "v2alpha/{+parent}/userEvents:write", @@ -2095,7 +2100,7 @@ } } }, - "revision": "20221130", + "revision": "20221214", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3079,7 +3084,7 @@ "id": "GoogleCloudRetailV2alphaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of serving configuration ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", + "description": "Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", "items": { "type": "string" }, @@ -3874,7 +3879,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaModelPageOptimizationConfig": { - "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configurations to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", + "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", "properties": { "pageOptimizationEventType": { diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index cb1ed21ad8d..0edf2bc782b 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -2169,10 +2169,10 @@ func (s *GoogleCloudRetailV2alphaConditionTimeRange) MarshalJSON() ([]byte, erro // be linked to a ServingConfig and affect search or recommendation // results at serving time. type GoogleCloudRetailV2alphaControl struct { - // AssociatedServingConfigIds: Output only. List of serving - // configuration ids that are associated with this control in the same - // Catalog. Note the association is managed via the ServingConfig, this - // is an output only denormalized view. + // AssociatedServingConfigIds: Output only. List of serving config ids + // that are associated with this control in the same Catalog. Note the + // association is managed via the ServingConfig, this is an output only + // denormalized view. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // DisplayName: Required. The human readable control display name. Used @@ -3650,8 +3650,8 @@ func (s *GoogleCloudRetailV2alphaModel) MarshalJSON() ([]byte, error) { // GoogleCloudRetailV2alphaModelPageOptimizationConfig: The // PageOptimizationConfig for model training. This determines how many -// panels to optimize for, and which serving configurations to consider -// for each panel. The purpose of this model is to optimize which +// panels to optimize for, and which serving configs to consider for +// each panel. The purpose of this model is to optimize which // ServingConfig to show on which panels in way that optimizes the // visitors shopping journey. type GoogleCloudRetailV2alphaModelPageOptimizationConfig struct { @@ -15491,10 +15491,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or -// placement for it. For more information, see [Managing serving -// configurations] -// (https://cloud.google.com/retail/docs/manage-configs). The full -// list of available serving configs can be seen at +// placement for it. For more information, see [Manage serving +// configs] (https://cloud.google.com/retail/docs/manage-configs). The +// full list of available serving configs can be seen at // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs. func (r *ProjectsLocationsCatalogsPlacementsService) Predict(placement string, googlecloudretailv2alphapredictrequest *GoogleCloudRetailV2alphaPredictRequest) *ProjectsLocationsCatalogsPlacementsPredictCall { c := &ProjectsLocationsCatalogsPlacementsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -15604,7 +15603,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -15646,9 +15645,8 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // /default_serving_config` or the name of the legacy placement // resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving -// configuration name and the set of models that will be used to make -// the search. +// ault_search`. This field is used to identify the serving config +// name and the set of models that will be used to make the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2alphasearchrequest *GoogleCloudRetailV2alphaSearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { c := &ProjectsLocationsCatalogsPlacementsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.placement = placement @@ -15757,7 +15755,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -16774,10 +16772,9 @@ type ProjectsLocationsCatalogsServingConfigsPredictCall struct { // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or -// placement for it. For more information, see [Managing serving -// configurations] -// (https://cloud.google.com/retail/docs/manage-configs). The full -// list of available serving configs can be seen at +// placement for it. For more information, see [Manage serving +// configs] (https://cloud.google.com/retail/docs/manage-configs). The +// full list of available serving configs can be seen at // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs. func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2alphapredictrequest *GoogleCloudRetailV2alphaPredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -16887,7 +16884,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleap // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -17076,9 +17073,8 @@ type ProjectsLocationsCatalogsServingConfigsSearchCall struct { // /default_serving_config` or the name of the legacy placement // resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving -// configuration name and the set of models that will be used to make -// the search. +// ault_search`. This field is used to identify the serving config +// name and the set of models that will be used to make the search. func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2alphasearchrequest *GoogleCloudRetailV2alphaSearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.placement = placement @@ -17187,7 +17183,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -17914,6 +17910,16 @@ func (r *ProjectsLocationsCatalogsUserEventsService) Write(parent string, google return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, +// the user event will be written asynchronously after validation, and +// the API will respond without waiting for the write. Therefore, silent +// failures can occur even if the API returns success. In case of silent +// failures, error messages can be found in Stackdriver logs. +func (c *ProjectsLocationsCatalogsUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCatalogsUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18020,6 +18026,11 @@ func (c *ProjectsLocationsCatalogsUserEventsWriteCall) Do(opts ...googleapi.Call // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", // "required": true, // "type": "string" + // }, + // "writeAsync": { + // "description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v2alpha/{+parent}/userEvents:write", diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 9169e0cd2ed..c062a3484be 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -1393,7 +1393,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1421,7 +1421,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1634,7 +1634,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1690,7 +1690,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1862,6 +1862,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", + "location": "query", + "type": "boolean" } }, "path": "v2beta/{+parent}/userEvents:write", @@ -2024,7 +2029,7 @@ } } }, - "revision": "20221130", + "revision": "20221214", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2762,7 +2767,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaModelPageOptimizationConfig": { - "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configurations to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", + "description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", "id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", "properties": { "pageOptimizationEventType": { @@ -3631,7 +3636,7 @@ "id": "GoogleCloudRetailV2betaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of serving configuration ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", + "description": "Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", "items": { "type": "string" }, diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 66abd7f92bd..6826973e245 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -1623,8 +1623,8 @@ func (s *GoogleCloudRetailV2alphaModel) MarshalJSON() ([]byte, error) { // GoogleCloudRetailV2alphaModelPageOptimizationConfig: The // PageOptimizationConfig for model training. This determines how many -// panels to optimize for, and which serving configurations to consider -// for each panel. The purpose of this model is to optimize which +// panels to optimize for, and which serving configs to consider for +// each panel. The purpose of this model is to optimize which // ServingConfig to show on which panels in way that optimizes the // visitors shopping journey. type GoogleCloudRetailV2alphaModelPageOptimizationConfig struct { @@ -3288,10 +3288,10 @@ func (s *GoogleCloudRetailV2betaConditionTimeRange) MarshalJSON() ([]byte, error // be linked to a ServingConfig and affect search or recommendation // results at serving time. type GoogleCloudRetailV2betaControl struct { - // AssociatedServingConfigIds: Output only. List of serving - // configuration ids that are associated with this control in the same - // Catalog. Note the association is managed via the ServingConfig, this - // is an output only denormalized view. + // AssociatedServingConfigIds: Output only. List of serving config ids + // that are associated with this control in the same Catalog. Note the + // association is managed via the ServingConfig, this is an output only + // denormalized view. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // DisplayName: Required. The human readable control display name. Used @@ -15017,10 +15017,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or -// placement for it. For more information, see [Managing serving -// configurations] -// (https://cloud.google.com/retail/docs/manage-configs). The full -// list of available serving configs can be seen at +// placement for it. For more information, see [Manage serving +// configs] (https://cloud.google.com/retail/docs/manage-configs). The +// full list of available serving configs can be seen at // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs. func (r *ProjectsLocationsCatalogsPlacementsService) Predict(placement string, googlecloudretailv2betapredictrequest *GoogleCloudRetailV2betaPredictRequest) *ProjectsLocationsCatalogsPlacementsPredictCall { c := &ProjectsLocationsCatalogsPlacementsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -15130,7 +15129,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -15172,9 +15171,8 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // /default_serving_config` or the name of the legacy placement // resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving -// configuration name and the set of models that will be used to make -// the search. +// ault_search`. This field is used to identify the serving config +// name and the set of models that will be used to make the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2betasearchrequest *GoogleCloudRetailV2betaSearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { c := &ProjectsLocationsCatalogsPlacementsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.placement = placement @@ -15283,7 +15281,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -16300,10 +16298,9 @@ type ProjectsLocationsCatalogsServingConfigsPredictCall struct { // `placements` is a legacy resource. The ID of the Recommendations AI // serving config or placement. Before you can request predictions // from your model, you must create at least one serving config or -// placement for it. For more information, see [Managing serving -// configurations] -// (https://cloud.google.com/retail/docs/manage-configs). The full -// list of available serving configs can be seen at +// placement for it. For more information, see [Manage serving +// configs] (https://cloud.google.com/retail/docs/manage-configs). The +// full list of available serving configs can be seen at // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs. func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2betapredictrequest *GoogleCloudRetailV2betaPredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -16413,7 +16410,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleap // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Managing serving configurations] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", + // "description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -16602,9 +16599,8 @@ type ProjectsLocationsCatalogsServingConfigsSearchCall struct { // /default_serving_config` or the name of the legacy placement // resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving -// configuration name and the set of models that will be used to make -// the search. +// ault_search`. This field is used to identify the serving config +// name and the set of models that will be used to make the search. func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2betasearchrequest *GoogleCloudRetailV2betaSearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.placement = placement @@ -16713,7 +16709,7 @@ func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -17440,6 +17436,16 @@ func (r *ProjectsLocationsCatalogsUserEventsService) Write(parent string, google return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, +// the user event will be written asynchronously after validation, and +// the API will respond without waiting for the write. Therefore, silent +// failures can occur even if the API returns success. In case of silent +// failures, error messages can be found in Stackdriver logs. +func (c *ProjectsLocationsCatalogsUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCatalogsUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17545,6 +17551,11 @@ func (c *ProjectsLocationsCatalogsUserEventsWriteCall) Do(opts ...googleapi.Call // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", // "required": true, // "type": "string" + // }, + // "writeAsync": { + // "description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v2beta/{+parent}/userEvents:write", diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index c9199742f5c..0f699f341dd 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -119,7 +119,7 @@ ], "parameters": { "parent": { - "description": "Required. Name of the parent to groupBy. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^folders/[^/]+$", "required": true, @@ -180,7 +180,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent assets should belong to. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. The name of the parent that the listed assets belong to. Its format is \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^folders/[^/]+$", "required": true, @@ -260,7 +260,7 @@ "type": "string" }, "parent": { - "description": "Required. Resource name of the new BigQuery export's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^folders/[^/]+$", "required": true, @@ -288,7 +288,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", "location": "path", "pattern": "^folders/[^/]+/bigQueryExports/[^/]+$", "required": true, @@ -601,7 +601,7 @@ ], "parameters": { "configId": { - "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contain alphanumeric characters, underscores or hyphens only.", + "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", "location": "query", "type": "string" }, @@ -695,7 +695,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list notification configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^folders/[^/]+$", "required": true, @@ -769,7 +769,7 @@ "type": "string" }, "parent": { - "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^folders/[^/]+$", "required": true, @@ -952,6 +952,7 @@ ], "parameters": { "name": { + "description": "Required. 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}\".", "location": "path", "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -1130,7 +1131,7 @@ ], "parameters": { "parent": { - "description": "Required. Name of the parent to groupBy. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -1191,7 +1192,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent assets should belong to. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. The name of the parent that the listed assets belong to. Its format is \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -1299,7 +1300,7 @@ "type": "string" }, "parent": { - "description": "Required. Resource name of the new BigQuery export's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -1327,7 +1328,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", "location": "path", "pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", "required": true, @@ -1640,7 +1641,7 @@ ], "parameters": { "configId": { - "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contain alphanumeric characters, underscores or hyphens only.", + "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", "location": "query", "type": "string" }, @@ -1734,7 +1735,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list notification configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -2009,7 +2010,7 @@ "type": "string" }, "parent": { - "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -2315,6 +2316,7 @@ ], "parameters": { "name": { + "description": "Required. 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}\".", "location": "path", "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -2432,7 +2434,7 @@ ], "parameters": { "parent": { - "description": "Required. Name of the parent to groupBy. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2493,7 +2495,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent assets should belong to. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. The name of the parent that the listed assets belong to. Its format is \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2573,7 +2575,7 @@ "type": "string" }, "parent": { - "description": "Required. Resource name of the new BigQuery export's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2601,7 +2603,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", "location": "path", "pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", "required": true, @@ -2914,7 +2916,7 @@ ], "parameters": { "configId": { - "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contain alphanumeric characters, underscores or hyphens only.", + "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", "location": "query", "type": "string" }, @@ -3008,7 +3010,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list notification configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -3082,7 +3084,7 @@ "type": "string" }, "parent": { - "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -3265,6 +3267,7 @@ ], "parameters": { "name": { + "description": "Required. 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}\".", "location": "path", "pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -3369,7 +3372,7 @@ } } }, - "revision": "20221205", + "revision": "20221208", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -3708,11 +3711,11 @@ "type": "object" }, "Contact": { - "description": "Representa a single contact's email address", + "description": "The email address of a contact.", "id": "Contact", "properties": { "email": { - "description": "An email address e.g. \"person123@company.com\"", + "description": "An email address. For example, \"`person123@company.com`\".", "type": "string" } }, @@ -4442,7 +4445,7 @@ "description": "The Role or ClusterRole referenced by the binding." }, "subjects": { - "description": "Represents the subjects(s) bound to the role. Not always available for PATCH requests.", + "description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", "items": { "$ref": "Subject" }, @@ -5153,7 +5156,7 @@ "type": "object" }, "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. Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise", + "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).", "id": "Indicator", "properties": { "domains": { @@ -5164,7 +5167,7 @@ "type": "array" }, "ipAddresses": { - "description": "List of ip addresses associated to the Finding.", + "description": "The list of IP addresses that are associated with the finding.", "items": { "type": "string" }, @@ -5196,7 +5199,7 @@ "type": "string" }, "unexpectedCodeModification": { - "description": "True when unexpected modifications of kernel read-only data memory are present.", + "description": "True when unexpected modifications of kernel code memory are present.", "type": "boolean" }, "unexpectedFtraceHandler": { @@ -5220,7 +5223,7 @@ "type": "boolean" }, "unexpectedReadOnlyDataModification": { - "description": "Flag indicating unexpected modifications of kernel read-only data memory.", + "description": "True when unexpected modifications of kernel read-only data memory are present.", "type": "boolean" }, "unexpectedSystemCallHandler": { @@ -5231,7 +5234,7 @@ "type": "object" }, "Kubernetes": { - "description": "Kubernetes related attributes.", + "description": "Kubernetes-related attributes.", "id": "Kubernetes", "properties": { "accessReviews": { @@ -6224,7 +6227,7 @@ "type": "object" }, "SetFindingStateRequest": { - "description": "Request message for updating a finding's state. 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}\".", + "description": "Request message for updating a finding's state.", "id": "SetFindingStateRequest", "properties": { "startTime": { diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index bbcf25c3556..22a762761d0 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -1068,9 +1068,9 @@ func (s *Connection) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Contact: Representa a single contact's email address +// Contact: The email address of a contact. type Contact struct { - // Email: An email address e.g. "person123@company.com" + // Email: An email address. For example, "person123@company.com". Email string `json:"email,omitempty"` // ForceSendFields is a list of field names (e.g. "Email") to @@ -2214,8 +2214,8 @@ type GoogleCloudSecuritycenterV1Binding struct { // Role: The Role or ClusterRole referenced by the binding. Role *Role `json:"role,omitempty"` - // Subjects: Represents the subjects(s) bound to the role. Not always - // available for PATCH requests. + // Subjects: Represents one or more subjects that are bound to the role. + // Not always available for PATCH requests. Subjects []*Subject `json:"subjects,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to @@ -3447,16 +3447,18 @@ func (s *IamPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Indicator: Represents what's commonly known as an Indicator of -// compromise (IoC) in computer forensics. This is an artifact observed +// Indicator: 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. Reference: -// https://en.wikipedia.org/wiki/Indicator_of_compromise +// indicates a computer intrusion. For more information, see Indicator +// of compromise +// (https://en.wikipedia.org/wiki/Indicator_of_compromise). type Indicator struct { // Domains: List of domains associated to the Finding. Domains []string `json:"domains,omitempty"` - // IpAddresses: List of ip addresses associated to the Finding. + // IpAddresses: The list of IP addresses that are associated with the + // finding. IpAddresses []string `json:"ipAddresses,omitempty"` // Signatures: The list of matched signatures indicating that the given @@ -3495,7 +3497,7 @@ type KernelRootkit struct { Name string `json:"name,omitempty"` // UnexpectedCodeModification: True when unexpected modifications of - // kernel read-only data memory are present. + // kernel code memory are present. UnexpectedCodeModification bool `json:"unexpectedCodeModification,omitempty"` // UnexpectedFtraceHandler: True when `ftrace` points are present with @@ -3521,8 +3523,8 @@ type KernelRootkit struct { // but not in the process task list. UnexpectedProcessesInRunqueue bool `json:"unexpectedProcessesInRunqueue,omitempty"` - // UnexpectedReadOnlyDataModification: Flag indicating unexpected - // modifications of kernel read-only data memory. + // UnexpectedReadOnlyDataModification: True when unexpected + // modifications of kernel read-only data memory are present. UnexpectedReadOnlyDataModification bool `json:"unexpectedReadOnlyDataModification,omitempty"` // UnexpectedSystemCallHandler: True when system call handlers that are @@ -3552,7 +3554,7 @@ func (s *KernelRootkit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Kubernetes: Kubernetes related attributes. +// Kubernetes: Kubernetes-related attributes. type Kubernetes struct { // AccessReviews: Provides information on any Kubernetes access reviews // (i.e. privilege checks) relevant to the finding. @@ -4994,13 +4996,7 @@ func (s *ServiceAccountDelegationInfo) MarshalJSON() ([]byte, error) { } // SetFindingStateRequest: Request message for updating a finding's -// state. 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}". +// state. type SetFindingStateRequest struct { // StartTime: Required. The time at which the updated state takes // effect. @@ -5431,9 +5427,9 @@ type FoldersAssetsGroupCall struct { // Group: Filters an organization's assets and groups them by their // specified properties. // -// - parent: Name of the parent to groupBy. Its format is -// "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// - parent: The name of the parent to group the assets by. Its format +// is "organizations/[organization_id]", "folders/[folder_id]", or +// "projects/[project_id]". func (r *FoldersAssetsService) Group(parent string, groupassetsrequest *GroupAssetsRequest) *FoldersAssetsGroupCall { c := &FoldersAssetsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -5541,7 +5537,7 @@ func (c *FoldersAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssetsR // ], // "parameters": { // "parent": { - // "description": "Required. Name of the parent to groupBy. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^folders/[^/]+$", // "required": true, @@ -5596,9 +5592,9 @@ type FoldersAssetsListCall struct { // List: Lists an organization's assets. // -// - parent: Name of the parent assets should belong to. Its format is -// "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// - parent: The name of the parent that the listed assets belong to. +// Its format is "organizations/[organization_id], +// "folders/[folder_id]", or "projects/[project_id]". func (r *FoldersAssetsService) List(parent string) *FoldersAssetsListCall { c := &FoldersAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -5869,7 +5865,7 @@ func (c *FoldersAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsRes // "type": "string" // }, // "parent": { - // "description": "Required. Name of the parent assets should belong to. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. The name of the parent that the listed assets belong to. Its format is \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^folders/[^/]+$", // "required": true, @@ -6105,9 +6101,9 @@ type FoldersBigQueryExportsCreateCall struct { // Create: Creates a BigQuery export. // -// - parent: Resource name of the new BigQuery export's parent. Its -// format is "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". +// - parent: The name of the parent resource of the new BigQuery export. +// Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". func (r *FoldersBigQueryExportsService) Create(parent string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *FoldersBigQueryExportsCreateCall { c := &FoldersBigQueryExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -6232,7 +6228,7 @@ func (c *FoldersBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*Go // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the new BigQuery export's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^folders/[^/]+$", // "required": true, @@ -6265,7 +6261,7 @@ type FoldersBigQueryExportsDeleteCall struct { // Delete: Deletes an existing BigQuery export. // -// - name: Name of the BigQuery export to delete. Its format is +// - name: The name of the BigQuery export to delete. Its format is // organizations/{organization}/bigQueryExports/{export_id}, // folders/{folder}/bigQueryExports/{export_id}, or // projects/{project}/bigQueryExports/{export_id}. @@ -6370,7 +6366,7 @@ func (c *FoldersBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption) (*Em // ], // "parameters": { // "name": { - // "description": "Required. Name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", // "location": "path", // "pattern": "^folders/[^/]+/bigQueryExports/[^/]+$", // "required": true, @@ -7881,8 +7877,8 @@ func (r *FoldersNotificationConfigsService) Create(parent string, notificationco // ConfigId sets the optional parameter "configId": Required. Unique // identifier provided by the client within the parent scope. It must be -// between 1 and 128 characters, and contain alphanumeric characters, -// underscores or hyphens only. +// between 1 and 128 characters and contain alphanumeric characters, +// underscores, or hyphens only. func (c *FoldersNotificationConfigsCreateCall) ConfigId(configId string) *FoldersNotificationConfigsCreateCall { c.urlParams_.Set("configId", configId) return c @@ -7988,7 +7984,7 @@ func (c *FoldersNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "configId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contain alphanumeric characters, underscores or hyphens only.", + // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", // "location": "query", // "type": "string" // }, @@ -8311,9 +8307,9 @@ type FoldersNotificationConfigsListCall struct { // List: Lists notification configs. // -// - parent: Name of the parent to list notification configs. Its format -// is "organizations/[organization_id]", "folders/[folder_id]", or -// "projects/[project_id]". +// - parent: The name of the parent in which to list the notification +// configurations. Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". func (r *FoldersNotificationConfigsService) List(parent string) *FoldersNotificationConfigsListCall { c := &FoldersNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -8456,7 +8452,7 @@ func (c *FoldersNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "parent": { - // "description": "Required. Name of the parent to list notification configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^folders/[^/]+$", // "required": true, @@ -8672,8 +8668,8 @@ type FoldersSourcesListCall struct { // List: Lists all sources belonging to an organization. // // - parent: Resource name of the parent of sources to list. Its format -// should be "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// should be "organizations/[organization_id], "folders/[folder_id]", +// or "projects/[project_id]". func (r *FoldersSourcesService) List(parent string) *FoldersSourcesListCall { c := &FoldersSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -8816,7 +8812,7 @@ func (c *FoldersSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesR // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^folders/[^/]+$", // "required": true, @@ -9682,7 +9678,13 @@ type FoldersSourcesFindingsSetStateCall struct { // SetState: Updates the state of a finding. // -// - name: . +// - name: 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/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". func (r *FoldersSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *FoldersSourcesFindingsSetStateCall { c := &FoldersSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -9790,6 +9792,7 @@ func (c *FoldersSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { + // "description": "Required. 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}\".", // "location": "path", // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, @@ -10470,9 +10473,9 @@ type OrganizationsAssetsGroupCall struct { // Group: Filters an organization's assets and groups them by their // specified properties. // -// - parent: Name of the parent to groupBy. Its format is -// "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// - parent: The name of the parent to group the assets by. Its format +// is "organizations/[organization_id]", "folders/[folder_id]", or +// "projects/[project_id]". func (r *OrganizationsAssetsService) Group(parent string, groupassetsrequest *GroupAssetsRequest) *OrganizationsAssetsGroupCall { c := &OrganizationsAssetsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -10580,7 +10583,7 @@ func (c *OrganizationsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupA // ], // "parameters": { // "parent": { - // "description": "Required. Name of the parent to groupBy. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, @@ -10635,9 +10638,9 @@ type OrganizationsAssetsListCall struct { // List: Lists an organization's assets. // -// - parent: Name of the parent assets should belong to. Its format is -// "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// - parent: The name of the parent that the listed assets belong to. +// Its format is "organizations/[organization_id], +// "folders/[folder_id]", or "projects/[project_id]". func (r *OrganizationsAssetsService) List(parent string) *OrganizationsAssetsListCall { c := &OrganizationsAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -10908,7 +10911,7 @@ func (c *OrganizationsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAss // "type": "string" // }, // "parent": { - // "description": "Required. Name of the parent assets should belong to. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. The name of the parent that the listed assets belong to. Its format is \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, @@ -11290,9 +11293,9 @@ type OrganizationsBigQueryExportsCreateCall struct { // Create: Creates a BigQuery export. // -// - parent: Resource name of the new BigQuery export's parent. Its -// format is "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". +// - parent: The name of the parent resource of the new BigQuery export. +// Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". func (r *OrganizationsBigQueryExportsService) Create(parent string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *OrganizationsBigQueryExportsCreateCall { c := &OrganizationsBigQueryExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -11417,7 +11420,7 @@ func (c *OrganizationsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the new BigQuery export's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, @@ -11450,7 +11453,7 @@ type OrganizationsBigQueryExportsDeleteCall struct { // Delete: Deletes an existing BigQuery export. // -// - name: Name of the BigQuery export to delete. Its format is +// - name: The name of the BigQuery export to delete. Its format is // organizations/{organization}/bigQueryExports/{export_id}, // folders/{folder}/bigQueryExports/{export_id}, or // projects/{project}/bigQueryExports/{export_id}. @@ -11555,7 +11558,7 @@ func (c *OrganizationsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption // ], // "parameters": { // "name": { - // "description": "Required. Name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", // "location": "path", // "pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", // "required": true, @@ -13066,8 +13069,8 @@ func (r *OrganizationsNotificationConfigsService) Create(parent string, notifica // ConfigId sets the optional parameter "configId": Required. Unique // identifier provided by the client within the parent scope. It must be -// between 1 and 128 characters, and contain alphanumeric characters, -// underscores or hyphens only. +// between 1 and 128 characters and contain alphanumeric characters, +// underscores, or hyphens only. func (c *OrganizationsNotificationConfigsCreateCall) ConfigId(configId string) *OrganizationsNotificationConfigsCreateCall { c.urlParams_.Set("configId", configId) return c @@ -13173,7 +13176,7 @@ func (c *OrganizationsNotificationConfigsCreateCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "configId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contain alphanumeric characters, underscores or hyphens only.", + // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", // "location": "query", // "type": "string" // }, @@ -13496,9 +13499,9 @@ type OrganizationsNotificationConfigsListCall struct { // List: Lists notification configs. // -// - parent: Name of the parent to list notification configs. Its format -// is "organizations/[organization_id]", "folders/[folder_id]", or -// "projects/[project_id]". +// - parent: The name of the parent in which to list the notification +// configurations. Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". func (r *OrganizationsNotificationConfigsService) List(parent string) *OrganizationsNotificationConfigsListCall { c := &OrganizationsNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -13641,7 +13644,7 @@ func (c *OrganizationsNotificationConfigsListCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "parent": { - // "description": "Required. Name of the parent to list notification configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, @@ -14929,8 +14932,8 @@ type OrganizationsSourcesListCall struct { // List: Lists all sources belonging to an organization. // // - parent: Resource name of the parent of sources to list. Its format -// should be "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// should be "organizations/[organization_id], "folders/[folder_id]", +// or "projects/[project_id]". func (r *OrganizationsSourcesService) List(parent string) *OrganizationsSourcesListCall { c := &OrganizationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -15073,7 +15076,7 @@ func (c *OrganizationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSo // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, @@ -16546,7 +16549,13 @@ type OrganizationsSourcesFindingsSetStateCall struct { // SetState: Updates the state of a finding. // -// - name: . +// - name: 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/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". func (r *OrganizationsSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *OrganizationsSourcesFindingsSetStateCall { c := &OrganizationsSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -16654,6 +16663,7 @@ func (c *OrganizationsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "name": { + // "description": "Required. 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}\".", // "location": "path", // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, @@ -17028,9 +17038,9 @@ type ProjectsAssetsGroupCall struct { // Group: Filters an organization's assets and groups them by their // specified properties. // -// - parent: Name of the parent to groupBy. Its format is -// "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// - parent: The name of the parent to group the assets by. Its format +// is "organizations/[organization_id]", "folders/[folder_id]", or +// "projects/[project_id]". func (r *ProjectsAssetsService) Group(parent string, groupassetsrequest *GroupAssetsRequest) *ProjectsAssetsGroupCall { c := &ProjectsAssetsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -17138,7 +17148,7 @@ func (c *ProjectsAssetsGroupCall) Do(opts ...googleapi.CallOption) (*GroupAssets // ], // "parameters": { // "parent": { - // "description": "Required. Name of the parent to groupBy. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, @@ -17193,9 +17203,9 @@ type ProjectsAssetsListCall struct { // List: Lists an organization's assets. // -// - parent: Name of the parent assets should belong to. Its format is -// "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// - parent: The name of the parent that the listed assets belong to. +// Its format is "organizations/[organization_id], +// "folders/[folder_id]", or "projects/[project_id]". func (r *ProjectsAssetsService) List(parent string) *ProjectsAssetsListCall { c := &ProjectsAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -17466,7 +17476,7 @@ func (c *ProjectsAssetsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsRe // "type": "string" // }, // "parent": { - // "description": "Required. Name of the parent assets should belong to. Its format is \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. The name of the parent that the listed assets belong to. Its format is \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, @@ -17702,9 +17712,9 @@ type ProjectsBigQueryExportsCreateCall struct { // Create: Creates a BigQuery export. // -// - parent: Resource name of the new BigQuery export's parent. Its -// format is "organizations/[organization_id]", "folders/[folder_id]", -// or "projects/[project_id]". +// - parent: The name of the parent resource of the new BigQuery export. +// Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". func (r *ProjectsBigQueryExportsService) Create(parent string, googlecloudsecuritycenterv1bigqueryexport *GoogleCloudSecuritycenterV1BigQueryExport) *ProjectsBigQueryExportsCreateCall { c := &ProjectsBigQueryExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -17829,7 +17839,7 @@ func (c *ProjectsBigQueryExportsCreateCall) Do(opts ...googleapi.CallOption) (*G // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the new BigQuery export's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, @@ -17862,7 +17872,7 @@ type ProjectsBigQueryExportsDeleteCall struct { // Delete: Deletes an existing BigQuery export. // -// - name: Name of the BigQuery export to delete. Its format is +// - name: The name of the BigQuery export to delete. Its format is // organizations/{organization}/bigQueryExports/{export_id}, // folders/{folder}/bigQueryExports/{export_id}, or // projects/{project}/bigQueryExports/{export_id}. @@ -17967,7 +17977,7 @@ func (c *ProjectsBigQueryExportsDeleteCall) Do(opts ...googleapi.CallOption) (*E // ], // "parameters": { // "name": { - // "description": "Required. Name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", + // "description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", // "location": "path", // "pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", // "required": true, @@ -19478,8 +19488,8 @@ func (r *ProjectsNotificationConfigsService) Create(parent string, notificationc // ConfigId sets the optional parameter "configId": Required. Unique // identifier provided by the client within the parent scope. It must be -// between 1 and 128 characters, and contain alphanumeric characters, -// underscores or hyphens only. +// between 1 and 128 characters and contain alphanumeric characters, +// underscores, or hyphens only. func (c *ProjectsNotificationConfigsCreateCall) ConfigId(configId string) *ProjectsNotificationConfigsCreateCall { c.urlParams_.Set("configId", configId) return c @@ -19585,7 +19595,7 @@ func (c *ProjectsNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "configId": { - // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contain alphanumeric characters, underscores or hyphens only.", + // "description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", // "location": "query", // "type": "string" // }, @@ -19908,9 +19918,9 @@ type ProjectsNotificationConfigsListCall struct { // List: Lists notification configs. // -// - parent: Name of the parent to list notification configs. Its format -// is "organizations/[organization_id]", "folders/[folder_id]", or -// "projects/[project_id]". +// - parent: The name of the parent in which to list the notification +// configurations. Its format is "organizations/[organization_id]", +// "folders/[folder_id]", or "projects/[project_id]". func (r *ProjectsNotificationConfigsService) List(parent string) *ProjectsNotificationConfigsListCall { c := &ProjectsNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -20053,7 +20063,7 @@ func (c *ProjectsNotificationConfigsListCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "parent": { - // "description": "Required. Name of the parent to list notification configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", + // "description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, @@ -20269,8 +20279,8 @@ type ProjectsSourcesListCall struct { // List: Lists all sources belonging to an organization. // // - parent: Resource name of the parent of sources to list. Its format -// should be "organizations/[organization_id], folders/[folder_id], or -// projects/[project_id]". +// should be "organizations/[organization_id], "folders/[folder_id]", +// or "projects/[project_id]". func (r *ProjectsSourcesService) List(parent string) *ProjectsSourcesListCall { c := &ProjectsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -20413,7 +20423,7 @@ func (c *ProjectsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSources // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], folders/[folder_id], or projects/[project_id]\".", + // "description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id], \"folders/[folder_id]\", or \"projects/[project_id]\".", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, @@ -21279,7 +21289,13 @@ type ProjectsSourcesFindingsSetStateCall struct { // SetState: Updates the state of a finding. // -// - name: . +// - name: 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/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". func (r *ProjectsSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *ProjectsSourcesFindingsSetStateCall { c := &ProjectsSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21387,6 +21403,7 @@ func (c *ProjectsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "name": { + // "description": "Required. 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}\".", // "location": "path", // "pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index 0025b15dadb..731ee5ac981 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20221205", + "revision": "20221208", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1211,11 +1211,11 @@ "type": "object" }, "Contact": { - "description": "Representa a single contact's email address", + "description": "The email address of a contact.", "id": "Contact", "properties": { "email": { - "description": "An email address e.g. \"person123@company.com\"", + "description": "An email address. For example, \"`person123@company.com`\".", "type": "string" } }, @@ -1945,7 +1945,7 @@ "description": "The Role or ClusterRole referenced by the binding." }, "subjects": { - "description": "Represents the subjects(s) bound to the role. Not always available for PATCH requests.", + "description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", "items": { "$ref": "Subject" }, @@ -2711,7 +2711,7 @@ "type": "object" }, "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. Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise", + "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).", "id": "Indicator", "properties": { "domains": { @@ -2722,7 +2722,7 @@ "type": "array" }, "ipAddresses": { - "description": "List of ip addresses associated to the Finding.", + "description": "The list of IP addresses that are associated with the finding.", "items": { "type": "string" }, @@ -2754,7 +2754,7 @@ "type": "string" }, "unexpectedCodeModification": { - "description": "True when unexpected modifications of kernel read-only data memory are present.", + "description": "True when unexpected modifications of kernel code memory are present.", "type": "boolean" }, "unexpectedFtraceHandler": { @@ -2778,7 +2778,7 @@ "type": "boolean" }, "unexpectedReadOnlyDataModification": { - "description": "Flag indicating unexpected modifications of kernel read-only data memory.", + "description": "True when unexpected modifications of kernel read-only data memory are present.", "type": "boolean" }, "unexpectedSystemCallHandler": { @@ -2789,7 +2789,7 @@ "type": "object" }, "Kubernetes": { - "description": "Kubernetes related attributes.", + "description": "Kubernetes-related attributes.", "id": "Kubernetes", "properties": { "accessReviews": { diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 17f1f77ad79..0c1a831a7e1 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -735,9 +735,9 @@ func (s *Connection) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Contact: Representa a single contact's email address +// Contact: The email address of a contact. type Contact struct { - // Email: An email address e.g. "person123@company.com" + // Email: An email address. For example, "person123@company.com". Email string `json:"email,omitempty"` // ForceSendFields is a list of field names (e.g. "Email") to @@ -1873,8 +1873,8 @@ type GoogleCloudSecuritycenterV1Binding struct { // Role: The Role or ClusterRole referenced by the binding. Role *Role `json:"role,omitempty"` - // Subjects: Represents the subjects(s) bound to the role. Not always - // available for PATCH requests. + // Subjects: Represents one or more subjects that are bound to the role. + // Not always available for PATCH requests. Subjects []*Subject `json:"subjects,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to @@ -3138,16 +3138,18 @@ func (s *IamBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Indicator: Represents what's commonly known as an Indicator of -// compromise (IoC) in computer forensics. This is an artifact observed +// Indicator: 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. Reference: -// https://en.wikipedia.org/wiki/Indicator_of_compromise +// indicates a computer intrusion. For more information, see Indicator +// of compromise +// (https://en.wikipedia.org/wiki/Indicator_of_compromise). type Indicator struct { // Domains: List of domains associated to the Finding. Domains []string `json:"domains,omitempty"` - // IpAddresses: List of ip addresses associated to the Finding. + // IpAddresses: The list of IP addresses that are associated with the + // finding. IpAddresses []string `json:"ipAddresses,omitempty"` // Signatures: The list of matched signatures indicating that the given @@ -3186,7 +3188,7 @@ type KernelRootkit struct { Name string `json:"name,omitempty"` // UnexpectedCodeModification: True when unexpected modifications of - // kernel read-only data memory are present. + // kernel code memory are present. UnexpectedCodeModification bool `json:"unexpectedCodeModification,omitempty"` // UnexpectedFtraceHandler: True when `ftrace` points are present with @@ -3212,8 +3214,8 @@ type KernelRootkit struct { // but not in the process task list. UnexpectedProcessesInRunqueue bool `json:"unexpectedProcessesInRunqueue,omitempty"` - // UnexpectedReadOnlyDataModification: Flag indicating unexpected - // modifications of kernel read-only data memory. + // UnexpectedReadOnlyDataModification: True when unexpected + // modifications of kernel read-only data memory are present. UnexpectedReadOnlyDataModification bool `json:"unexpectedReadOnlyDataModification,omitempty"` // UnexpectedSystemCallHandler: True when system call handlers that are @@ -3243,7 +3245,7 @@ func (s *KernelRootkit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Kubernetes: Kubernetes related attributes. +// Kubernetes: Kubernetes-related attributes. type Kubernetes struct { // AccessReviews: Provides information on any Kubernetes access reviews // (i.e. privilege checks) relevant to the finding. diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index fb1f5ce7846..a4e1e93aded 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1981,7 +1981,7 @@ } } }, - "revision": "20221205", + "revision": "20221208", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2187,11 +2187,11 @@ "type": "object" }, "Contact": { - "description": "Representa a single contact's email address", + "description": "The email address of a contact.", "id": "Contact", "properties": { "email": { - "description": "An email address e.g. \"person123@company.com\"", + "description": "An email address. For example, \"`person123@company.com`\".", "type": "string" } }, @@ -2989,7 +2989,7 @@ "description": "The Role or ClusterRole referenced by the binding." }, "subjects": { - "description": "Represents the subjects(s) bound to the role. Not always available for PATCH requests.", + "description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", "items": { "$ref": "Subject" }, @@ -3546,7 +3546,7 @@ "type": "object" }, "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. Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise", + "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).", "id": "Indicator", "properties": { "domains": { @@ -3557,7 +3557,7 @@ "type": "array" }, "ipAddresses": { - "description": "List of ip addresses associated to the Finding.", + "description": "The list of IP addresses that are associated with the finding.", "items": { "type": "string" }, @@ -3589,7 +3589,7 @@ "type": "string" }, "unexpectedCodeModification": { - "description": "True when unexpected modifications of kernel read-only data memory are present.", + "description": "True when unexpected modifications of kernel code memory are present.", "type": "boolean" }, "unexpectedFtraceHandler": { @@ -3613,7 +3613,7 @@ "type": "boolean" }, "unexpectedReadOnlyDataModification": { - "description": "Flag indicating unexpected modifications of kernel read-only data memory.", + "description": "True when unexpected modifications of kernel read-only data memory are present.", "type": "boolean" }, "unexpectedSystemCallHandler": { @@ -3624,7 +3624,7 @@ "type": "object" }, "Kubernetes": { - "description": "Kubernetes related attributes.", + "description": "Kubernetes-related attributes.", "id": "Kubernetes", "properties": { "accessReviews": { diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index cb6e2dd2922..19ff39a9f21 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -727,9 +727,9 @@ func (s *Connection) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Contact: Representa a single contact's email address +// Contact: The email address of a contact. type Contact struct { - // Email: An email address e.g. "person123@company.com" + // Email: An email address. For example, "person123@company.com". Email string `json:"email,omitempty"` // ForceSendFields is a list of field names (e.g. "Email") to @@ -1886,8 +1886,8 @@ type GoogleCloudSecuritycenterV1Binding struct { // Role: The Role or ClusterRole referenced by the binding. Role *Role `json:"role,omitempty"` - // Subjects: Represents the subjects(s) bound to the role. Not always - // available for PATCH requests. + // Subjects: Represents one or more subjects that are bound to the role. + // Not always available for PATCH requests. Subjects []*Subject `json:"subjects,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to @@ -2735,16 +2735,18 @@ func (s *IamBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Indicator: Represents what's commonly known as an Indicator of -// compromise (IoC) in computer forensics. This is an artifact observed +// Indicator: 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. Reference: -// https://en.wikipedia.org/wiki/Indicator_of_compromise +// indicates a computer intrusion. For more information, see Indicator +// of compromise +// (https://en.wikipedia.org/wiki/Indicator_of_compromise). type Indicator struct { // Domains: List of domains associated to the Finding. Domains []string `json:"domains,omitempty"` - // IpAddresses: List of ip addresses associated to the Finding. + // IpAddresses: The list of IP addresses that are associated with the + // finding. IpAddresses []string `json:"ipAddresses,omitempty"` // Signatures: The list of matched signatures indicating that the given @@ -2783,7 +2785,7 @@ type KernelRootkit struct { Name string `json:"name,omitempty"` // UnexpectedCodeModification: True when unexpected modifications of - // kernel read-only data memory are present. + // kernel code memory are present. UnexpectedCodeModification bool `json:"unexpectedCodeModification,omitempty"` // UnexpectedFtraceHandler: True when `ftrace` points are present with @@ -2809,8 +2811,8 @@ type KernelRootkit struct { // but not in the process task list. UnexpectedProcessesInRunqueue bool `json:"unexpectedProcessesInRunqueue,omitempty"` - // UnexpectedReadOnlyDataModification: Flag indicating unexpected - // modifications of kernel read-only data memory. + // UnexpectedReadOnlyDataModification: True when unexpected + // modifications of kernel read-only data memory are present. UnexpectedReadOnlyDataModification bool `json:"unexpectedReadOnlyDataModification,omitempty"` // UnexpectedSystemCallHandler: True when system call handlers that are @@ -2840,7 +2842,7 @@ func (s *KernelRootkit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Kubernetes: Kubernetes related attributes. +// Kubernetes: Kubernetes-related attributes. type Kubernetes struct { // AccessReviews: Provides information on any Kubernetes access reviews // (i.e. privilege checks) relevant to the finding. diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index df0676133af..4f60c1f6972 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -865,7 +865,7 @@ } } }, - "revision": "20221115", + "revision": "20221212", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -975,6 +975,10 @@ "description": "Request to create a subnetwork in a previously peered service network.", "id": "AddSubnetworkRequest", "properties": { + "allowSubnetCidrRoutesOverlap": { + "description": "Optional. Defines the allowSubnetCidrRoutesOverlap field of the subnet, e.g. Available in alpha and beta according to [Compute API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/subnetworks/insert)", + "type": "boolean" + }, "checkServiceNetworkingUsePermission": { "description": "Optional. The IAM permission check determines whether the consumer project has 'servicenetworking.services.use' permission or not.", "type": "boolean" diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index 3c560e29b9a..ed5c252245f 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -467,6 +467,12 @@ func (s *AddRolesResponse) MarshalJSON() ([]byte, error) { // AddSubnetworkRequest: Request to create a subnetwork in a previously // peered service network. type AddSubnetworkRequest struct { + // AllowSubnetCidrRoutesOverlap: Optional. Defines the + // allowSubnetCidrRoutesOverlap field of the subnet, e.g. Available in + // alpha and beta according to Compute API documentation + // (https://cloud.google.com/compute/docs/reference/rest/beta/subnetworks/insert) + AllowSubnetCidrRoutesOverlap bool `json:"allowSubnetCidrRoutesOverlap,omitempty"` + // CheckServiceNetworkingUsePermission: Optional. The IAM permission // check determines whether the consumer project has // 'servicenetworking.services.use' permission or not. @@ -575,21 +581,21 @@ type AddSubnetworkRequest struct { UseCustomComputeIdempotencyWindow bool `json:"useCustomComputeIdempotencyWindow,omitempty"` // ForceSendFields is a list of field names (e.g. - // "CheckServiceNetworkingUsePermission") to unconditionally include in - // API requests. By default, fields with empty or default values are - // omitted from API requests. However, any non-pointer, non-interface - // field appearing in ForceSendFields will be sent to the server - // regardless of whether the field is empty or not. This may be used to - // include empty fields in Patch requests. + // "AllowSubnetCidrRoutesOverlap") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "CheckServiceNetworkingUsePermission") to include in API requests - // with the JSON null value. By default, fields with empty values are - // omitted from API requests. However, any field with an empty value - // appearing in NullFields will be sent to the server as null. It is an - // error if a field in this list has a non-empty value. This may be used - // to include null fields in Patch requests. + // "AllowSubnetCidrRoutesOverlap") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/slides/v1/slides-api.json b/slides/v1/slides-api.json index 41fb10c2683..b0e347364f3 100644 --- a/slides/v1/slides-api.json +++ b/slides/v1/slides-api.json @@ -313,7 +313,7 @@ } } }, - "revision": "20220722", + "revision": "20221207", "rootUrl": "https://slides.googleapis.com/", "schemas": { "AffineTransform": { @@ -532,14 +532,14 @@ "properties": { "elementProperties": { "$ref": "PageElementProperties", - "description": "The element properties for the image. When the aspect ratio of the provided size does not match the image aspect ratio, the image is scaled and centered with respect to the size in order to maintain aspect ratio. The provided transform is applied after this operation. The PageElementProperties.size property is optional. If you don't specify the size, the default size of the image is used. The PageElementProperties.transform property is optional. If you don't specify a transform, the image will be placed at the top left corner of the page." + "description": "The element properties for the image. When the aspect ratio of the provided size does not match the image aspect ratio, the image is scaled and centered with respect to the size in order to maintain the aspect ratio. The provided transform is applied after this operation. The PageElementProperties.size property is optional. If you don't specify the size, the default size of the image is used. The PageElementProperties.transform property is optional. If you don't specify a transform, the image will be placed at the top-left corner of the page." }, "objectId": { "description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.", "type": "string" }, "url": { - "description": "The image URL. The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format. The provided URL can be at most 2 kB in length. The URL itself is saved with the image, and exposed via the Image.source_url field.", + "description": "The image URL. The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50 MB in size, can't exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF formats. The provided URL can be up to 2 KB in length. The URL is saved with the image, and exposed through the Image.source_url field.", "type": "string" } }, diff --git a/slides/v1/slides-gen.go b/slides/v1/slides-gen.go index 982af86d6c7..dc11174afa9 100644 --- a/slides/v1/slides-gen.go +++ b/slides/v1/slides-gen.go @@ -574,12 +574,12 @@ type CreateImageRequest struct { // ElementProperties: The element properties for the image. When the // aspect ratio of the provided size does not match the image aspect // ratio, the image is scaled and centered with respect to the size in - // order to maintain aspect ratio. The provided transform is applied + // order to maintain the aspect ratio. The provided transform is applied // after this operation. The PageElementProperties.size property is // optional. If you don't specify the size, the default size of the // image is used. The PageElementProperties.transform property is // optional. If you don't specify a transform, the image will be placed - // at the top left corner of the page. + // at the top-left corner of the page. ElementProperties *PageElementProperties `json:"elementProperties,omitempty"` // ObjectId: A user-supplied object ID. If you specify an ID, it must be @@ -593,10 +593,10 @@ type CreateImageRequest struct { // Url: The image URL. The image is fetched once at insertion time and a // copy is stored for display inside the presentation. Images must be - // less than 50MB in size, cannot exceed 25 megapixels, and must be in - // one of PNG, JPEG, or GIF format. The provided URL can be at most 2 kB - // in length. The URL itself is saved with the image, and exposed via - // the Image.source_url field. + // less than 50 MB in size, can't exceed 25 megapixels, and must be in + // one of PNG, JPEG, or GIF formats. The provided URL can be up to 2 KB + // in length. The URL is saved with the image, and exposed through the + // Image.source_url field. Url string `json:"url,omitempty"` // ForceSendFields is a list of field names (e.g. "ElementProperties") diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index 143e68c62d8..9fccff90eb7 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -282,7 +282,7 @@ } } }, - "revision": "20221129", + "revision": "20221209", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -1868,7 +1868,6 @@ "INVALID_INPUT_APK", "INVALID_APK_PREVIEW_SDK", "MATRIX_TOO_LARGE", - "DEVICE_QUOTA_EXCEEDED", "TEST_QUOTA_EXCEEDED", "SERVICE_NOT_ACTIVATED", "UNKNOWN_PERMISSION_ERROR" @@ -1910,7 +1909,6 @@ "Either the provided input APK path was malformed, the APK file does not exist, or the user does not have permission to access the APK file.", "APK is built for a preview SDK which is unsupported", "The matrix expanded to contain too many executions.", - "Deprecated: Not enough device quota to run the executions in this matrix.", "Not enough test quota to run the executions in this matrix.", "A required cloud service api is not activated. See: https://firebase.google.com/docs/test-lab/android/continuous#requirements", "There was an unknown permission issue running this test." diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index e18f41700b4..84ce1105577 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -2802,8 +2802,6 @@ type TestMatrix struct { // unsupported // "MATRIX_TOO_LARGE" - The matrix expanded to contain too many // executions. - // "DEVICE_QUOTA_EXCEEDED" - Deprecated: Not enough device quota to - // run the executions in this matrix. // "TEST_QUOTA_EXCEEDED" - Not enough test quota to run the executions // in this matrix. // "SERVICE_NOT_ACTIVATED" - A required cloud service api is not diff --git a/transcoder/v1/transcoder-api.json b/transcoder/v1/transcoder-api.json index df1129a89cc..3ad32601264 100644 --- a/transcoder/v1/transcoder-api.json +++ b/transcoder/v1/transcoder-api.json @@ -385,7 +385,7 @@ } } }, - "revision": "20221027", + "revision": "20221201", "rootUrl": "https://transcoder.googleapis.com/", "schemas": { "AdBreak": { @@ -805,7 +805,7 @@ "type": "integer" }, "heightPixels": { - "description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used.", + "description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", "format": "int32", "type": "integer" }, @@ -840,7 +840,7 @@ "type": "integer" }, "widthPixels": { - "description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used.", + "description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", "format": "int32", "type": "integer" } @@ -899,7 +899,7 @@ "type": "integer" }, "heightPixels": { - "description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used.", + "description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", "format": "int32", "type": "integer" }, @@ -934,7 +934,7 @@ "type": "integer" }, "widthPixels": { - "description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used.", + "description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", "format": "int32", "type": "integer" } @@ -1439,12 +1439,12 @@ "type": "integer" }, "spriteHeightPixels": { - "description": "Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field).", + "description": "Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field). For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", "format": "int32", "type": "integer" }, "spriteWidthPixels": { - "description": "Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field).", + "description": "Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field). For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", "format": "int32", "type": "integer" }, @@ -1575,7 +1575,7 @@ "type": "integer" }, "heightPixels": { - "description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used.", + "description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", "format": "int32", "type": "integer" }, @@ -1592,7 +1592,7 @@ "type": "string" }, "widthPixels": { - "description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used.", + "description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", "format": "int32", "type": "integer" } diff --git a/transcoder/v1/transcoder-gen.go b/transcoder/v1/transcoder-gen.go index 8ea75d8e19f..756d96f4a36 100644 --- a/transcoder/v1/transcoder-gen.go +++ b/transcoder/v1/transcoder-gen.go @@ -962,7 +962,11 @@ type H264CodecSettings struct { // HeightPixels: The height of the video in pixels. Must be an even // integer. When not specified, the height is adjusted to match the // specified width and input aspect ratio. If both are omitted, the - // input height is used. + // input height is used. For portrait videos that contain horizontal ASR + // and rotation metadata, provide the height, in pixels, per the + // horizontal ASR. The API calculates the width per the horizontal ASR. + // The API detects any rotation metadata and swaps the requested height + // and width for the output. HeightPixels int64 `json:"heightPixels,omitempty"` // PixelFormat: Pixel format to use. The default is `yuv420p`. Supported @@ -1012,7 +1016,11 @@ type H264CodecSettings struct { // WidthPixels: The width of the video in pixels. Must be an even // integer. When not specified, the width is adjusted to match the // specified height and input aspect ratio. If both are omitted, the - // input width is used. + // input width is used. For portrait videos that contain horizontal ASR + // and rotation metadata, provide the width, in pixels, per the + // horizontal ASR. The API calculates the height per the horizontal ASR. + // The API detects any rotation metadata and swaps the requested height + // and width for the output. WidthPixels int64 `json:"widthPixels,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowOpenGop") to @@ -1111,7 +1119,11 @@ type H265CodecSettings struct { // HeightPixels: The height of the video in pixels. Must be an even // integer. When not specified, the height is adjusted to match the // specified width and input aspect ratio. If both are omitted, the - // input height is used. + // input height is used. For portrait videos that contain horizontal ASR + // and rotation metadata, provide the height, in pixels, per the + // horizontal ASR. The API calculates the width per the horizontal ASR. + // The API detects any rotation metadata and swaps the requested height + // and width for the output. HeightPixels int64 `json:"heightPixels,omitempty"` // PixelFormat: Pixel format to use. The default is `yuv420p`. Supported @@ -1165,7 +1177,11 @@ type H265CodecSettings struct { // WidthPixels: The width of the video in pixels. Must be an even // integer. When not specified, the width is adjusted to match the // specified height and input aspect ratio. If both are omitted, the - // input width is used. + // input width is used. For portrait videos that contain horizontal ASR + // and rotation metadata, provide the width, in pixels, per the + // horizontal ASR. The API calculates the height per the horizontal ASR. + // The API detects any rotation metadata and swaps the requested height + // and width for the output. WidthPixels int64 `json:"widthPixels,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowOpenGop") to @@ -1971,14 +1987,22 @@ type SpriteSheet struct { // an even integer. To preserve the source aspect ratio, set the // SpriteSheet.sprite_height_pixels field or the // SpriteSheet.sprite_width_pixels field, but not both (the API will - // automatically calculate the missing field). + // automatically calculate the missing field). For portrait videos that + // contain horizontal ASR and rotation metadata, provide the height, in + // pixels, per the horizontal ASR. The API calculates the width per the + // horizontal ASR. The API detects any rotation metadata and swaps the + // requested height and width for the output. SpriteHeightPixels int64 `json:"spriteHeightPixels,omitempty"` // SpriteWidthPixels: Required. The width of sprite in pixels. Must be // an even integer. To preserve the source aspect ratio, set the // SpriteSheet.sprite_width_pixels field or the // SpriteSheet.sprite_height_pixels field, but not both (the API will - // automatically calculate the missing field). + // automatically calculate the missing field). For portrait videos that + // contain horizontal ASR and rotation metadata, provide the width, in + // pixels, per the horizontal ASR. The API calculates the height per the + // horizontal ASR. The API detects any rotation metadata and swaps the + // requested height and width for the output. SpriteWidthPixels int64 `json:"spriteWidthPixels,omitempty"` // StartTimeOffset: Start time in seconds, relative to the output file @@ -2196,7 +2220,11 @@ type Vp9CodecSettings struct { // HeightPixels: The height of the video in pixels. Must be an even // integer. When not specified, the height is adjusted to match the // specified width and input aspect ratio. If both are omitted, the - // input height is used. + // input height is used. For portrait videos that contain horizontal ASR + // and rotation metadata, provide the height, in pixels, per the + // horizontal ASR. The API calculates the width per the horizontal ASR. + // The API detects any rotation metadata and swaps the requested height + // and width for the output. HeightPixels int64 `json:"heightPixels,omitempty"` // PixelFormat: Pixel format to use. The default is `yuv420p`. Supported @@ -2222,7 +2250,11 @@ type Vp9CodecSettings struct { // WidthPixels: The width of the video in pixels. Must be an even // integer. When not specified, the width is adjusted to match the // specified height and input aspect ratio. If both are omitted, the - // input width is used. + // input width is used. For portrait videos that contain horizontal ASR + // and rotation metadata, provide the width, in pixels, per the + // horizontal ASR. The API calculates the height per the horizontal ASR. + // The API detects any rotation metadata and swaps the requested height + // and width for the output. WidthPixels int64 `json:"widthPixels,omitempty"` // ForceSendFields is a list of field names (e.g. "BitrateBps") to diff --git a/workflowexecutions/v1/workflowexecutions-api.json b/workflowexecutions/v1/workflowexecutions-api.json index af8f059c465..2a4c12e8ea2 100644 --- a/workflowexecutions/v1/workflowexecutions-api.json +++ b/workflowexecutions/v1/workflowexecutions-api.json @@ -224,7 +224,7 @@ ], "enumDescriptions": [ "The default / unset value.", - "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, state and workflow_revision_id.", + "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, duration, state and workflow_revision_id.", "Includes all data." ], "location": "query", @@ -275,7 +275,7 @@ ], "enumDescriptions": [ "The default / unset value.", - "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, state and workflow_revision_id.", + "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, duration, state and workflow_revision_id.", "Includes all data." ], "location": "query", @@ -299,7 +299,7 @@ } } }, - "revision": "20221020", + "revision": "20221201", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "CancelExecutionRequest": { @@ -349,6 +349,12 @@ ], "type": "string" }, + "duration": { + "description": "Output only. Measures the duration of the execution.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, "endTime": { "description": "Output only. Marks the end of execution, successful or not.", "format": "google-datetime", diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index 00f8fe3e4a2..6131b1d14a4 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -242,6 +242,9 @@ type Execution struct { // steps within workflows. CallLogLevel string `json:"callLogLevel,omitempty"` + // Duration: Output only. Measures the duration of the execution. + Duration string `json:"duration,omitempty"` + // EndTime: Output only. Marks the end of execution, successful or not. EndTime string `json:"endTime,omitempty"` @@ -1082,8 +1085,8 @@ func (r *ProjectsLocationsWorkflowsExecutionsService) Get(name string) *Projects // "EXECUTION_VIEW_UNSPECIFIED" - The default / unset value. // "BASIC" - Includes only basic metadata about the execution. // -// Following fields are returned: name, start_time, end_time, state and -// workflow_revision_id. +// Following fields are returned: name, start_time, end_time, duration, +// state and workflow_revision_id. // // "FULL" - Includes all data. func (c *ProjectsLocationsWorkflowsExecutionsGetCall) View(view string) *ProjectsLocationsWorkflowsExecutionsGetCall { @@ -1214,7 +1217,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsGetCall) Do(opts ...googleapi.CallO // ], // "enumDescriptions": [ // "The default / unset value.", - // "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, state and workflow_revision_id.", + // "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, duration, state and workflow_revision_id.", // "Includes all data." // ], // "location": "query", @@ -1287,8 +1290,8 @@ func (c *ProjectsLocationsWorkflowsExecutionsListCall) PageToken(pageToken strin // "EXECUTION_VIEW_UNSPECIFIED" - The default / unset value. // "BASIC" - Includes only basic metadata about the execution. // -// Following fields are returned: name, start_time, end_time, state and -// workflow_revision_id. +// Following fields are returned: name, start_time, end_time, duration, +// state and workflow_revision_id. // // "FULL" - Includes all data. func (c *ProjectsLocationsWorkflowsExecutionsListCall) View(view string) *ProjectsLocationsWorkflowsExecutionsListCall { @@ -1430,7 +1433,7 @@ func (c *ProjectsLocationsWorkflowsExecutionsListCall) Do(opts ...googleapi.Call // ], // "enumDescriptions": [ // "The default / unset value.", - // "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, state and workflow_revision_id.", + // "Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, duration, state and workflow_revision_id.", // "Includes all data." // ], // "location": "query", diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json new file mode 100644 index 00000000000..681a5b92965 --- /dev/null +++ b/workloadmanager/v1/workloadmanager-api.json @@ -0,0 +1,776 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://workloadmanager.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Workload Manager", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://g3doc.corp.google.com/company/teams/compute-fe/index.md?cl=head", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "workloadmanager:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://workloadmanager.mtls.googleapis.com/", + "name": "workloadmanager", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "evaluations": { + "methods": { + "create": { + "description": "Creates a new Evaluation in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations", + "httpMethod": "POST", + "id": "workloadmanager.projects.locations.evaluations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "evaluationId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and evaluation_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the evaluation location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he 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" + } + }, + "path": "v1/{+parent}/evaluations", + "request": { + "$ref": "Evaluation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Evaluation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.evaluations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Evaluation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Evaluations in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.evaluations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListEvaluationsRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/evaluations", + "response": { + "$ref": "ListEvaluationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "workloadmanager.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "workloadmanager.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20221123", + "rootUrl": "https://workloadmanager.googleapis.com/", + "schemas": { + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Evaluation": { + "description": "Message describing Evaluation object", + "id": "Evaluation", + "properties": { + "createTime": { + "description": "Output only. [Output only] Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Description of the Evaluation", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "name of resource names have the form 'projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}'", + "type": "string" + }, + "resourceFilter": { + "$ref": "ResourceFilter", + "description": "annotations as key value pairs" + }, + "resourceStatus": { + "$ref": "ResourceStatus", + "description": "Output only. [Output only] The updated rule ids if exist.", + "readOnly": true + }, + "ruleNames": { + "description": "the name of the rule", + "items": { + "type": "string" + }, + "type": "array" + }, + "ruleVersions": { + "description": "Output only. [Output only] The updated rule ids if exist.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "updateTime": { + "description": "Output only. [Output only] Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GceInstanceFilter": { + "description": "Message describing compute engine instance filter", + "id": "GceInstanceFilter", + "properties": { + "serviceAccounts": { + "description": "Service account of compute engine", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListEvaluationsResponse": { + "description": "Message for response to listing Evaluations", + "id": "ListEvaluationsResponse", + "properties": { + "evaluations": { + "description": "The list of Evaluation", + "items": { + "$ref": "Evaluation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ResourceFilter": { + "description": "Message describing resource filters", + "id": "ResourceFilter", + "properties": { + "gceInstanceFilter": { + "$ref": "GceInstanceFilter", + "description": "Filter compute engine resource" + }, + "inclusionLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The label used for filter resource", + "type": "object" + }, + "resourceIdPatterns": { + "description": "The id pattern for filter resource", + "items": { + "type": "string" + }, + "type": "array" + }, + "scopes": { + "description": "The scopes of evaluation resource", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ResourceStatus": { + "description": "Message describing resource status", + "id": "ResourceStatus", + "properties": { + "rulesNewerVersions": { + "description": "the new version of rule id if exists", + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "description": "State of the resource", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING" + ], + "enumDescriptions": [ + "The state has not been populated in this message.", + "Resource has an active Create operation.", + "Resource has no outstanding operations on it or has active Update operations.", + "Resource has an active Delete operation." + ], + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Workload Manager API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go new file mode 100644 index 00000000000..d290ef067b8 --- /dev/null +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -0,0 +1,2231 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package workloadmanager provides access to the Workload Manager API. +// +// For product documentation, see: https://g3doc.corp.google.com/company/teams/compute-fe/index.md?cl=head +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/workloadmanager/v1" +// ... +// ctx := context.Background() +// workloadmanagerService, err := workloadmanager.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// workloadmanagerService, err := workloadmanager.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// workloadmanagerService, err := workloadmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package workloadmanager // import "google.golang.org/api/workloadmanager/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "workloadmanager:v1" +const apiName = "workloadmanager" +const apiVersion = "v1" +const basePath = "https://workloadmanager.googleapis.com/" +const mtlsBasePath = "https://workloadmanager.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Evaluations = NewProjectsLocationsEvaluationsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Evaluations *ProjectsLocationsEvaluationsService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsEvaluationsService(s *Service) *ProjectsLocationsEvaluationsService { + rs := &ProjectsLocationsEvaluationsService{s: s} + return rs +} + +type ProjectsLocationsEvaluationsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// Evaluation: Message describing Evaluation object +type Evaluation struct { + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + + // Description: Description of the Evaluation + Description string `json:"description,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // Name: name of resource names have the form + // 'projects/{project_id}/locations/{location_id}/evaluations/{evaluation + // _id}' + Name string `json:"name,omitempty"` + + // ResourceFilter: annotations as key value pairs + ResourceFilter *ResourceFilter `json:"resourceFilter,omitempty"` + + // ResourceStatus: Output only. [Output only] The updated rule ids if + // exist. + ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty"` + + // RuleNames: the name of the rule + RuleNames []string `json:"ruleNames,omitempty"` + + // RuleVersions: Output only. [Output only] The updated rule ids if + // exist. + RuleVersions []string `json:"ruleVersions,omitempty"` + + // UpdateTime: Output only. [Output only] Update time stamp + 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. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Evaluation) MarshalJSON() ([]byte, error) { + type NoMethod Evaluation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceInstanceFilter: Message describing compute engine instance filter +type GceInstanceFilter struct { + // ServiceAccounts: Service account of compute engine + ServiceAccounts []string `json:"serviceAccounts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceAccounts") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServiceAccounts") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GceInstanceFilter) MarshalJSON() ([]byte, error) { + type NoMethod GceInstanceFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListEvaluationsResponse: Message for response to listing Evaluations +type ListEvaluationsResponse struct { + // Evaluations: The list of Evaluation + Evaluations []*Evaluation `json:"evaluations,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should 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:"-"` + + // ForceSendFields is a list of field names (e.g. "Evaluations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Evaluations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListEvaluationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListEvaluationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourceFilter: Message describing resource filters +type ResourceFilter struct { + // GceInstanceFilter: Filter compute engine resource + GceInstanceFilter *GceInstanceFilter `json:"gceInstanceFilter,omitempty"` + + // InclusionLabels: The label used for filter resource + InclusionLabels map[string]string `json:"inclusionLabels,omitempty"` + + // ResourceIdPatterns: The id pattern for filter resource + ResourceIdPatterns []string `json:"resourceIdPatterns,omitempty"` + + // Scopes: The scopes of evaluation resource + Scopes []string `json:"scopes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GceInstanceFilter") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GceInstanceFilter") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResourceFilter) MarshalJSON() ([]byte, error) { + type NoMethod ResourceFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourceStatus: Message describing resource status +type ResourceStatus struct { + // RulesNewerVersions: the new version of rule id if exists + RulesNewerVersions []string `json:"rulesNewerVersions,omitempty"` + + // State: State of the resource + // + // Possible values: + // "STATE_UNSPECIFIED" - The state has not been populated in this + // message. + // "CREATING" - Resource has an active Create operation. + // "ACTIVE" - Resource has no outstanding operations on it or has + // active Update operations. + // "DELETING" - Resource has an active Delete operation. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RulesNewerVersions") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RulesNewerVersions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResourceStatus) MarshalJSON() ([]byte, error) { + type NoMethod ResourceStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "workloadmanager.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workloadmanager.projects.locations.evaluations.create": + +type ProjectsLocationsEvaluationsCreateCall struct { + s *Service + parent string + evaluation *Evaluation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Evaluation in a given project and location. +// +// - parent: The resource name of the evaluation location using the +// form: `projects/{project_id}/locations/{location_id}` where +// `location_id` refers to a GCP region. +func (r *ProjectsLocationsEvaluationsService) Create(parent string, evaluation *Evaluation) *ProjectsLocationsEvaluationsCreateCall { + c := &ProjectsLocationsEvaluationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.evaluation = evaluation + return c +} + +// EvaluationId sets the optional parameter "evaluationId": Required. Id +// of the requesting object If auto-generating Id server-side, remove +// this field and evaluation_id from the method_signature of Create RPC +func (c *ProjectsLocationsEvaluationsCreateCall) EvaluationId(evaluationId string) *ProjectsLocationsEvaluationsCreateCall { + c.urlParams_.Set("evaluationId", evaluationId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// 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 will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsEvaluationsCreateCall) RequestId(requestId string) *ProjectsLocationsEvaluationsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsCreateCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.evaluation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Evaluation in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations", + // "httpMethod": "POST", + // "id": "workloadmanager.projects.locations.evaluations.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "evaluationId": { + // "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and evaluation_id from the method_signature of Create RPC", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the evaluation location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he 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" + // } + // }, + // "path": "v1/{+parent}/evaluations", + // "request": { + // "$ref": "Evaluation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.evaluations.get": + +type ProjectsLocationsEvaluationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Evaluation. +// +// - name: Name of the resource. +func (r *ProjectsLocationsEvaluationsService) Get(name string) *ProjectsLocationsEvaluationsGetCall { + c := &ProjectsLocationsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.get" call. +// Exactly one of *Evaluation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Evaluation.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 *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*Evaluation, 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 := &Evaluation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Evaluation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.evaluations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Evaluation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.evaluations.list": + +type ProjectsLocationsEvaluationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Evaluations in a given project and location. +// +// - parent: Parent value for ListEvaluationsRequest. +func (r *ProjectsLocationsEvaluationsService) List(parent string) *ProjectsLocationsEvaluationsListCall { + c := &ProjectsLocationsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsEvaluationsListCall) Filter(filter string) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsEvaluationsListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.list" call. +// Exactly one of *ListEvaluationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListEvaluationsResponse.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 *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*ListEvaluationsResponse, 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 := &ListEvaluationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Evaluations in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.evaluations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListEvaluationsRequest", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/evaluations", + // "response": { + // "$ref": "ListEvaluationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsEvaluationsListCall) Pages(ctx context.Context, f func(*ListEvaluationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workloadmanager.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "workloadmanager.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "workloadmanager.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json new file mode 100644 index 00000000000..494999b8d60 --- /dev/null +++ b/workstations/v1beta/workstations-api.json @@ -0,0 +1,2075 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://workstations.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud Workstations", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/workstations", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "workstations:v1beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://workstations.mtls.googleapis.com/", + "name": "workstations", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "workstations.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "workstations.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "workstations.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "workstationClusters": { + "methods": { + "create": { + "description": "Creates a new WorkstationCluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + }, + "workstationClusterId": { + "description": "Required. ID to use for the cluster.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/workstationClusters", + "request": { + "$ref": "WorkstationCluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified WorkstationCluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + "httpMethod": "DELETE", + "id": "workstations.projects.locations.workstationClusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "If set, the request will be rejected if the latest version of the cluster on the server does not have this etag.", + "location": "query", + "type": "string" + }, + "force": { + "description": "If set, any WorkstationConfigs and Workstations in the cluster will also be deleted. Otherwise, the request will work only if the cluster has no configs or workstations.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the cluster to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the requested WorkstationCluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the requested resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "WorkstationCluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns all WorkstationClusters in the specified location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/workstationClusters", + "response": { + "$ref": "ListWorkstationClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing WorkstationCluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + "httpMethod": "PATCH", + "id": "workstations.projects.locations.workstationClusters.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "If set, and the cluster is not found, a new cluster will be created. In this situation, update_mask is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Full name of this resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask specifying which fields in the cluster should be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "WorkstationCluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "workstationConfigs": { + "methods": { + "create": { + "description": "Creates a new WorkstationConfig.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + }, + "workstationConfigId": { + "description": "Required. ID to use for the config.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/workstationConfigs", + "request": { + "$ref": "WorkstationConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified WorkstationConfig.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + "httpMethod": "DELETE", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "If set, the request will be rejected if the latest version of the config on the server does not have this etag.", + "location": "query", + "type": "string" + }, + "force": { + "description": "If set, any Workstations in the config will also be deleted. Otherwise, the request will work only if the config has no workstations.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the config to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the requested WorkstationConfig.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the requested resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "WorkstationConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:getIamPolicy", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns all WorkstationConfigs in the specified cluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/workstationConfigs", + "response": { + "$ref": "ListWorkstationConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listUsable": { + "description": "Returns all WorkstationConfigs in the specified cluster on which the caller has the \"workstations.workstation.create\" permission.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs:listUsable", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/workstationConfigs:listUsable", + "response": { + "$ref": "ListUsableWorkstationConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing WorkstationConfig.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + "httpMethod": "PATCH", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "If set, and the config is not found, a new config will be created. In this situation, update_mask is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Full name of this resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask specifying which fields in the config should be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "WorkstationConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:setIamPolicy", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:testIamPermissions", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "workstations": { + "methods": { + "create": { + "description": "Creates a new Workstation.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + }, + "workstationId": { + "description": "Required. ID to use for the workstation.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/workstations", + "request": { + "$ref": "Workstation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified Workstation.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + "httpMethod": "DELETE", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "If set, the request will be rejected if the latest version of the workstation on the server does not have this etag.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Name of the workstation to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateAccessToken": { + "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", + "parameterOrder": [ + "workstation" + ], + "parameters": { + "workstation": { + "description": "Required. Name of the workstation for which the access token should be generated.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+workstation}:generateAccessToken", + "request": { + "$ref": "GenerateAccessTokenRequest" + }, + "response": { + "$ref": "GenerateAccessTokenResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the requested Workstation.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the requested resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Workstation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:getIamPolicy", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns all Workstations using the specified config.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/workstations", + "response": { + "$ref": "ListWorkstationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listUsable": { + "description": "Returns all Workstations using the specified config on which the caller has the \"workstations.workstations.use\" permission.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations:listUsable", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/workstations:listUsable", + "response": { + "$ref": "ListUsableWorkstationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing Workstation.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + "httpMethod": "PATCH", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "If set, and the config is not found, a new config will be created. In this situation, update_mask is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Full name of this resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask specifying which fields in the config should be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "Workstation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:setIamPolicy", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "start": { + "description": "Starts running a workstation so that users can connect to it.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:start", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the workstation to start.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:start", + "request": { + "$ref": "StartWorkstationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "stop": { + "description": "Stops running a workstation, reducing costs.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:stop", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the workstation to stop.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:stop", + "request": { + "$ref": "StopWorkstationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:testIamPermissions", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "revision": "20221206", + "rootUrl": "https://workstations.googleapis.com/", + "schemas": { + "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", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Container": { + "description": "A Docker container.", + "id": "Container", + "properties": { + "args": { + "description": "Arguments passed to the entrypoint.", + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "description": "If set, overrides the default ENTRYPOINT specified by the image.", + "items": { + "type": "string" + }, + "type": "array" + }, + "env": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables passed to the container.", + "type": "object" + }, + "image": { + "description": "Docker image defining the container. This image must be accessible by the config's service account.", + "type": "string" + }, + "runAsUser": { + "description": "If set, overrides the USER specified in the image with the given uid.", + "format": "int32", + "type": "integer" + }, + "workingDir": { + "description": "If set, overrides the default DIR specified by the image.", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GceConfidentialInstanceConfig": { + "description": "A set of Confidential Google Compute Engine Instance option.", + "id": "GceConfidentialInstanceConfig", + "properties": { + "enableConfidentialCompute": { + "description": "Whether the instance has confidential compute enabled.", + "type": "boolean" + } + }, + "type": "object" + }, + "GceInstance": { + "description": "A runtime using a Google Compute Engine Instance.", + "id": "GceInstance", + "properties": { + "bootDiskSizeGb": { + "description": "Size of the boot disk in GB.", + "format": "int32", + "type": "integer" + }, + "confidentialInstanceConfig": { + "$ref": "GceConfidentialInstanceConfig", + "description": "A set of Confidential Google Compute Engine Instance option." + }, + "disablePublicIpAddresses": { + "description": "Whether instances have no public IP address.", + "type": "boolean" + }, + "machineType": { + "description": "The name of a Google Compute Engine machine type.", + "type": "string" + }, + "poolSize": { + "description": "Number of instances to pool for faster Workstation starup.", + "format": "int32", + "type": "integer" + }, + "serviceAccount": { + "description": "Email address of the service account that will be used on VM instances used to support this config. This service account must have permission to pull the specified container image. If not set, VMs will run without a service account, in which case the image must be publicly accessible.", + "type": "string" + }, + "shieldedInstanceConfig": { + "$ref": "GceShieldedInstanceConfig", + "description": "A set of Shielded Google Compute Engine Instance options." + }, + "tags": { + "description": "Network tags to add to the Google Compute Engine machines backing the Workstations.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GceRegionalPersistentDisk": { + "description": "A PersistentDirectory backed by a Compute Engine regional persistent disk.", + "id": "GceRegionalPersistentDisk", + "properties": { + "diskType": { + "description": "Type of the disk to use.", + "type": "string" + }, + "fsType": { + "description": "Type of file system that the disk should be formatted with. The Workstation image must support this file system type. Must be empty if source_snapshot is set.", + "type": "string" + }, + "reclaimPolicy": { + "description": "What should happen to the disk after the Workstation is deleted. Defaults to DELETE.", + "enum": [ + "RECLAIM_POLICY_UNSPECIFIED", + "DELETE", + "RETAIN" + ], + "enumDescriptions": [ + "Do not use.", + "The persistent disk will be deleted with the Workstation.", + "The persistent disk will be remain after the workstation is deleted, and the administrator must manually delete the disk." + ], + "type": "string" + }, + "sizeGb": { + "description": "Size of the disk in GB. Must be empty if source_snapshot is set.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GceShieldedInstanceConfig": { + "description": "A set of Shielded Google Compute Engine Instance options.", + "id": "GceShieldedInstanceConfig", + "properties": { + "enableIntegrityMonitoring": { + "description": "Whether the instance has integrity monitoring enabled.", + "type": "boolean" + }, + "enableSecureBoot": { + "description": "Whether the instance has Secure Boot enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Whether the instance has the vTPM enabled.", + "type": "boolean" + } + }, + "type": "object" + }, + "GenerateAccessTokenRequest": { + "description": "Request message for GenerateAccessToken.", + "id": "GenerateAccessTokenRequest", + "properties": { + "expireTime": { + "description": "Desired expiration time of the access token. This value must be at most 24 hours in the future. If a value is not specified, the token's expiration time will be set to a default value of 1 hour in the future.", + "format": "google-datetime", + "type": "string" + }, + "ttl": { + "description": "Desired lifetime duration of the access token. This value must be at most 24 hours. If a value is not specified, the token's lifetime will be set to a default value of 1 hour.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GenerateAccessTokenResponse": { + "description": "Response message for GenerateAccessToken.", + "id": "GenerateAccessTokenResponse", + "properties": { + "accessToken": { + "description": "The generated bearer access token. To use this token, include it in an Authorization header of an HTTP request sent to the associated workstation's hostname, e.g. \"Authorization: Bearer \".", + "type": "string" + }, + "expireTime": { + "description": "Time at which the generated token will expire.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "Host": { + "description": "The system will attempt to keep enough computational resources on standby Runtime host for a Workstation.", + "id": "Host", + "properties": { + "gceInstance": { + "$ref": "GceInstance", + "description": "Specifies a Google Compute Engine Instance as the host." + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListUsableWorkstationConfigsResponse": { + "description": "Response message for ListUsableWorkstationConfigs.", + "id": "ListUsableWorkstationConfigsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstationConfigs": { + "description": "The requested configs.", + "items": { + "$ref": "WorkstationConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListUsableWorkstationsResponse": { + "description": "Response message for ListUsableWorkstations.", + "id": "ListUsableWorkstationsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstations": { + "description": "The requested workstations.", + "items": { + "$ref": "Workstation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWorkstationClustersResponse": { + "description": "Response message for ListWorkstationClusters.", + "id": "ListWorkstationClustersResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstationClusters": { + "description": "The requested clusters.", + "items": { + "$ref": "WorkstationCluster" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWorkstationConfigsResponse": { + "description": "Response message for ListWorkstationConfigs.", + "id": "ListWorkstationConfigsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstationConfigs": { + "description": "The requested configs.", + "items": { + "$ref": "WorkstationConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWorkstationsResponse": { + "description": "Response message for ListWorkstations.", + "id": "ListWorkstationsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstations": { + "description": "The requested workstations.", + "items": { + "$ref": "Workstation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "cancelRequested": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "statusDetail": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PersistentDirectory": { + "description": "A directory persisted across Workstation sessions.", + "id": "PersistentDirectory", + "properties": { + "gcePd": { + "$ref": "GceRegionalPersistentDisk", + "description": "A PersistentDirectory backed by a Compute Engine persistent disk." + }, + "mountPath": { + "description": "Location of this directory in the running Workstation.", + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "PrivateClusterConfig": { + "description": "Configuration options for private clusters.", + "id": "PrivateClusterConfig", + "properties": { + "clusterHostname": { + "description": "Output only. Hostname for the Workstation Cluster. This field will be populated only when private endpoint is enabled. To access workstations in the cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.", + "readOnly": true, + "type": "string" + }, + "enablePrivateEndpoint": { + "description": "Whether Workstations endpoint is private.", + "type": "boolean" + }, + "serviceAttachmentUri": { + "description": "Output only. Service attachment URI for the Workstation Cluster. The service attachemnt is created when private endpoint is enabled. To access workstations in the cluster, configure access to the managed service using (Private Service Connect)[https://cloud.google.com/vpc/docs/configure-private-service-connect-services].", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "StartWorkstationRequest": { + "description": "Request message for StartWorkstation.", + "id": "StartWorkstationRequest", + "properties": { + "etag": { + "description": "If set, the request will be rejected if the latest version of the workstation on the server does not have this etag.", + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "type": "boolean" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StopWorkstationRequest": { + "description": "Request message for StopWorkstation.", + "id": "StopWorkstationRequest", + "properties": { + "etag": { + "description": "If set, the request will be rejected if the latest version of the workstation on the server does not have this etag.", + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request and preview the review, but do not actually apply it.", + "type": "boolean" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Workstation": { + "description": "A single instance of a developer workstation with its own persistent storage.", + "id": "Workstation", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Client-specified annotations.", + "type": "object" + }, + "createTime": { + "description": "Output only. Time when this resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Time when this resource was soft-deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Human-readable name for this resource.", + "type": "string" + }, + "etag": { + "description": "Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding.", + "type": "string" + }, + "host": { + "description": "Output only. Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format \"{port}-{host}\".", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Full name of this resource.", + "type": "string" + }, + "reconciling": { + "description": "Output only. Indicates whether this resource is currently being updated to match its intended state.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. Current state of the workstation.", + "enum": [ + "STATE_UNSPECIFIED", + "STATE_STARTING", + "STATE_RUNNING", + "STATE_STOPPING", + "STATE_STOPPED" + ], + "enumDescriptions": [ + "Do not use.", + "The workstation is not yet ready to accept requests from users but will be soon.", + "The workstation is ready to accept requests from users.", + "The workstation is being stopped.", + "The workstation is stopped and will not be able to receive requests until it is started." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A system-assigned unique identified for this resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when this resource was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WorkstationCluster": { + "description": "A grouping of WorkstationConfigs and their associated Workstations in a region.", + "id": "WorkstationCluster", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Client-specified annotations.", + "type": "object" + }, + "conditions": { + "description": "Output only. Status conditions describing the current resource state.", + "items": { + "$ref": "Status" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Time when this resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "degraded": { + "description": "Output only. Whether this resource is in degraded mode, in which case it may require user action to restore full functionality. Details can be found in the `conditions` field.", + "readOnly": true, + "type": "boolean" + }, + "deleteTime": { + "description": "Output only. Time when this resource was soft-deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Human-readable name for this resource.", + "type": "string" + }, + "etag": { + "description": "Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding.", + "type": "string" + }, + "name": { + "description": "Full name of this resource.", + "type": "string" + }, + "network": { + "description": "Name of the Compute Engine network in which instances associated with this cluster will be created.", + "type": "string" + }, + "privateClusterConfig": { + "$ref": "PrivateClusterConfig", + "description": "Configuration for private cluster." + }, + "reconciling": { + "description": "Output only. Indicates whether this resource is currently being updated to match its intended state.", + "readOnly": true, + "type": "boolean" + }, + "subnetwork": { + "description": "Name of the Compute Engine subnetwork in which instances associated with this cluster will be created. Must be part of the subnetwork specified for this cluster.", + "type": "string" + }, + "uid": { + "description": "Output only. A system-assigned unique identified for this resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when this resource was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WorkstationConfig": { + "description": "A set of configuration options describing how a workstation will be run. WorkstationConfigs are intended to be shared across multiple workstations.", + "id": "WorkstationConfig", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Client-specified annotations.", + "type": "object" + }, + "conditions": { + "description": "Output only. Status conditions describing the current resource state.", + "items": { + "$ref": "Status" + }, + "readOnly": true, + "type": "array" + }, + "container": { + "$ref": "Container", + "description": "Container that will be run for each Workstation using this config when that Workstation is started." + }, + "createTime": { + "description": "Output only. Time when this resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "degraded": { + "description": "Output only. Whether this resource is in degraded mode, in which case it may require user action to restore full functionality. Details can be found in the `conditions` field.", + "readOnly": true, + "type": "boolean" + }, + "deleteTime": { + "description": "Output only. Time when this resource was soft-deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Human-readable name for this resource.", + "type": "string" + }, + "etag": { + "description": "Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding.", + "type": "string" + }, + "host": { + "$ref": "Host", + "description": "Runtime host for the Workstation." + }, + "idleTimeout": { + "description": "How long to wait before automatically stopping an instance that hasn't received any user traffic. A value of 0 indicates that this instance should never time out due to idleness. Defaults to 20 minutes.", + "format": "google-duration", + "type": "string" + }, + "name": { + "description": "Full name of this resource.", + "type": "string" + }, + "persistentDirectories": { + "description": "Directories to persist across Workstation sessions.", + "items": { + "$ref": "PersistentDirectory" + }, + "type": "array" + }, + "reconciling": { + "description": "Output only. Indicates whether this resource is currently being updated to match its intended state.", + "readOnly": true, + "type": "boolean" + }, + "runningTimeout": { + "description": "How long to wait before automatically stopping a workstation after it started. A value of 0 indicates that workstations using this config should never time out. Must be greater than 0 and less than 24 hours if encryption_key is set. Defaults to 12 hours.", + "format": "google-duration", + "type": "string" + }, + "uid": { + "description": "Output only. A system-assigned unique identified for this resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when this resource was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Workstations API", + "version": "v1beta", + "version_module": true +} \ No newline at end of file diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go new file mode 100644 index 00000000000..a245950d88e --- /dev/null +++ b/workstations/v1beta/workstations-gen.go @@ -0,0 +1,6761 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package workstations provides access to the Cloud Workstations API. +// +// For product documentation, see: https://cloud.google.com/workstations +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/workstations/v1beta" +// ... +// ctx := context.Background() +// workstationsService, err := workstations.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// workstationsService, err := workstations.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// workstationsService, err := workstations.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package workstations // import "google.golang.org/api/workstations/v1beta" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "workstations:v1beta" +const apiName = "workstations" +const apiVersion = "v1beta" +const basePath = "https://workstations.googleapis.com/" +const mtlsBasePath = "https://workstations.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.WorkstationClusters = NewProjectsLocationsWorkstationClustersService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Operations *ProjectsLocationsOperationsService + + WorkstationClusters *ProjectsLocationsWorkstationClustersService +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsWorkstationClustersService(s *Service) *ProjectsLocationsWorkstationClustersService { + rs := &ProjectsLocationsWorkstationClustersService{s: s} + rs.WorkstationConfigs = NewProjectsLocationsWorkstationClustersWorkstationConfigsService(s) + return rs +} + +type ProjectsLocationsWorkstationClustersService struct { + s *Service + + WorkstationConfigs *ProjectsLocationsWorkstationClustersWorkstationConfigsService +} + +func NewProjectsLocationsWorkstationClustersWorkstationConfigsService(s *Service) *ProjectsLocationsWorkstationClustersWorkstationConfigsService { + rs := &ProjectsLocationsWorkstationClustersWorkstationConfigsService{s: s} + rs.Workstations = NewProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService(s) + return rs +} + +type ProjectsLocationsWorkstationClustersWorkstationConfigsService struct { + s *Service + + Workstations *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService +} + +func NewProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService(s *Service) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService { + rs := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService{s: s} + return rs +} + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService struct { + s *Service +} + +// 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 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. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address + // that represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * `domain:{domain}`: The G + // Suite domain (primary) that represents all the users of that domain. + // For example, `google.com` or `example.com`. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// Container: A Docker container. +type Container struct { + // Args: Arguments passed to the entrypoint. + Args []string `json:"args,omitempty"` + + // Command: If set, overrides the default ENTRYPOINT specified by the + // image. + Command []string `json:"command,omitempty"` + + // Env: Environment variables passed to the container. + Env map[string]string `json:"env,omitempty"` + + // Image: Docker image defining the container. This image must be + // accessible by the config's service account. + Image string `json:"image,omitempty"` + + // RunAsUser: If set, overrides the USER specified in the image with the + // given uid. + RunAsUser int64 `json:"runAsUser,omitempty"` + + // WorkingDir: If set, overrides the default DIR specified by the image. + WorkingDir string `json:"workingDir,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Args") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Args") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Container) MarshalJSON() ([]byte, error) { + type NoMethod Container + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceConfidentialInstanceConfig: A set of Confidential Google Compute +// Engine Instance option. +type GceConfidentialInstanceConfig struct { + // EnableConfidentialCompute: Whether the instance has confidential + // compute enabled. + EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableConfidentialCompute") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableConfidentialCompute") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GceConfidentialInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GceConfidentialInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceInstance: A runtime using a Google Compute Engine Instance. +type GceInstance struct { + // BootDiskSizeGb: Size of the boot disk in GB. + BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"` + + // ConfidentialInstanceConfig: A set of Confidential Google Compute + // Engine Instance option. + ConfidentialInstanceConfig *GceConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` + + // DisablePublicIpAddresses: Whether instances have no public IP + // address. + DisablePublicIpAddresses bool `json:"disablePublicIpAddresses,omitempty"` + + // MachineType: The name of a Google Compute Engine machine type. + MachineType string `json:"machineType,omitempty"` + + // PoolSize: Number of instances to pool for faster Workstation starup. + PoolSize int64 `json:"poolSize,omitempty"` + + // ServiceAccount: Email address of the service account that will be + // used on VM instances used to support this config. This service + // account must have permission to pull the specified container image. + // If not set, VMs will run without a service account, in which case the + // image must be publicly accessible. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // ShieldedInstanceConfig: A set of Shielded Google Compute Engine + // Instance options. + ShieldedInstanceConfig *GceShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + + // Tags: Network tags to add to the Google Compute Engine machines + // backing the Workstations. + Tags []string `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BootDiskSizeGb") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GceInstance) MarshalJSON() ([]byte, error) { + type NoMethod GceInstance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceRegionalPersistentDisk: A PersistentDirectory backed by a Compute +// Engine regional persistent disk. +type GceRegionalPersistentDisk struct { + // DiskType: Type of the disk to use. + DiskType string `json:"diskType,omitempty"` + + // FsType: Type of file system that the disk should be formatted with. + // The Workstation image must support this file system type. Must be + // empty if source_snapshot is set. + FsType string `json:"fsType,omitempty"` + + // ReclaimPolicy: What should happen to the disk after the Workstation + // is deleted. Defaults to DELETE. + // + // Possible values: + // "RECLAIM_POLICY_UNSPECIFIED" - Do not use. + // "DELETE" - The persistent disk will be deleted with the + // Workstation. + // "RETAIN" - The persistent disk will be remain after the workstation + // is deleted, and the administrator must manually delete the disk. + ReclaimPolicy string `json:"reclaimPolicy,omitempty"` + + // SizeGb: Size of the disk in GB. Must be empty if source_snapshot is + // set. + SizeGb int64 `json:"sizeGb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GceRegionalPersistentDisk) MarshalJSON() ([]byte, error) { + type NoMethod GceRegionalPersistentDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceShieldedInstanceConfig: A set of Shielded Google Compute Engine +// Instance options. +type GceShieldedInstanceConfig struct { + // EnableIntegrityMonitoring: Whether the instance has integrity + // monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + + // EnableSecureBoot: Whether the instance has Secure Boot enabled. + EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` + + // EnableVtpm: Whether the instance has the vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GceShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GceShieldedInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateAccessTokenRequest: Request message for GenerateAccessToken. +type GenerateAccessTokenRequest struct { + // ExpireTime: Desired expiration time of the access token. This value + // must be at most 24 hours in the future. If a value is not specified, + // the token's expiration time will be set to a default value of 1 hour + // in the future. + ExpireTime string `json:"expireTime,omitempty"` + + // Ttl: Desired lifetime duration of the access token. This value must + // be at most 24 hours. If a value is not specified, the token's + // lifetime will be set to a default value of 1 hour. + Ttl string `json:"ttl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpireTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpireTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateAccessTokenRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateAccessTokenRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateAccessTokenResponse: Response message for +// GenerateAccessToken. +type GenerateAccessTokenResponse struct { + // AccessToken: The generated bearer access token. To use this token, + // include it in an Authorization header of an HTTP request sent to the + // associated workstation's hostname, e.g. "Authorization: Bearer ". + AccessToken string `json:"accessToken,omitempty"` + + // ExpireTime: Time at which the generated token will expire. + ExpireTime string `json:"expireTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AccessToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateAccessTokenResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateAccessTokenResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Host: The system will attempt to keep enough computational resources +// on standby Runtime host for a Workstation. +type Host struct { + // GceInstance: Specifies a Google Compute Engine Instance as the host. + GceInstance *GceInstance `json:"gceInstance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GceInstance") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GceInstance") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Host) MarshalJSON() ([]byte, error) { + type NoMethod Host + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListUsableWorkstationConfigsResponse: Response message for +// ListUsableWorkstationConfigs. +type ListUsableWorkstationConfigsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // WorkstationConfigs: The requested configs. + WorkstationConfigs []*WorkstationConfig `json:"workstationConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListUsableWorkstationConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUsableWorkstationConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListUsableWorkstationsResponse: Response message for +// ListUsableWorkstations. +type ListUsableWorkstationsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // Workstations: The requested workstations. + Workstations []*Workstation `json:"workstations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListUsableWorkstationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUsableWorkstationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWorkstationClustersResponse: Response message for +// ListWorkstationClusters. +type ListWorkstationClustersResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // WorkstationClusters: The requested clusters. + WorkstationClusters []*WorkstationCluster `json:"workstationClusters,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkstationClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkstationClustersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWorkstationConfigsResponse: Response message for +// ListWorkstationConfigs. +type ListWorkstationConfigsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // WorkstationConfigs: The requested configs. + WorkstationConfigs []*WorkstationConfig `json:"workstationConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkstationConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkstationConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWorkstationsResponse: Response message for ListWorkstations. +type ListWorkstationsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // Workstations: The requested workstations. + Workstations []*Workstation `json:"workstations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkstationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkstationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // StatusDetail: Output only. Human-readable status of the operation, if + // any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PersistentDirectory: A directory persisted across Workstation +// sessions. +type PersistentDirectory struct { + // GcePd: A PersistentDirectory backed by a Compute Engine persistent + // disk. + GcePd *GceRegionalPersistentDisk `json:"gcePd,omitempty"` + + // MountPath: Location of this directory in the running Workstation. + MountPath string `json:"mountPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcePd") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcePd") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PersistentDirectory) MarshalJSON() ([]byte, error) { + type NoMethod PersistentDirectory + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `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. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateClusterConfig: Configuration options for private clusters. +type PrivateClusterConfig struct { + // ClusterHostname: Output only. Hostname for the Workstation Cluster. + // This field will be populated only when private endpoint is enabled. + // To access workstations in the cluster, create a new DNS zone mapping + // this domain name to an internal IP address and a forwarding rule + // mapping that address to the service attachment. + ClusterHostname string `json:"clusterHostname,omitempty"` + + // EnablePrivateEndpoint: Whether Workstations endpoint is private. + EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` + + // ServiceAttachmentUri: Output only. Service attachment URI for the + // Workstation Cluster. The service attachemnt is created when private + // endpoint is enabled. To access workstations in the cluster, configure + // access to the managed service using (Private Service + // Connect)[https://cloud.google.com/vpc/docs/configure-private-service-c + // onnect-services]. + ServiceAttachmentUri string `json:"serviceAttachmentUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterHostname") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClusterHostname") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrivateClusterConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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 size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StartWorkstationRequest: Request message for StartWorkstation. +type StartWorkstationRequest struct { + // Etag: If set, the request will be rejected if the latest version of + // the workstation on the server does not have this etag. + Etag string `json:"etag,omitempty"` + + // ValidateOnly: If set, validate the request and preview the review, + // but do not actually apply it. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StartWorkstationRequest) MarshalJSON() ([]byte, error) { + type NoMethod StartWorkstationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StopWorkstationRequest: Request message for StopWorkstation. +type StopWorkstationRequest struct { + // Etag: If set, the request will be rejected if the latest version of + // the workstation on the server does not have this etag. + Etag string `json:"etag,omitempty"` + + // ValidateOnly: If set, validate the request and preview the review, + // but do not actually apply it. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StopWorkstationRequest) MarshalJSON() ([]byte, error) { + type NoMethod StopWorkstationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Workstation: A single instance of a developer workstation with its +// own persistent storage. +type Workstation struct { + // Annotations: Client-specified annotations. + Annotations map[string]string `json:"annotations,omitempty"` + + // CreateTime: Output only. Time when this resource was created. + CreateTime string `json:"createTime,omitempty"` + + // DeleteTime: Output only. Time when this resource was soft-deleted. + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: Human-readable name for this resource. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Checksum computed by the server. May be sent on update and + // delete requests to ensure that the client has an up-to-date value + // before proceeding. + Etag string `json:"etag,omitempty"` + + // Host: Output only. Host to which clients can send HTTPS traffic that + // will be received by the workstation. Authorized traffic will be + // received to the workstation as HTTP on port 80. To send traffic to a + // different port, clients may prefix the host with the destination port + // in the format "{port}-{host}". + Host string `json:"host,omitempty"` + + // Name: Full name of this resource. + Name string `json:"name,omitempty"` + + // Reconciling: Output only. Indicates whether this resource is + // currently being updated to match its intended state. + Reconciling bool `json:"reconciling,omitempty"` + + // State: Output only. Current state of the workstation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Do not use. + // "STATE_STARTING" - The workstation is not yet ready to accept + // requests from users but will be soon. + // "STATE_RUNNING" - The workstation is ready to accept requests from + // users. + // "STATE_STOPPING" - The workstation is being stopped. + // "STATE_STOPPED" - The workstation is stopped and will not be able + // to receive requests until it is started. + State string `json:"state,omitempty"` + + // Uid: Output only. A system-assigned unique identified for this + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Time when this resource was most recently + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Workstation) MarshalJSON() ([]byte, error) { + type NoMethod Workstation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkstationCluster: A grouping of WorkstationConfigs and their +// associated Workstations in a region. +type WorkstationCluster struct { + // Annotations: Client-specified annotations. + Annotations map[string]string `json:"annotations,omitempty"` + + // Conditions: Output only. Status conditions describing the current + // resource state. + Conditions []*Status `json:"conditions,omitempty"` + + // CreateTime: Output only. Time when this resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Degraded: Output only. Whether this resource is in degraded mode, in + // which case it may require user action to restore full functionality. + // Details can be found in the `conditions` field. + Degraded bool `json:"degraded,omitempty"` + + // DeleteTime: Output only. Time when this resource was soft-deleted. + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: Human-readable name for this resource. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Checksum computed by the server. May be sent on update and + // delete requests to ensure that the client has an up-to-date value + // before proceeding. + Etag string `json:"etag,omitempty"` + + // Name: Full name of this resource. + Name string `json:"name,omitempty"` + + // Network: Name of the Compute Engine network in which instances + // associated with this cluster will be created. + Network string `json:"network,omitempty"` + + // PrivateClusterConfig: Configuration for private cluster. + PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` + + // Reconciling: Output only. Indicates whether this resource is + // currently being updated to match its intended state. + Reconciling bool `json:"reconciling,omitempty"` + + // Subnetwork: Name of the Compute Engine subnetwork in which instances + // associated with this cluster will be created. Must be part of the + // subnetwork specified for this cluster. + Subnetwork string `json:"subnetwork,omitempty"` + + // Uid: Output only. A system-assigned unique identified for this + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Time when this resource was most recently + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkstationCluster) MarshalJSON() ([]byte, error) { + type NoMethod WorkstationCluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkstationConfig: A set of configuration options describing how a +// workstation will be run. WorkstationConfigs are intended to be shared +// across multiple workstations. +type WorkstationConfig struct { + // Annotations: Client-specified annotations. + Annotations map[string]string `json:"annotations,omitempty"` + + // Conditions: Output only. Status conditions describing the current + // resource state. + Conditions []*Status `json:"conditions,omitempty"` + + // Container: Container that will be run for each Workstation using this + // config when that Workstation is started. + Container *Container `json:"container,omitempty"` + + // CreateTime: Output only. Time when this resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Degraded: Output only. Whether this resource is in degraded mode, in + // which case it may require user action to restore full functionality. + // Details can be found in the `conditions` field. + Degraded bool `json:"degraded,omitempty"` + + // DeleteTime: Output only. Time when this resource was soft-deleted. + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: Human-readable name for this resource. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Checksum computed by the server. May be sent on update and + // delete requests to ensure that the client has an up-to-date value + // before proceeding. + Etag string `json:"etag,omitempty"` + + // Host: Runtime host for the Workstation. + Host *Host `json:"host,omitempty"` + + // IdleTimeout: How long to wait before automatically stopping an + // instance that hasn't received any user traffic. A value of 0 + // indicates that this instance should never time out due to idleness. + // Defaults to 20 minutes. + IdleTimeout string `json:"idleTimeout,omitempty"` + + // Name: Full name of this resource. + Name string `json:"name,omitempty"` + + // PersistentDirectories: Directories to persist across Workstation + // sessions. + PersistentDirectories []*PersistentDirectory `json:"persistentDirectories,omitempty"` + + // Reconciling: Output only. Indicates whether this resource is + // currently being updated to match its intended state. + Reconciling bool `json:"reconciling,omitempty"` + + // RunningTimeout: How long to wait before automatically stopping a + // workstation after it started. A value of 0 indicates that + // workstations using this config should never time out. Must be greater + // than 0 and less than 24 hours if encryption_key is set. Defaults to + // 12 hours. + RunningTimeout string `json:"runningTimeout,omitempty"` + + // Uid: Output only. A system-assigned unique identified for this + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Time when this resource was most recently + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkstationConfig) MarshalJSON() ([]byte, error) { + type NoMethod WorkstationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "workstations.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "workstations.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.create": + +type ProjectsLocationsWorkstationClustersCreateCall struct { + s *Service + parent string + workstationcluster *WorkstationCluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new WorkstationCluster. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersService) Create(parent string, workstationcluster *WorkstationCluster) *ProjectsLocationsWorkstationClustersCreateCall { + c := &ProjectsLocationsWorkstationClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.workstationcluster = workstationcluster + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// WorkstationClusterId sets the optional parameter +// "workstationClusterId": Required. ID to use for the cluster. +func (c *ProjectsLocationsWorkstationClustersCreateCall) WorkstationClusterId(workstationClusterId string) *ProjectsLocationsWorkstationClustersCreateCall { + c.urlParams_.Set("workstationClusterId", workstationClusterId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationcluster) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/workstationClusters") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new WorkstationCluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // }, + // "workstationClusterId": { + // "description": "Required. ID to use for the cluster.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/workstationClusters", + // "request": { + // "$ref": "WorkstationCluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.delete": + +type ProjectsLocationsWorkstationClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified WorkstationCluster. +// +// - name: Name of the cluster to delete. +func (r *ProjectsLocationsWorkstationClustersService) Delete(name string) *ProjectsLocationsWorkstationClustersDeleteCall { + c := &ProjectsLocationsWorkstationClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If set, the request will be +// rejected if the latest version of the cluster on the server does not +// have this etag. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Force sets the optional parameter "force": If set, any +// WorkstationConfigs and Workstations in the cluster will also be +// deleted. Otherwise, the request will work only if the cluster has no +// configs or workstations. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Force(force bool) *ProjectsLocationsWorkstationClustersDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified WorkstationCluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + // "httpMethod": "DELETE", + // "id": "workstations.projects.locations.workstationClusters.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "If set, the request will be rejected if the latest version of the cluster on the server does not have this etag.", + // "location": "query", + // "type": "string" + // }, + // "force": { + // "description": "If set, any WorkstationConfigs and Workstations in the cluster will also be deleted. Otherwise, the request will work only if the cluster has no configs or workstations.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. Name of the cluster to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.get": + +type ProjectsLocationsWorkstationClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the requested WorkstationCluster. +// +// - name: Name of the requested resource. +func (r *ProjectsLocationsWorkstationClustersService) Get(name string) *ProjectsLocationsWorkstationClustersGetCall { + c := &ProjectsLocationsWorkstationClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.get" call. +// Exactly one of *WorkstationCluster or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *WorkstationCluster.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 *ProjectsLocationsWorkstationClustersGetCall) Do(opts ...googleapi.CallOption) (*WorkstationCluster, 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 := &WorkstationCluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the requested WorkstationCluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the requested resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "WorkstationCluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.list": + +type ProjectsLocationsWorkstationClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all WorkstationClusters in the specified location. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersService) List(parent string) *ProjectsLocationsWorkstationClustersListCall { + c := &ProjectsLocationsWorkstationClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/workstationClusters") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.list" call. +// Exactly one of *ListWorkstationClustersResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListWorkstationClustersResponse.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 *ProjectsLocationsWorkstationClustersListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationClustersResponse, 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 := &ListWorkstationClustersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all WorkstationClusters in the specified location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/workstationClusters", + // "response": { + // "$ref": "ListWorkstationClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersListCall) Pages(ctx context.Context, f func(*ListWorkstationClustersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.patch": + +type ProjectsLocationsWorkstationClustersPatchCall struct { + s *Service + name string + workstationcluster *WorkstationCluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing WorkstationCluster. +// +// - name: Full name of this resource. +func (r *ProjectsLocationsWorkstationClustersService) Patch(name string, workstationcluster *WorkstationCluster) *ProjectsLocationsWorkstationClustersPatchCall { + c := &ProjectsLocationsWorkstationClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.workstationcluster = workstationcluster + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set, and +// the cluster is not found, a new cluster will be created. In this +// situation, update_mask is ignored. +func (c *ProjectsLocationsWorkstationClustersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// specifying which fields in the cluster should be updated. +func (c *ProjectsLocationsWorkstationClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationcluster) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing WorkstationCluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + // "httpMethod": "PATCH", + // "id": "workstations.projects.locations.workstationClusters.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set, and the cluster is not found, a new cluster will be created. In this situation, update_mask is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Full name of this resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask specifying which fields in the cluster should be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "WorkstationCluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.create": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall struct { + s *Service + parent string + workstationconfig *WorkstationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new WorkstationConfig. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Create(parent string, workstationconfig *WorkstationConfig) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.workstationconfig = workstationconfig + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// WorkstationConfigId sets the optional parameter +// "workstationConfigId": Required. ID to use for the config. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) WorkstationConfigId(workstationConfigId string) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c.urlParams_.Set("workstationConfigId", workstationConfigId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/workstationConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new WorkstationConfig.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // }, + // "workstationConfigId": { + // "description": "Required. ID to use for the config.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/workstationConfigs", + // "request": { + // "$ref": "WorkstationConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.delete": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified WorkstationConfig. +// +// - name: Name of the config to delete. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Delete(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If set, the request will be +// rejected if the latest version of the config on the server does not +// have this etag. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Force sets the optional parameter "force": If set, any Workstations +// in the config will also be deleted. Otherwise, the request will work +// only if the config has no workstations. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Force(force bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified WorkstationConfig.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + // "httpMethod": "DELETE", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "If set, the request will be rejected if the latest version of the config on the server does not have this etag.", + // "location": "query", + // "type": "string" + // }, + // "force": { + // "description": "If set, any Workstations in the config will also be deleted. Otherwise, the request will work only if the config has no workstations.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. Name of the config to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.get": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the requested WorkstationConfig. +// +// - name: Name of the requested resource. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Get(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.get" call. +// Exactly one of *WorkstationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *WorkstationConfig.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Do(opts ...googleapi.CallOption) (*WorkstationConfig, 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 := &WorkstationConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the requested WorkstationConfig.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the requested resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "WorkstationConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) GetIamPolicy(resource string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.list": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all WorkstationConfigs in the specified cluster. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) List(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/workstationConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.list" call. +// Exactly one of *ListWorkstationConfigsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListWorkstationConfigsResponse.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationConfigsResponse, 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 := &ListWorkstationConfigsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all WorkstationConfigs in the specified cluster.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/workstationConfigs", + // "response": { + // "$ref": "ListWorkstationConfigsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Pages(ctx context.Context, f func(*ListWorkstationConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Returns all WorkstationConfigs in the specified cluster +// on which the caller has the "workstations.workstation.create" +// permission. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) ListUsable(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/workstationConfigs:listUsable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable" call. +// Exactly one of *ListUsableWorkstationConfigsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListUsableWorkstationConfigsResponse.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Do(opts ...googleapi.CallOption) (*ListUsableWorkstationConfigsResponse, 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 := &ListUsableWorkstationConfigsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all WorkstationConfigs in the specified cluster on which the caller has the \"workstations.workstation.create\" permission.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs:listUsable", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/workstationConfigs:listUsable", + // "response": { + // "$ref": "ListUsableWorkstationConfigsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Pages(ctx context.Context, f func(*ListUsableWorkstationConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.patch": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall struct { + s *Service + name string + workstationconfig *WorkstationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing WorkstationConfig. +// +// - name: Full name of this resource. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Patch(name string, workstationconfig *WorkstationConfig) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.workstationconfig = workstationconfig + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set, and +// the config is not found, a new config will be created. In this +// situation, update_mask is ignored. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// specifying which fields in the config should be updated. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing WorkstationConfig.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + // "httpMethod": "PATCH", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set, and the config is not found, a new config will be created. In this situation, update_mask is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Full name of this resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask specifying which fields in the config should be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "WorkstationConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall struct { + s *Service + parent string + workstation *Workstation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Workstation. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Create(parent string, workstation *Workstation) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.workstation = workstation + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// WorkstationId sets the optional parameter "workstationId": Required. +// ID to use for the workstation. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) WorkstationId(workstationId string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c.urlParams_.Set("workstationId", workstationId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/workstations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Workstation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // }, + // "workstationId": { + // "description": "Required. ID to use for the workstation.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/workstations", + // "request": { + // "$ref": "Workstation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified Workstation. +// +// - name: Name of the workstation to delete. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Delete(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If set, the request will be +// rejected if the latest version of the workstation on the server does +// not have this etag. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified Workstation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + // "httpMethod": "DELETE", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "If set, the request will be rejected if the latest version of the workstation on the server does not have this etag.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Name of the workstation to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall struct { + s *Service + workstation string + generateaccesstokenrequest *GenerateAccessTokenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateAccessToken: Returns a short-lived credential that can be +// used to send authenticated and authorized traffic to a workstation. +// +// - workstation: Name of the workstation for which the access token +// should be generated. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) GenerateAccessToken(workstation string, generateaccesstokenrequest *GenerateAccessTokenRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.workstation = workstation + c.generateaccesstokenrequest = generateaccesstokenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateaccesstokenrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+workstation}:generateAccessToken") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "workstation": c.workstation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken" call. +// Exactly one of *GenerateAccessTokenResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateAccessTokenResponse.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Do(opts ...googleapi.CallOption) (*GenerateAccessTokenResponse, 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 := &GenerateAccessTokenResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", + // "parameterOrder": [ + // "workstation" + // ], + // "parameters": { + // "workstation": { + // "description": "Required. Name of the workstation for which the access token should be generated.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+workstation}:generateAccessToken", + // "request": { + // "$ref": "GenerateAccessTokenRequest" + // }, + // "response": { + // "$ref": "GenerateAccessTokenResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the requested Workstation. +// +// - name: Name of the requested resource. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Get(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get" call. +// Exactly one of *Workstation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Workstation.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Do(opts ...googleapi.CallOption) (*Workstation, 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 := &Workstation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the requested Workstation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the requested resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "Workstation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) GetIamPolicy(resource string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all Workstations using the specified config. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) List(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/workstations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list" call. +// Exactly one of *ListWorkstationsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListWorkstationsResponse.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationsResponse, 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 := &ListWorkstationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all Workstations using the specified config.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/workstations", + // "response": { + // "$ref": "ListWorkstationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Pages(ctx context.Context, f func(*ListWorkstationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Returns all Workstations using the specified config on +// which the caller has the "workstations.workstations.use" permission. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) ListUsable(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/workstations:listUsable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable" call. +// Exactly one of *ListUsableWorkstationsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListUsableWorkstationsResponse.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Do(opts ...googleapi.CallOption) (*ListUsableWorkstationsResponse, 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 := &ListUsableWorkstationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all Workstations using the specified config on which the caller has the \"workstations.workstations.use\" permission.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations:listUsable", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/workstations:listUsable", + // "response": { + // "$ref": "ListUsableWorkstationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Pages(ctx context.Context, f func(*ListUsableWorkstationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall struct { + s *Service + name string + workstation *Workstation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing Workstation. +// +// - name: Full name of this resource. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Patch(name string, workstation *Workstation) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.workstation = workstation + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set, and +// the config is not found, a new config will be created. In this +// situation, update_mask is ignored. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// specifying which fields in the config should be updated. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing Workstation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + // "httpMethod": "PATCH", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set, and the config is not found, a new config will be created. In this situation, update_mask is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Full name of this resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask specifying which fields in the config should be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "Workstation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall struct { + s *Service + name string + startworkstationrequest *StartWorkstationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Start: Starts running a workstation so that users can connect to it. +// +// - name: Name of the workstation to start. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Start(name string, startworkstationrequest *StartWorkstationRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.startworkstationrequest = startworkstationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.startworkstationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:start") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts running a workstation so that users can connect to it.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:start", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the workstation to start.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:start", + // "request": { + // "$ref": "StartWorkstationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall struct { + s *Service + name string + stopworkstationrequest *StopWorkstationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stops running a workstation, reducing costs. +// +// - name: Name of the workstation to stop. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Stop(name string, stopworkstationrequest *StopWorkstationRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.stopworkstationrequest = stopworkstationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopworkstationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:stop") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Stops running a workstation, reducing costs.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:stop", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the workstation to stop.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:stop", + // "request": { + // "$ref": "StopWorkstationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +}