From c9555df3c8afba98ddc4ee1af685a051f0c0fe73 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 17 Mar 2024 07:12:17 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- alloydb/v1/alloydb-api.json | 146 +- alloydb/v1/alloydb-gen.go | 299 +- alloydb/v1alpha/alloydb-api.json | 312 +- alloydb/v1alpha/alloydb-gen.go | 553 +- alloydb/v1beta/alloydb-api.json | 312 +- alloydb/v1beta/alloydb-gen.go | 553 +- container/v1/container-api.json | 24 +- container/v1/container-gen.go | 21 + datamigration/v1/datamigration-api.json | 164 +- datamigration/v1/datamigration-gen.go | 255 +- dataplex/v1/dataplex-api.json | 1962 ++- dataplex/v1/dataplex-gen.go | 10888 ++++++++++++---- memcache/v1/memcache-api.json | 4 +- memcache/v1/memcache-gen.go | 3 +- memcache/v1beta2/memcache-api.json | 4 +- memcache/v1beta2/memcache-gen.go | 3 +- metastore/v1/metastore-api.json | 36 +- metastore/v1/metastore-gen.go | 167 - metastore/v1beta/metastore-api.json | 36 +- metastore/v1beta/metastore-gen.go | 167 - .../v1/networkmanagement-api.json | 24 +- networkmanagement/v1/networkmanagement-gen.go | 38 +- .../v1beta1/networkmanagement-api.json | 24 +- .../v1beta1/networkmanagement-gen.go | 38 +- notebooks/v1/notebooks-api.json | 4 +- notebooks/v1/notebooks-gen.go | 2 +- spanner/v1/spanner-api.json | 423 +- spanner/v1/spanner-gen.go | 1480 +++ workloadmanager/v1/workloadmanager-api.json | 699 +- workloadmanager/v1/workloadmanager-gen.go | 1216 +- 30 files changed, 13779 insertions(+), 6078 deletions(-) diff --git a/alloydb/v1/alloydb-api.json b/alloydb/v1/alloydb-api.json index cc40aa80d3a..3937da4e5fc 100644 --- a/alloydb/v1/alloydb-api.json +++ b/alloydb/v1/alloydb-api.json @@ -517,34 +517,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "generateClientCertificate": { - "description": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", - "httpMethod": "POST", - "id": "alloydb.projects.locations.clusters.generateClientCertificate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}:generateClientCertificate", - "request": { - "$ref": "GenerateClientCertificateRequest" - }, - "response": { - "$ref": "GenerateClientCertificateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "get": { "description": "Gets details of a single Cluster.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", @@ -1489,7 +1461,7 @@ } } }, - "revision": "20240228", + "revision": "20240306", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AutomatedBackupPolicy": { @@ -2129,49 +2101,6 @@ }, "type": "object" }, - "GenerateClientCertificateRequest": { - "description": "Message for requests to generate a client certificate signed by the Cluster CA.", - "id": "GenerateClientCertificateRequest", - "properties": { - "certDuration": { - "description": "Optional. An optional hint to the endpoint to generate the client certificate with the requested duration. The duration can be from 1 hour to 24 hours. The endpoint may or may not honor the hint. If the hint is left unspecified or is not honored, then the endpoint will pick an appropriate default duration.", - "format": "google-duration", - "type": "string" - }, - "publicKey": { - "description": "Optional. The public key from the client.", - "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 after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "type": "string" - }, - "useMetadataExchange": { - "description": "Optional. An optional hint to the endpoint to generate a client ceritificate that can be used by AlloyDB connectors to exchange additional metadata with the server after TLS handshake.", - "type": "boolean" - } - }, - "type": "object" - }, - "GenerateClientCertificateResponse": { - "description": "Message returned by a GenerateClientCertificate operation.", - "id": "GenerateClientCertificateResponse", - "properties": { - "caCert": { - "description": "Optional. The pem-encoded cluster ca X.509 certificate.", - "type": "string" - }, - "pemCertificateChain": { - "description": "Output only. The pem-encoded chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", @@ -3327,7 +3256,13 @@ "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", - "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" + "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", + "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT", + "SIGNAL_TYPE_NO_PASSWORD_POLICY", + "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" ], "enumDeprecated": [ false, @@ -3390,6 +3325,12 @@ false, false, false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -3453,7 +3394,13 @@ "Represents server certificate is near expiry.", "Represents database auditing is disabled.", "Represents not restricted to authorized networks.", - "Represents violate org policy restrict public ip." + "Represents violate org policy restrict public ip.", + "Cluster nearing quota limit", + "No password policy set on resources", + "Performance impact of connections settings", + "Performance impact of temporary tables settings", + "Performance impact of transaction logs settings", + "Performance impact of high joins without indexes" ], "type": "string" }, @@ -3657,10 +3604,15 @@ "format": "google-datetime", "type": "string" }, + "userLabelSet": { + "$ref": "StorageDatabasecenterPartnerapiV1mainUserLabels", + "description": "User-provided labels associated with the resource" + }, "userLabels": { "additionalProperties": { "type": "string" }, + "deprecated": true, "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", "type": "object" } @@ -3783,7 +3735,13 @@ "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", - "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" + "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", + "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT", + "SIGNAL_TYPE_NO_PASSWORD_POLICY", + "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" ], "enumDeprecated": [ false, @@ -3846,6 +3804,12 @@ false, false, false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -3909,7 +3873,13 @@ "Represents server certificate is near expiry.", "Represents database auditing is disabled.", "Represents not restricted to authorized networks.", - "Represents violate org policy restrict public ip." + "Represents violate org policy restrict public ip.", + "Cluster nearing quota limit", + "No password policy set on resources", + "Performance impact of connections settings", + "Performance impact of temporary tables settings", + "Performance impact of transaction logs settings", + "Performance impact of high joins without indexes" ], "type": "string" } @@ -3938,11 +3908,18 @@ "description": "An enum that represents the type of this entitlement.", "enum": [ "ENTITLEMENT_TYPE_UNSPECIFIED", - "DUET_AI" + "DUET_AI", + "GEMINI" + ], + "enumDeprecated": [ + false, + true, + false ], "enumDescriptions": [ "", - "The root entitlement representing Duet AI package ownership." + "The root entitlement representing Duet AI package ownership.", + "The root entitlement representing Gemini package ownership." ], "type": "string" } @@ -4015,6 +3992,19 @@ }, "type": "object" }, + "StorageDatabasecenterPartnerapiV1mainUserLabels": { + "description": "Message type for storing user labels. User labels are used to tag App Engine resources, allowing users to search for resources matching a set of labels and to aggregate usage data by labels.", + "id": "StorageDatabasecenterPartnerapiV1mainUserLabels", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, "StorageDatabasecenterProtoCommonProduct": { "description": "Product specification for Condor resources.", "id": "StorageDatabasecenterProtoCommonProduct", diff --git a/alloydb/v1/alloydb-gen.go b/alloydb/v1/alloydb-gen.go index 36764ef876a..ad7f4df69f0 100644 --- a/alloydb/v1/alloydb-gen.go +++ b/alloydb/v1/alloydb-gen.go @@ -1067,99 +1067,6 @@ func (s *FailoverInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GenerateClientCertificateRequest: Message for requests to generate a -// client certificate signed by the Cluster CA. -type GenerateClientCertificateRequest struct { - // CertDuration: Optional. An optional hint to the endpoint to generate - // the client certificate with the requested duration. The duration can - // be from 1 hour to 24 hours. The endpoint may or may not honor the - // hint. If the hint is left unspecified or is not honored, then the - // endpoint will pick an appropriate default duration. - CertDuration string `json:"certDuration,omitempty"` - - // PublicKey: Optional. The public key from the client. - PublicKey string `json:"publicKey,omitempty"` - - // RequestId: 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 - // after the first request. For example, consider a situation where you - // make an initial request and the request times out. If you make the - // request again with the same request ID, the server can check if - // original operation with the same request ID was received, and if so, - // will ignore the second request. This prevents clients from - // accidentally creating duplicate commitments. The request ID must be a - // valid UUID with the exception that zero UUID is not supported - // (00000000-0000-0000-0000-000000000000). - RequestId string `json:"requestId,omitempty"` - - // UseMetadataExchange: Optional. An optional hint to the endpoint to - // generate a client ceritificate that can be used by AlloyDB connectors - // to exchange additional metadata with the server after TLS handshake. - UseMetadataExchange bool `json:"useMetadataExchange,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CertDuration") 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. "CertDuration") 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 *GenerateClientCertificateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateClientCertificateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GenerateClientCertificateResponse: Message returned by a -// GenerateClientCertificate operation. -type GenerateClientCertificateResponse struct { - // CaCert: Optional. The pem-encoded cluster ca X.509 certificate. - CaCert string `json:"caCert,omitempty"` - - // PemCertificateChain: Output only. The pem-encoded chain that may be - // used to verify the X.509 certificate. Expected to be in - // issuer-to-root order according to RFC 5246. - PemCertificateChain []string `json:"pemCertificateChain,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CaCert") 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. "CaCert") 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 *GenerateClientCertificateResponse) MarshalJSON() ([]byte, error) { - type NoMethod GenerateClientCertificateResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { @@ -3040,6 +2947,17 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // restricted to authorized networks. // "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents // violate org policy restrict public ip. + // "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT" - Cluster nearing quota limit + // "SIGNAL_TYPE_NO_PASSWORD_POLICY" - No password policy set on + // resources + // "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" - Performance impact + // of connections settings + // "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" - Performance impact of + // temporary tables settings + // "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" - Performance impact of + // transaction logs settings + // "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" - Performance impact of + // high joins without indexes SignalType string `json:"signalType,omitempty"` // Possible values: @@ -3234,6 +3152,9 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // at partner service. UpdationTime string `json:"updationTime,omitempty"` + // UserLabelSet: User-provided labels associated with the resource + UserLabelSet *StorageDatabasecenterPartnerapiV1mainUserLabels `json:"userLabelSet,omitempty"` + // UserLabels: User-provided labels, represented as a dictionary where // each label is a single key value pair. UserLabels map[string]string `json:"userLabels,omitempty"` @@ -3475,6 +3396,17 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalDa // restricted to authorized networks. // "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents // violate org policy restrict public ip. + // "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT" - Cluster nearing quota limit + // "SIGNAL_TYPE_NO_PASSWORD_POLICY" - No password policy set on + // resources + // "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" - Performance impact + // of connections settings + // "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" - Performance impact of + // temporary tables settings + // "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" - Performance impact of + // transaction logs settings + // "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" - Performance impact of + // high joins without indexes SignalType string `json:"signalType,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalMetadata") @@ -3522,6 +3454,8 @@ type StorageDatabasecenterPartnerapiV1mainEntitlement struct { // "ENTITLEMENT_TYPE_UNSPECIFIED" // "DUET_AI" - The root entitlement representing Duet AI package // ownership. + // "GEMINI" - The root entitlement representing Gemini package + // ownership. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "EntitlementState") to @@ -3635,6 +3569,36 @@ func (s *StorageDatabasecenterPartnerapiV1mainRetentionSettings) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterPartnerapiV1mainUserLabels: Message type for +// storing user labels. User labels are used to tag App Engine +// resources, allowing users to search for resources matching a set of +// labels and to aggregate usage data by labels. +type StorageDatabasecenterPartnerapiV1mainUserLabels struct { + Labels map[string]string `json:"labels,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 + // 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 *StorageDatabasecenterPartnerapiV1mainUserLabels) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainUserLabels + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StorageDatabasecenterProtoCommonProduct: Product specification for // Condor resources. type StorageDatabasecenterProtoCommonProduct struct { @@ -5869,155 +5833,6 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( } -// method id "alloydb.projects.locations.clusters.generateClientCertificate": - -type ProjectsLocationsClustersGenerateClientCertificateCall struct { - s *Service - parent string - generateclientcertificaterequest *GenerateClientCertificateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GenerateClientCertificate: Generate a client certificate signed by a -// Cluster CA. The sole purpose of this endpoint is to support AlloyDB -// connectors and the Auth Proxy client. The endpoint's behavior is -// subject to change without notice, so do not rely on its behavior -// remaining constant. Future changes will not break AlloyDB connectors -// or the Auth Proxy client. -// -// - parent: The name of the parent resource. The required format is: * -// projects/{project}/locations/{location}/clusters/{cluster}. -func (r *ProjectsLocationsClustersService) GenerateClientCertificate(parent string, generateclientcertificaterequest *GenerateClientCertificateRequest) *ProjectsLocationsClustersGenerateClientCertificateCall { - c := &ProjectsLocationsClustersGenerateClientCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.generateclientcertificaterequest = generateclientcertificaterequest - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGenerateClientCertificateCall { - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Context(ctx context.Context) *ProjectsLocationsClustersGenerateClientCertificateCall { - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersGenerateClientCertificateCall) 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.generateclientcertificaterequest) - 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}:generateClientCertificate") - 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 "alloydb.projects.locations.clusters.generateClientCertificate" call. -// Exactly one of *GenerateClientCertificateResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GenerateClientCertificateResponse.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 *ProjectsLocationsClustersGenerateClientCertificateCall) Do(opts ...googleapi.CallOption) (*GenerateClientCertificateResponse, 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 := &GenerateClientCertificateResponse{ - 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": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", - // "httpMethod": "POST", - // "id": "alloydb.projects.locations.clusters.generateClientCertificate", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}:generateClientCertificate", - // "request": { - // "$ref": "GenerateClientCertificateRequest" - // }, - // "response": { - // "$ref": "GenerateClientCertificateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "alloydb.projects.locations.clusters.get": type ProjectsLocationsClustersGetCall struct { diff --git a/alloydb/v1alpha/alloydb-api.json b/alloydb/v1alpha/alloydb-api.json index 0fb2328ec90..a26278d903d 100644 --- a/alloydb/v1alpha/alloydb-api.json +++ b/alloydb/v1alpha/alloydb-api.json @@ -517,34 +517,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "generateClientCertificate": { - "description": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", - "httpMethod": "POST", - "id": "alloydb.projects.locations.clusters.generateClientCertificate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}:generateClientCertificate", - "request": { - "$ref": "GenerateClientCertificateRequest" - }, - "response": { - "$ref": "GenerateClientCertificateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "get": { "description": "Gets details of a single Cluster.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", @@ -1489,7 +1461,7 @@ } } }, - "revision": "20240228", + "revision": "20240306", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -1878,6 +1850,10 @@ "description": "For Resource freshness validation (https://google.aip.dev/154)", "type": "string" }, + "geminiConfig": { + "$ref": "GeminiClusterConfig", + "description": "Optional. Configuration parameters related to the Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for more details." + }, "initialUser": { "$ref": "UserPassword", "description": "Input only. Initial user to setup during cluster creation. Required. If used in `RestoreCluster` this is ignored." @@ -1889,6 +1865,10 @@ "description": "Labels as key value pairs", "type": "object" }, + "maintenanceUpdatePolicy": { + "$ref": "MaintenanceUpdatePolicy", + "description": "Optional. The maintenance update policy determines when to allow or deny updates." + }, "migrationSource": { "$ref": "MigrationSource", "description": "Output only. Cluster created via DMS migration.", @@ -2111,6 +2091,25 @@ }, "type": "object" }, + "DenyMaintenancePeriod": { + "description": "DenyMaintenancePeriod definition. Excepting emergencies, maintenance will not be scheduled to start within this deny period. The start_date must be less than the end_date.", + "id": "DenyMaintenancePeriod", + "properties": { + "endDate": { + "$ref": "GoogleTypeDate", + "description": "Deny period end date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year for recurring. Date matching this period will have to be before the end." + }, + "startDate": { + "$ref": "GoogleTypeDate", + "description": "Deny period start date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year for recurring. Date matching this period will have to be the same or after the start." + }, + "time": { + "$ref": "GoogleTypeTimeOfDay", + "description": "Time in UTC when the deny period starts on start_date and ends on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC" + } + }, + "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", @@ -2173,56 +2172,26 @@ }, "type": "object" }, - "GenerateClientCertificateRequest": { - "description": "Message for requests to generate a client certificate signed by the Cluster CA.", - "id": "GenerateClientCertificateRequest", + "GeminiClusterConfig": { + "description": "Cluster level configuration parameters related to the Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for more details.", + "id": "GeminiClusterConfig", "properties": { - "certDuration": { - "description": "Optional. An optional hint to the endpoint to generate the client certificate with the requested duration. The duration can be from 1 hour to 24 hours. The endpoint may or may not honor the hint. If the hint is left unspecified or is not honored, then the endpoint will pick an appropriate default duration.", - "format": "google-duration", - "type": "string" - }, - "pemCsr": { - "deprecated": true, - "description": "Optional. A pem-encoded X.509 certificate signing request (CSR). It is recommended to use public_key instead.", - "type": "string" - }, - "publicKey": { - "description": "Optional. The public key from the client.", - "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 after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "type": "string" - }, - "useMetadataExchange": { - "description": "Optional. An optional hint to the endpoint to generate a client ceritificate that can be used by AlloyDB connectors to exchange additional metadata with the server after TLS handshake.", + "entitled": { + "description": "Output only. Whether the Gemini in Databases add-on is enabled for the cluster. It will be true only if the add-on has been enabled for the billing account corresponding to the cluster. Its status is toggled from the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs.", + "readOnly": true, "type": "boolean" } }, "type": "object" }, - "GenerateClientCertificateResponse": { - "description": "Message returned by a GenerateClientCertificate operation.", - "id": "GenerateClientCertificateResponse", + "GeminiInstanceConfig": { + "description": "Instance level configuration parameters related to the Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for more details.", + "id": "GeminiInstanceConfig", "properties": { - "caCert": { - "description": "Optional. The pem-encoded cluster ca X.509 certificate.", - "type": "string" - }, - "pemCertificate": { - "deprecated": true, - "description": "Output only. The pem-encoded, signed X.509 certificate.", + "entitled": { + "description": "Output only. Whether the Gemini in Databases add-on is enabled for the instance. It will be true only if the add-on has been enabled for the billing account corresponding to the instance. Its status is toggled from the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs.", "readOnly": true, - "type": "string" - }, - "pemCertificateChain": { - "description": "Output only. The pem-encoded chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" + "type": "boolean" } }, "type": "object" @@ -2279,6 +2248,28 @@ }, "type": "object" }, + "GoogleTypeDate": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "GoogleTypeDate", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleTypeTimeOfDay": { "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", "id": "GoogleTypeTimeOfDay", @@ -2393,6 +2384,10 @@ "description": "The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.", "type": "string" }, + "geminiConfig": { + "$ref": "GeminiInstanceConfig", + "description": "Optional. Configuration parameters related to the Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for more details." + }, "instanceType": { "description": "Required. The type of the instance. Specified at creation time.", "enum": [ @@ -2442,6 +2437,10 @@ "readOnly": true, "type": "array" }, + "observabilityConfig": { + "$ref": "ObservabilityInstanceConfig", + "description": "Configuration for observability." + }, "pscInstanceConfig": { "$ref": "PscInstanceConfig", "description": "Optional. The configuration for Private Service Connect (PSC) for the instance." @@ -2707,6 +2706,62 @@ }, "type": "object" }, + "MaintenanceUpdatePolicy": { + "description": "MaintenanceUpdatePolicy defines the policy for system updates.", + "id": "MaintenanceUpdatePolicy", + "properties": { + "denyMaintenancePeriods": { + "description": "Periods to deny maintenance. Currently limited to 1.", + "items": { + "$ref": "DenyMaintenancePeriod" + }, + "type": "array" + }, + "maintenanceWindows": { + "description": "Preferred windows to perform maintenance. Currently limited to 1.", + "items": { + "$ref": "MaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "MaintenanceWindow": { + "description": "MaintenanceWindow specifies a preferred day and time for maintenance.", + "id": "MaintenanceWindow", + "properties": { + "day": { + "description": "Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, etc.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "startTime": { + "$ref": "GoogleTypeTimeOfDay", + "description": "Preferred time to start the maintenance operation on the specified day. Maintenance will start within 1 hour of this time." + } + }, + "type": "object" + }, "MigrationSource": { "description": "Subset of the source instance configuration that is available when reading the cluster resource.", "id": "MigrationSource", @@ -2775,6 +2830,48 @@ }, "type": "object" }, + "ObservabilityInstanceConfig": { + "description": "Observability Instance specific configuration.", + "id": "ObservabilityInstanceConfig", + "properties": { + "enabled": { + "description": "Observability feature status for an instance. This is a read-only flag and modifiable only by producer API. This flag is turned \"off\" by default.", + "type": "boolean" + }, + "maxQueryStringLength": { + "description": "Query string length. The default value is 10k.", + "format": "int32", + "type": "integer" + }, + "preserveComments": { + "description": "Preserve comments in query string for an instance. This flag is turned \"off\" by default.", + "type": "boolean" + }, + "queryPlansPerMinute": { + "description": "Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 to 20 is considered valid.", + "format": "int32", + "type": "integer" + }, + "recordApplicationTags": { + "description": "Record application tags for an instance. This flag is turned \"off\" by default.", + "type": "boolean" + }, + "trackActiveQueries": { + "description": "Track actively running queries on the instance. If not set, this flag is \"off\" by default.", + "type": "boolean" + }, + "trackWaitEventTypes": { + "description": "Output only. Track wait event types during query execution for an instance. This flag is turned \"on\" by default but tracking is enabled only after observability enabled flag is also turned on. This is read-only flag and only modifiable by producer API.", + "readOnly": true, + "type": "boolean" + }, + "trackWaitEvents": { + "description": "Track wait events during query execution for an instance. This flag is turned \"on\" by default but tracking is enabled only after observability enabled flag is also turned on.", + "type": "boolean" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -3500,7 +3597,13 @@ "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", - "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" + "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", + "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT", + "SIGNAL_TYPE_NO_PASSWORD_POLICY", + "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" ], "enumDeprecated": [ false, @@ -3563,6 +3666,12 @@ false, false, false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -3626,7 +3735,13 @@ "Represents server certificate is near expiry.", "Represents database auditing is disabled.", "Represents not restricted to authorized networks.", - "Represents violate org policy restrict public ip." + "Represents violate org policy restrict public ip.", + "Cluster nearing quota limit", + "No password policy set on resources", + "Performance impact of connections settings", + "Performance impact of temporary tables settings", + "Performance impact of transaction logs settings", + "Performance impact of high joins without indexes" ], "type": "string" }, @@ -3830,10 +3945,15 @@ "format": "google-datetime", "type": "string" }, + "userLabelSet": { + "$ref": "StorageDatabasecenterPartnerapiV1mainUserLabels", + "description": "User-provided labels associated with the resource" + }, "userLabels": { "additionalProperties": { "type": "string" }, + "deprecated": true, "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", "type": "object" } @@ -3956,7 +4076,13 @@ "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", - "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" + "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", + "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT", + "SIGNAL_TYPE_NO_PASSWORD_POLICY", + "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" ], "enumDeprecated": [ false, @@ -4019,6 +4145,12 @@ false, false, false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -4082,7 +4214,13 @@ "Represents server certificate is near expiry.", "Represents database auditing is disabled.", "Represents not restricted to authorized networks.", - "Represents violate org policy restrict public ip." + "Represents violate org policy restrict public ip.", + "Cluster nearing quota limit", + "No password policy set on resources", + "Performance impact of connections settings", + "Performance impact of temporary tables settings", + "Performance impact of transaction logs settings", + "Performance impact of high joins without indexes" ], "type": "string" } @@ -4111,11 +4249,18 @@ "description": "An enum that represents the type of this entitlement.", "enum": [ "ENTITLEMENT_TYPE_UNSPECIFIED", - "DUET_AI" + "DUET_AI", + "GEMINI" + ], + "enumDeprecated": [ + false, + true, + false ], "enumDescriptions": [ "", - "The root entitlement representing Duet AI package ownership." + "The root entitlement representing Duet AI package ownership.", + "The root entitlement representing Gemini package ownership." ], "type": "string" } @@ -4188,6 +4333,19 @@ }, "type": "object" }, + "StorageDatabasecenterPartnerapiV1mainUserLabels": { + "description": "Message type for storing user labels. User labels are used to tag App Engine resources, allowing users to search for resources matching a set of labels and to aggregate usage data by labels.", + "id": "StorageDatabasecenterPartnerapiV1mainUserLabels", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, "StorageDatabasecenterProtoCommonProduct": { "description": "Product specification for Condor resources.", "id": "StorageDatabasecenterProtoCommonProduct", diff --git a/alloydb/v1alpha/alloydb-gen.go b/alloydb/v1alpha/alloydb-gen.go index 93116231d4e..c84f35726e3 100644 --- a/alloydb/v1alpha/alloydb-gen.go +++ b/alloydb/v1alpha/alloydb-gen.go @@ -684,6 +684,11 @@ type Cluster struct { // Etag: For Resource freshness validation (https://google.aip.dev/154) Etag string `json:"etag,omitempty"` + // GeminiConfig: Optional. Configuration parameters related to the + // Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for + // more details. + GeminiConfig *GeminiClusterConfig `json:"geminiConfig,omitempty"` + // InitialUser: Input only. Initial user to setup during cluster // creation. Required. If used in `RestoreCluster` this is ignored. InitialUser *UserPassword `json:"initialUser,omitempty"` @@ -691,6 +696,10 @@ type Cluster struct { // Labels: Labels as key value pairs Labels map[string]string `json:"labels,omitempty"` + // MaintenanceUpdatePolicy: Optional. The maintenance update policy + // determines when to allow or deny updates. + MaintenanceUpdatePolicy *MaintenanceUpdatePolicy `json:"maintenanceUpdatePolicy,omitempty"` + // MigrationSource: Output only. Cluster created via DMS migration. MigrationSource *MigrationSource `json:"migrationSource,omitempty"` @@ -987,6 +996,49 @@ func (s *ContinuousBackupSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DenyMaintenancePeriod: DenyMaintenancePeriod definition. Excepting +// emergencies, maintenance will not be scheduled to start within this +// deny period. The start_date must be less than the end_date. +type DenyMaintenancePeriod struct { + // EndDate: Deny period end date. This can be: * A full date, with + // non-zero year, month and day values. * A month and day value, with a + // zero year for recurring. Date matching this period will have to be + // before the end. + EndDate *GoogleTypeDate `json:"endDate,omitempty"` + + // StartDate: Deny period start date. This can be: * A full date, with + // non-zero year, month and day values. * A month and day value, with a + // zero year for recurring. Date matching this period will have to be + // the same or after the start. + StartDate *GoogleTypeDate `json:"startDate,omitempty"` + + // Time: Time in UTC when the deny period starts on start_date and ends + // on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC + Time *GoogleTypeTimeOfDay `json:"time,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndDate") 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. "EndDate") 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 *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) { + type NoMethod DenyMaintenancePeriod + 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 @@ -1120,43 +1172,18 @@ func (s *FailoverInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GenerateClientCertificateRequest: Message for requests to generate a -// client certificate signed by the Cluster CA. -type GenerateClientCertificateRequest struct { - // CertDuration: Optional. An optional hint to the endpoint to generate - // the client certificate with the requested duration. The duration can - // be from 1 hour to 24 hours. The endpoint may or may not honor the - // hint. If the hint is left unspecified or is not honored, then the - // endpoint will pick an appropriate default duration. - CertDuration string `json:"certDuration,omitempty"` - - // PemCsr: Optional. A pem-encoded X.509 certificate signing request - // (CSR). It is recommended to use public_key instead. - PemCsr string `json:"pemCsr,omitempty"` +// GeminiClusterConfig: Cluster level configuration parameters related +// to the Gemini in Databases add-on. See +// go/prd-enable-duet-ai-databases for more details. +type GeminiClusterConfig struct { + // Entitled: Output only. Whether the Gemini in Databases add-on is + // enabled for the cluster. It will be true only if the add-on has been + // enabled for the billing account corresponding to the cluster. Its + // status is toggled from the Admin Control Center (ACC) and cannot be + // toggled using AlloyDB's APIs. + Entitled bool `json:"entitled,omitempty"` - // PublicKey: Optional. The public key from the client. - PublicKey string `json:"publicKey,omitempty"` - - // RequestId: 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 - // after the first request. For example, consider a situation where you - // make an initial request and the request times out. If you make the - // request again with the same request ID, the server can check if - // original operation with the same request ID was received, and if so, - // will ignore the second request. This prevents clients from - // accidentally creating duplicate commitments. The request ID must be a - // valid UUID with the exception that zero UUID is not supported - // (00000000-0000-0000-0000-000000000000). - RequestId string `json:"requestId,omitempty"` - - // UseMetadataExchange: Optional. An optional hint to the endpoint to - // generate a client ceritificate that can be used by AlloyDB connectors - // to exchange additional metadata with the server after TLS handshake. - UseMetadataExchange bool `json:"useMetadataExchange,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CertDuration") to + // ForceSendFields is a list of field names (e.g. "Entitled") 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 @@ -1164,41 +1191,33 @@ type GenerateClientCertificateRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertDuration") 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 + // NullFields is a list of field names (e.g. "Entitled") 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 *GenerateClientCertificateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateClientCertificateRequest +func (s *GeminiClusterConfig) MarshalJSON() ([]byte, error) { + type NoMethod GeminiClusterConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GenerateClientCertificateResponse: Message returned by a -// GenerateClientCertificate operation. -type GenerateClientCertificateResponse struct { - // CaCert: Optional. The pem-encoded cluster ca X.509 certificate. - CaCert string `json:"caCert,omitempty"` +// GeminiInstanceConfig: Instance level configuration parameters related +// to the Gemini in Databases add-on. See +// go/prd-enable-duet-ai-databases for more details. +type GeminiInstanceConfig struct { + // Entitled: Output only. Whether the Gemini in Databases add-on is + // enabled for the instance. It will be true only if the add-on has been + // enabled for the billing account corresponding to the instance. Its + // status is toggled from the Admin Control Center (ACC) and cannot be + // toggled using AlloyDB's APIs. + Entitled bool `json:"entitled,omitempty"` - // PemCertificate: Output only. The pem-encoded, signed X.509 - // certificate. - PemCertificate string `json:"pemCertificate,omitempty"` - - // PemCertificateChain: Output only. The pem-encoded chain that may be - // used to verify the X.509 certificate. Expected to be in - // issuer-to-root order according to RFC 5246. - PemCertificateChain []string `json:"pemCertificateChain,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CaCert") to + // ForceSendFields is a list of field names (e.g. "Entitled") 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 @@ -1206,8 +1225,8 @@ type GenerateClientCertificateResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaCert") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Entitled") 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. @@ -1215,8 +1234,8 @@ type GenerateClientCertificateResponse struct { NullFields []string `json:"-"` } -func (s *GenerateClientCertificateResponse) MarshalJSON() ([]byte, error) { - type NoMethod GenerateClientCertificateResponse +func (s *GeminiInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GeminiInstanceConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1309,6 +1328,53 @@ func (s *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleTypeTimeOfDay: Represents a time of day. The date and time zone // are either not significant or are specified elsewhere. An API may // choose to allow leap seconds. Related types are google.type.Date and @@ -1464,6 +1530,11 @@ type Instance struct { // instance is created in a random zone with available capacity. GceZone string `json:"gceZone,omitempty"` + // GeminiConfig: Optional. Configuration parameters related to the + // Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for + // more details. + GeminiConfig *GeminiInstanceConfig `json:"geminiConfig,omitempty"` + // InstanceType: Required. The type of the instance. Specified at // creation time. // @@ -1509,6 +1580,9 @@ type Instance struct { // including the standby for a PRIMARY instance. Nodes []*Node `json:"nodes,omitempty"` + // ObservabilityConfig: Configuration for observability. + ObservabilityConfig *ObservabilityInstanceConfig `json:"observabilityConfig,omitempty"` + // PscInstanceConfig: Optional. The configuration for Private Service // Connect (PSC) for the instance. PscInstanceConfig *PscInstanceConfig `json:"pscInstanceConfig,omitempty"` @@ -1930,6 +2004,86 @@ func (s *MachineConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MaintenanceUpdatePolicy: MaintenanceUpdatePolicy defines the policy +// for system updates. +type MaintenanceUpdatePolicy struct { + // DenyMaintenancePeriods: Periods to deny maintenance. Currently + // limited to 1. + DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"` + + // MaintenanceWindows: Preferred windows to perform maintenance. + // Currently limited to 1. + MaintenanceWindows []*MaintenanceWindow `json:"maintenanceWindows,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DenyMaintenancePeriods") 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. "DenyMaintenancePeriods") + // 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 *MaintenanceUpdatePolicy) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceUpdatePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MaintenanceWindow: MaintenanceWindow specifies a preferred day and +// time for maintenance. +type MaintenanceWindow struct { + // Day: Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, + // etc. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + + // StartTime: Preferred time to start the maintenance operation on the + // specified day. Maintenance will start within 1 hour of this time. + StartTime *GoogleTypeTimeOfDay `json:"startTime,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 *MaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MigrationSource: Subset of the source instance configuration that is // available when reading the cluster resource. type MigrationSource struct { @@ -2057,6 +2211,69 @@ func (s *Node) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ObservabilityInstanceConfig: Observability Instance specific +// configuration. +type ObservabilityInstanceConfig struct { + // Enabled: Observability feature status for an instance. This is a + // read-only flag and modifiable only by producer API. This flag is + // turned "off" by default. + Enabled bool `json:"enabled,omitempty"` + + // MaxQueryStringLength: Query string length. The default value is 10k. + MaxQueryStringLength int64 `json:"maxQueryStringLength,omitempty"` + + // PreserveComments: Preserve comments in query string for an instance. + // This flag is turned "off" by default. + PreserveComments bool `json:"preserveComments,omitempty"` + + // QueryPlansPerMinute: Number of query execution plans captured by + // Insights per minute for all queries combined. The default value is 5. + // Any integer between 0 to 20 is considered valid. + QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"` + + // RecordApplicationTags: Record application tags for an instance. This + // flag is turned "off" by default. + RecordApplicationTags bool `json:"recordApplicationTags,omitempty"` + + // TrackActiveQueries: Track actively running queries on the instance. + // If not set, this flag is "off" by default. + TrackActiveQueries bool `json:"trackActiveQueries,omitempty"` + + // TrackWaitEventTypes: Output only. Track wait event types during query + // execution for an instance. This flag is turned "on" by default but + // tracking is enabled only after observability enabled flag is also + // turned on. This is read-only flag and only modifiable by producer + // API. + TrackWaitEventTypes bool `json:"trackWaitEventTypes,omitempty"` + + // TrackWaitEvents: Track wait events during query execution for an + // instance. This flag is turned "on" by default but tracking is enabled + // only after observability enabled flag is also turned on. + TrackWaitEvents bool `json:"trackWaitEvents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 *ObservabilityInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ObservabilityInstanceConfig + 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 { @@ -3295,6 +3512,17 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // restricted to authorized networks. // "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents // violate org policy restrict public ip. + // "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT" - Cluster nearing quota limit + // "SIGNAL_TYPE_NO_PASSWORD_POLICY" - No password policy set on + // resources + // "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" - Performance impact + // of connections settings + // "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" - Performance impact of + // temporary tables settings + // "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" - Performance impact of + // transaction logs settings + // "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" - Performance impact of + // high joins without indexes SignalType string `json:"signalType,omitempty"` // Possible values: @@ -3489,6 +3717,9 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // at partner service. UpdationTime string `json:"updationTime,omitempty"` + // UserLabelSet: User-provided labels associated with the resource + UserLabelSet *StorageDatabasecenterPartnerapiV1mainUserLabels `json:"userLabelSet,omitempty"` + // UserLabels: User-provided labels, represented as a dictionary where // each label is a single key value pair. UserLabels map[string]string `json:"userLabels,omitempty"` @@ -3730,6 +3961,17 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalDa // restricted to authorized networks. // "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents // violate org policy restrict public ip. + // "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT" - Cluster nearing quota limit + // "SIGNAL_TYPE_NO_PASSWORD_POLICY" - No password policy set on + // resources + // "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" - Performance impact + // of connections settings + // "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" - Performance impact of + // temporary tables settings + // "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" - Performance impact of + // transaction logs settings + // "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" - Performance impact of + // high joins without indexes SignalType string `json:"signalType,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalMetadata") @@ -3777,6 +4019,8 @@ type StorageDatabasecenterPartnerapiV1mainEntitlement struct { // "ENTITLEMENT_TYPE_UNSPECIFIED" // "DUET_AI" - The root entitlement representing Duet AI package // ownership. + // "GEMINI" - The root entitlement representing Gemini package + // ownership. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "EntitlementState") to @@ -3890,6 +4134,36 @@ func (s *StorageDatabasecenterPartnerapiV1mainRetentionSettings) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterPartnerapiV1mainUserLabels: Message type for +// storing user labels. User labels are used to tag App Engine +// resources, allowing users to search for resources matching a set of +// labels and to aggregate usage data by labels. +type StorageDatabasecenterPartnerapiV1mainUserLabels struct { + Labels map[string]string `json:"labels,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 + // 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 *StorageDatabasecenterPartnerapiV1mainUserLabels) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainUserLabels + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StorageDatabasecenterProtoCommonProduct: Product specification for // Condor resources. type StorageDatabasecenterProtoCommonProduct struct { @@ -6158,155 +6432,6 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( } -// method id "alloydb.projects.locations.clusters.generateClientCertificate": - -type ProjectsLocationsClustersGenerateClientCertificateCall struct { - s *Service - parent string - generateclientcertificaterequest *GenerateClientCertificateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GenerateClientCertificate: Generate a client certificate signed by a -// Cluster CA. The sole purpose of this endpoint is to support AlloyDB -// connectors and the Auth Proxy client. The endpoint's behavior is -// subject to change without notice, so do not rely on its behavior -// remaining constant. Future changes will not break AlloyDB connectors -// or the Auth Proxy client. -// -// - parent: The name of the parent resource. The required format is: * -// projects/{project}/locations/{location}/clusters/{cluster}. -func (r *ProjectsLocationsClustersService) GenerateClientCertificate(parent string, generateclientcertificaterequest *GenerateClientCertificateRequest) *ProjectsLocationsClustersGenerateClientCertificateCall { - c := &ProjectsLocationsClustersGenerateClientCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.generateclientcertificaterequest = generateclientcertificaterequest - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGenerateClientCertificateCall { - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Context(ctx context.Context) *ProjectsLocationsClustersGenerateClientCertificateCall { - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersGenerateClientCertificateCall) 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.generateclientcertificaterequest) - 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, "v1alpha/{+parent}:generateClientCertificate") - 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 "alloydb.projects.locations.clusters.generateClientCertificate" call. -// Exactly one of *GenerateClientCertificateResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GenerateClientCertificateResponse.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 *ProjectsLocationsClustersGenerateClientCertificateCall) Do(opts ...googleapi.CallOption) (*GenerateClientCertificateResponse, 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 := &GenerateClientCertificateResponse{ - 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": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", - // "httpMethod": "POST", - // "id": "alloydb.projects.locations.clusters.generateClientCertificate", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}:generateClientCertificate", - // "request": { - // "$ref": "GenerateClientCertificateRequest" - // }, - // "response": { - // "$ref": "GenerateClientCertificateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "alloydb.projects.locations.clusters.get": type ProjectsLocationsClustersGetCall struct { diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json index abddc3cb02f..088cda09a7e 100644 --- a/alloydb/v1beta/alloydb-api.json +++ b/alloydb/v1beta/alloydb-api.json @@ -517,34 +517,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "generateClientCertificate": { - "description": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", - "httpMethod": "POST", - "id": "alloydb.projects.locations.clusters.generateClientCertificate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}:generateClientCertificate", - "request": { - "$ref": "GenerateClientCertificateRequest" - }, - "response": { - "$ref": "GenerateClientCertificateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "get": { "description": "Gets details of a single Cluster.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", @@ -1486,7 +1458,7 @@ } } }, - "revision": "20240228", + "revision": "20240306", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -1864,6 +1836,10 @@ "description": "For Resource freshness validation (https://google.aip.dev/154)", "type": "string" }, + "geminiConfig": { + "$ref": "GeminiClusterConfig", + "description": "Optional. Configuration parameters related to the Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for more details." + }, "initialUser": { "$ref": "UserPassword", "description": "Input only. Initial user to setup during cluster creation. Required. If used in `RestoreCluster` this is ignored." @@ -1875,6 +1851,10 @@ "description": "Labels as key value pairs", "type": "object" }, + "maintenanceUpdatePolicy": { + "$ref": "MaintenanceUpdatePolicy", + "description": "Optional. The maintenance update policy determines when to allow or deny updates." + }, "migrationSource": { "$ref": "MigrationSource", "description": "Output only. Cluster created via DMS migration.", @@ -2092,6 +2072,25 @@ }, "type": "object" }, + "DenyMaintenancePeriod": { + "description": "DenyMaintenancePeriod definition. Excepting emergencies, maintenance will not be scheduled to start within this deny period. The start_date must be less than the end_date.", + "id": "DenyMaintenancePeriod", + "properties": { + "endDate": { + "$ref": "GoogleTypeDate", + "description": "Deny period end date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year for recurring. Date matching this period will have to be before the end." + }, + "startDate": { + "$ref": "GoogleTypeDate", + "description": "Deny period start date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year for recurring. Date matching this period will have to be the same or after the start." + }, + "time": { + "$ref": "GoogleTypeTimeOfDay", + "description": "Time in UTC when the deny period starts on start_date and ends on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC" + } + }, + "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", @@ -2154,56 +2153,26 @@ }, "type": "object" }, - "GenerateClientCertificateRequest": { - "description": "Message for requests to generate a client certificate signed by the Cluster CA.", - "id": "GenerateClientCertificateRequest", + "GeminiClusterConfig": { + "description": "Cluster level configuration parameters related to the Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for more details.", + "id": "GeminiClusterConfig", "properties": { - "certDuration": { - "description": "Optional. An optional hint to the endpoint to generate the client certificate with the requested duration. The duration can be from 1 hour to 24 hours. The endpoint may or may not honor the hint. If the hint is left unspecified or is not honored, then the endpoint will pick an appropriate default duration.", - "format": "google-duration", - "type": "string" - }, - "pemCsr": { - "deprecated": true, - "description": "Optional. A pem-encoded X.509 certificate signing request (CSR). It is recommended to use public_key instead.", - "type": "string" - }, - "publicKey": { - "description": "Optional. The public key from the client.", - "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 after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "type": "string" - }, - "useMetadataExchange": { - "description": "Optional. An optional hint to the endpoint to generate a client ceritificate that can be used by AlloyDB connectors to exchange additional metadata with the server after TLS handshake.", + "entitled": { + "description": "Output only. Whether the Gemini in Databases add-on is enabled for the cluster. It will be true only if the add-on has been enabled for the billing account corresponding to the cluster. Its status is toggled from the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs.", + "readOnly": true, "type": "boolean" } }, "type": "object" }, - "GenerateClientCertificateResponse": { - "description": "Message returned by a GenerateClientCertificate operation.", - "id": "GenerateClientCertificateResponse", + "GeminiInstanceConfig": { + "description": "Instance level configuration parameters related to the Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for more details.", + "id": "GeminiInstanceConfig", "properties": { - "caCert": { - "description": "Optional. The pem-encoded cluster ca X.509 certificate.", - "type": "string" - }, - "pemCertificate": { - "deprecated": true, - "description": "Output only. The pem-encoded, signed X.509 certificate.", + "entitled": { + "description": "Output only. Whether the Gemini in Databases add-on is enabled for the instance. It will be true only if the add-on has been enabled for the billing account corresponding to the instance. Its status is toggled from the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs.", "readOnly": true, - "type": "string" - }, - "pemCertificateChain": { - "description": "Output only. The pem-encoded chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" + "type": "boolean" } }, "type": "object" @@ -2260,6 +2229,28 @@ }, "type": "object" }, + "GoogleTypeDate": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "GoogleTypeDate", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleTypeTimeOfDay": { "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", "id": "GoogleTypeTimeOfDay", @@ -2374,6 +2365,10 @@ "description": "The Compute Engine zone that the instance should serve from, per https://cloud.google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity.", "type": "string" }, + "geminiConfig": { + "$ref": "GeminiInstanceConfig", + "description": "Optional. Configuration parameters related to the Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for more details." + }, "instanceType": { "description": "Required. The type of the instance. Specified at creation time.", "enum": [ @@ -2423,6 +2418,10 @@ "readOnly": true, "type": "array" }, + "observabilityConfig": { + "$ref": "ObservabilityInstanceConfig", + "description": "Configuration for observability." + }, "pscInstanceConfig": { "$ref": "PscInstanceConfig", "description": "Optional. The configuration for Private Service Connect (PSC) for the instance." @@ -2683,6 +2682,62 @@ }, "type": "object" }, + "MaintenanceUpdatePolicy": { + "description": "MaintenanceUpdatePolicy defines the policy for system updates.", + "id": "MaintenanceUpdatePolicy", + "properties": { + "denyMaintenancePeriods": { + "description": "Periods to deny maintenance. Currently limited to 1.", + "items": { + "$ref": "DenyMaintenancePeriod" + }, + "type": "array" + }, + "maintenanceWindows": { + "description": "Preferred windows to perform maintenance. Currently limited to 1.", + "items": { + "$ref": "MaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "MaintenanceWindow": { + "description": "MaintenanceWindow specifies a preferred day and time for maintenance.", + "id": "MaintenanceWindow", + "properties": { + "day": { + "description": "Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, etc.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "startTime": { + "$ref": "GoogleTypeTimeOfDay", + "description": "Preferred time to start the maintenance operation on the specified day. Maintenance will start within 1 hour of this time." + } + }, + "type": "object" + }, "MigrationSource": { "description": "Subset of the source instance configuration that is available when reading the cluster resource.", "id": "MigrationSource", @@ -2751,6 +2806,48 @@ }, "type": "object" }, + "ObservabilityInstanceConfig": { + "description": "Observability Instance specific configuration.", + "id": "ObservabilityInstanceConfig", + "properties": { + "enabled": { + "description": "Observability feature status for an instance. This is a read-only flag and modifiable only by producer API. This flag is turned \"off\" by default.", + "type": "boolean" + }, + "maxQueryStringLength": { + "description": "Query string length. The default value is 10k.", + "format": "int32", + "type": "integer" + }, + "preserveComments": { + "description": "Preserve comments in query string for an instance. This flag is turned \"off\" by default.", + "type": "boolean" + }, + "queryPlansPerMinute": { + "description": "Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 to 20 is considered valid.", + "format": "int32", + "type": "integer" + }, + "recordApplicationTags": { + "description": "Record application tags for an instance. This flag is turned \"off\" by default.", + "type": "boolean" + }, + "trackActiveQueries": { + "description": "Track actively running queries on the instance. If not set, this flag is \"off\" by default.", + "type": "boolean" + }, + "trackWaitEventTypes": { + "description": "Output only. Track wait event types during query execution for an instance. This flag is turned \"on\" by default but tracking is enabled only after observability enabled flag is also turned on. This is read-only flag and only modifiable by producer API.", + "readOnly": true, + "type": "boolean" + }, + "trackWaitEvents": { + "description": "Track wait events during query execution for an instance. This flag is turned \"on\" by default but tracking is enabled only after observability enabled flag is also turned on.", + "type": "boolean" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -3476,7 +3573,13 @@ "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", - "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" + "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", + "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT", + "SIGNAL_TYPE_NO_PASSWORD_POLICY", + "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" ], "enumDeprecated": [ false, @@ -3539,6 +3642,12 @@ false, false, false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -3602,7 +3711,13 @@ "Represents server certificate is near expiry.", "Represents database auditing is disabled.", "Represents not restricted to authorized networks.", - "Represents violate org policy restrict public ip." + "Represents violate org policy restrict public ip.", + "Cluster nearing quota limit", + "No password policy set on resources", + "Performance impact of connections settings", + "Performance impact of temporary tables settings", + "Performance impact of transaction logs settings", + "Performance impact of high joins without indexes" ], "type": "string" }, @@ -3806,10 +3921,15 @@ "format": "google-datetime", "type": "string" }, + "userLabelSet": { + "$ref": "StorageDatabasecenterPartnerapiV1mainUserLabels", + "description": "User-provided labels associated with the resource" + }, "userLabels": { "additionalProperties": { "type": "string" }, + "deprecated": true, "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", "type": "object" } @@ -3932,7 +4052,13 @@ "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", - "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" + "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", + "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT", + "SIGNAL_TYPE_NO_PASSWORD_POLICY", + "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", + "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" ], "enumDeprecated": [ false, @@ -3995,6 +4121,12 @@ false, false, false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -4058,7 +4190,13 @@ "Represents server certificate is near expiry.", "Represents database auditing is disabled.", "Represents not restricted to authorized networks.", - "Represents violate org policy restrict public ip." + "Represents violate org policy restrict public ip.", + "Cluster nearing quota limit", + "No password policy set on resources", + "Performance impact of connections settings", + "Performance impact of temporary tables settings", + "Performance impact of transaction logs settings", + "Performance impact of high joins without indexes" ], "type": "string" } @@ -4087,11 +4225,18 @@ "description": "An enum that represents the type of this entitlement.", "enum": [ "ENTITLEMENT_TYPE_UNSPECIFIED", - "DUET_AI" + "DUET_AI", + "GEMINI" + ], + "enumDeprecated": [ + false, + true, + false ], "enumDescriptions": [ "", - "The root entitlement representing Duet AI package ownership." + "The root entitlement representing Duet AI package ownership.", + "The root entitlement representing Gemini package ownership." ], "type": "string" } @@ -4164,6 +4309,19 @@ }, "type": "object" }, + "StorageDatabasecenterPartnerapiV1mainUserLabels": { + "description": "Message type for storing user labels. User labels are used to tag App Engine resources, allowing users to search for resources matching a set of labels and to aggregate usage data by labels.", + "id": "StorageDatabasecenterPartnerapiV1mainUserLabels", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, "StorageDatabasecenterProtoCommonProduct": { "description": "Product specification for Condor resources.", "id": "StorageDatabasecenterProtoCommonProduct", diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go index 5e8442bf5c0..8d5a3004848 100644 --- a/alloydb/v1beta/alloydb-gen.go +++ b/alloydb/v1beta/alloydb-gen.go @@ -676,6 +676,11 @@ type Cluster struct { // Etag: For Resource freshness validation (https://google.aip.dev/154) Etag string `json:"etag,omitempty"` + // GeminiConfig: Optional. Configuration parameters related to the + // Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for + // more details. + GeminiConfig *GeminiClusterConfig `json:"geminiConfig,omitempty"` + // InitialUser: Input only. Initial user to setup during cluster // creation. Required. If used in `RestoreCluster` this is ignored. InitialUser *UserPassword `json:"initialUser,omitempty"` @@ -683,6 +688,10 @@ type Cluster struct { // Labels: Labels as key value pairs Labels map[string]string `json:"labels,omitempty"` + // MaintenanceUpdatePolicy: Optional. The maintenance update policy + // determines when to allow or deny updates. + MaintenanceUpdatePolicy *MaintenanceUpdatePolicy `json:"maintenanceUpdatePolicy,omitempty"` + // MigrationSource: Output only. Cluster created via DMS migration. MigrationSource *MigrationSource `json:"migrationSource,omitempty"` @@ -976,6 +985,49 @@ func (s *ContinuousBackupSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DenyMaintenancePeriod: DenyMaintenancePeriod definition. Excepting +// emergencies, maintenance will not be scheduled to start within this +// deny period. The start_date must be less than the end_date. +type DenyMaintenancePeriod struct { + // EndDate: Deny period end date. This can be: * A full date, with + // non-zero year, month and day values. * A month and day value, with a + // zero year for recurring. Date matching this period will have to be + // before the end. + EndDate *GoogleTypeDate `json:"endDate,omitempty"` + + // StartDate: Deny period start date. This can be: * A full date, with + // non-zero year, month and day values. * A month and day value, with a + // zero year for recurring. Date matching this period will have to be + // the same or after the start. + StartDate *GoogleTypeDate `json:"startDate,omitempty"` + + // Time: Time in UTC when the deny period starts on start_date and ends + // on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC + Time *GoogleTypeTimeOfDay `json:"time,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndDate") 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. "EndDate") 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 *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) { + type NoMethod DenyMaintenancePeriod + 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 @@ -1109,43 +1161,18 @@ func (s *FailoverInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GenerateClientCertificateRequest: Message for requests to generate a -// client certificate signed by the Cluster CA. -type GenerateClientCertificateRequest struct { - // CertDuration: Optional. An optional hint to the endpoint to generate - // the client certificate with the requested duration. The duration can - // be from 1 hour to 24 hours. The endpoint may or may not honor the - // hint. If the hint is left unspecified or is not honored, then the - // endpoint will pick an appropriate default duration. - CertDuration string `json:"certDuration,omitempty"` - - // PemCsr: Optional. A pem-encoded X.509 certificate signing request - // (CSR). It is recommended to use public_key instead. - PemCsr string `json:"pemCsr,omitempty"` +// GeminiClusterConfig: Cluster level configuration parameters related +// to the Gemini in Databases add-on. See +// go/prd-enable-duet-ai-databases for more details. +type GeminiClusterConfig struct { + // Entitled: Output only. Whether the Gemini in Databases add-on is + // enabled for the cluster. It will be true only if the add-on has been + // enabled for the billing account corresponding to the cluster. Its + // status is toggled from the Admin Control Center (ACC) and cannot be + // toggled using AlloyDB's APIs. + Entitled bool `json:"entitled,omitempty"` - // PublicKey: Optional. The public key from the client. - PublicKey string `json:"publicKey,omitempty"` - - // RequestId: 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 - // after the first request. For example, consider a situation where you - // make an initial request and the request times out. If you make the - // request again with the same request ID, the server can check if - // original operation with the same request ID was received, and if so, - // will ignore the second request. This prevents clients from - // accidentally creating duplicate commitments. The request ID must be a - // valid UUID with the exception that zero UUID is not supported - // (00000000-0000-0000-0000-000000000000). - RequestId string `json:"requestId,omitempty"` - - // UseMetadataExchange: Optional. An optional hint to the endpoint to - // generate a client ceritificate that can be used by AlloyDB connectors - // to exchange additional metadata with the server after TLS handshake. - UseMetadataExchange bool `json:"useMetadataExchange,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CertDuration") to + // ForceSendFields is a list of field names (e.g. "Entitled") 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 @@ -1153,41 +1180,33 @@ type GenerateClientCertificateRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertDuration") 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 + // NullFields is a list of field names (e.g. "Entitled") 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 *GenerateClientCertificateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateClientCertificateRequest +func (s *GeminiClusterConfig) MarshalJSON() ([]byte, error) { + type NoMethod GeminiClusterConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GenerateClientCertificateResponse: Message returned by a -// GenerateClientCertificate operation. -type GenerateClientCertificateResponse struct { - // CaCert: Optional. The pem-encoded cluster ca X.509 certificate. - CaCert string `json:"caCert,omitempty"` +// GeminiInstanceConfig: Instance level configuration parameters related +// to the Gemini in Databases add-on. See +// go/prd-enable-duet-ai-databases for more details. +type GeminiInstanceConfig struct { + // Entitled: Output only. Whether the Gemini in Databases add-on is + // enabled for the instance. It will be true only if the add-on has been + // enabled for the billing account corresponding to the instance. Its + // status is toggled from the Admin Control Center (ACC) and cannot be + // toggled using AlloyDB's APIs. + Entitled bool `json:"entitled,omitempty"` - // PemCertificate: Output only. The pem-encoded, signed X.509 - // certificate. - PemCertificate string `json:"pemCertificate,omitempty"` - - // PemCertificateChain: Output only. The pem-encoded chain that may be - // used to verify the X.509 certificate. Expected to be in - // issuer-to-root order according to RFC 5246. - PemCertificateChain []string `json:"pemCertificateChain,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CaCert") to + // ForceSendFields is a list of field names (e.g. "Entitled") 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 @@ -1195,8 +1214,8 @@ type GenerateClientCertificateResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaCert") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Entitled") 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. @@ -1204,8 +1223,8 @@ type GenerateClientCertificateResponse struct { NullFields []string `json:"-"` } -func (s *GenerateClientCertificateResponse) MarshalJSON() ([]byte, error) { - type NoMethod GenerateClientCertificateResponse +func (s *GeminiInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GeminiInstanceConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1298,6 +1317,53 @@ func (s *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleTypeTimeOfDay: Represents a time of day. The date and time zone // are either not significant or are specified elsewhere. An API may // choose to allow leap seconds. Related types are google.type.Date and @@ -1453,6 +1519,11 @@ type Instance struct { // instance is created in a random zone with available capacity. GceZone string `json:"gceZone,omitempty"` + // GeminiConfig: Optional. Configuration parameters related to the + // Gemini in Databases add-on. See go/prd-enable-duet-ai-databases for + // more details. + GeminiConfig *GeminiInstanceConfig `json:"geminiConfig,omitempty"` + // InstanceType: Required. The type of the instance. Specified at // creation time. // @@ -1498,6 +1569,9 @@ type Instance struct { // including the standby for a PRIMARY instance. Nodes []*Node `json:"nodes,omitempty"` + // ObservabilityConfig: Configuration for observability. + ObservabilityConfig *ObservabilityInstanceConfig `json:"observabilityConfig,omitempty"` + // PscInstanceConfig: Optional. The configuration for Private Service // Connect (PSC) for the instance. PscInstanceConfig *PscInstanceConfig `json:"pscInstanceConfig,omitempty"` @@ -1916,6 +1990,86 @@ func (s *MachineConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MaintenanceUpdatePolicy: MaintenanceUpdatePolicy defines the policy +// for system updates. +type MaintenanceUpdatePolicy struct { + // DenyMaintenancePeriods: Periods to deny maintenance. Currently + // limited to 1. + DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"` + + // MaintenanceWindows: Preferred windows to perform maintenance. + // Currently limited to 1. + MaintenanceWindows []*MaintenanceWindow `json:"maintenanceWindows,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DenyMaintenancePeriods") 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. "DenyMaintenancePeriods") + // 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 *MaintenanceUpdatePolicy) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceUpdatePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MaintenanceWindow: MaintenanceWindow specifies a preferred day and +// time for maintenance. +type MaintenanceWindow struct { + // Day: Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, + // etc. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + + // StartTime: Preferred time to start the maintenance operation on the + // specified day. Maintenance will start within 1 hour of this time. + StartTime *GoogleTypeTimeOfDay `json:"startTime,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 *MaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MigrationSource: Subset of the source instance configuration that is // available when reading the cluster resource. type MigrationSource struct { @@ -2043,6 +2197,69 @@ func (s *Node) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ObservabilityInstanceConfig: Observability Instance specific +// configuration. +type ObservabilityInstanceConfig struct { + // Enabled: Observability feature status for an instance. This is a + // read-only flag and modifiable only by producer API. This flag is + // turned "off" by default. + Enabled bool `json:"enabled,omitempty"` + + // MaxQueryStringLength: Query string length. The default value is 10k. + MaxQueryStringLength int64 `json:"maxQueryStringLength,omitempty"` + + // PreserveComments: Preserve comments in query string for an instance. + // This flag is turned "off" by default. + PreserveComments bool `json:"preserveComments,omitempty"` + + // QueryPlansPerMinute: Number of query execution plans captured by + // Insights per minute for all queries combined. The default value is 5. + // Any integer between 0 to 20 is considered valid. + QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"` + + // RecordApplicationTags: Record application tags for an instance. This + // flag is turned "off" by default. + RecordApplicationTags bool `json:"recordApplicationTags,omitempty"` + + // TrackActiveQueries: Track actively running queries on the instance. + // If not set, this flag is "off" by default. + TrackActiveQueries bool `json:"trackActiveQueries,omitempty"` + + // TrackWaitEventTypes: Output only. Track wait event types during query + // execution for an instance. This flag is turned "on" by default but + // tracking is enabled only after observability enabled flag is also + // turned on. This is read-only flag and only modifiable by producer + // API. + TrackWaitEventTypes bool `json:"trackWaitEventTypes,omitempty"` + + // TrackWaitEvents: Track wait events during query execution for an + // instance. This flag is turned "on" by default but tracking is enabled + // only after observability enabled flag is also turned on. + TrackWaitEvents bool `json:"trackWaitEvents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 *ObservabilityInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ObservabilityInstanceConfig + 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 { @@ -3281,6 +3498,17 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // restricted to authorized networks. // "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents // violate org policy restrict public ip. + // "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT" - Cluster nearing quota limit + // "SIGNAL_TYPE_NO_PASSWORD_POLICY" - No password policy set on + // resources + // "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" - Performance impact + // of connections settings + // "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" - Performance impact of + // temporary tables settings + // "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" - Performance impact of + // transaction logs settings + // "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" - Performance impact of + // high joins without indexes SignalType string `json:"signalType,omitempty"` // Possible values: @@ -3475,6 +3703,9 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata struct { // at partner service. UpdationTime string `json:"updationTime,omitempty"` + // UserLabelSet: User-provided labels associated with the resource + UserLabelSet *StorageDatabasecenterPartnerapiV1mainUserLabels `json:"userLabelSet,omitempty"` + // UserLabels: User-provided labels, represented as a dictionary where // each label is a single key value pair. UserLabels map[string]string `json:"userLabels,omitempty"` @@ -3716,6 +3947,17 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalDa // restricted to authorized networks. // "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents // violate org policy restrict public ip. + // "SIGNAL_TYPE_CLUSTER_QUOTA_LIMIT" - Cluster nearing quota limit + // "SIGNAL_TYPE_NO_PASSWORD_POLICY" - No password policy set on + // resources + // "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" - Performance impact + // of connections settings + // "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" - Performance impact of + // temporary tables settings + // "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" - Performance impact of + // transaction logs settings + // "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" - Performance impact of + // high joins without indexes SignalType string `json:"signalType,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalMetadata") @@ -3763,6 +4005,8 @@ type StorageDatabasecenterPartnerapiV1mainEntitlement struct { // "ENTITLEMENT_TYPE_UNSPECIFIED" // "DUET_AI" - The root entitlement representing Duet AI package // ownership. + // "GEMINI" - The root entitlement representing Gemini package + // ownership. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "EntitlementState") to @@ -3876,6 +4120,36 @@ func (s *StorageDatabasecenterPartnerapiV1mainRetentionSettings) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterPartnerapiV1mainUserLabels: Message type for +// storing user labels. User labels are used to tag App Engine +// resources, allowing users to search for resources matching a set of +// labels and to aggregate usage data by labels. +type StorageDatabasecenterPartnerapiV1mainUserLabels struct { + Labels map[string]string `json:"labels,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 + // 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 *StorageDatabasecenterPartnerapiV1mainUserLabels) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainUserLabels + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StorageDatabasecenterProtoCommonProduct: Product specification for // Condor resources. type StorageDatabasecenterProtoCommonProduct struct { @@ -6144,155 +6418,6 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( } -// method id "alloydb.projects.locations.clusters.generateClientCertificate": - -type ProjectsLocationsClustersGenerateClientCertificateCall struct { - s *Service - parent string - generateclientcertificaterequest *GenerateClientCertificateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GenerateClientCertificate: Generate a client certificate signed by a -// Cluster CA. The sole purpose of this endpoint is to support AlloyDB -// connectors and the Auth Proxy client. The endpoint's behavior is -// subject to change without notice, so do not rely on its behavior -// remaining constant. Future changes will not break AlloyDB connectors -// or the Auth Proxy client. -// -// - parent: The name of the parent resource. The required format is: * -// projects/{project}/locations/{location}/clusters/{cluster}. -func (r *ProjectsLocationsClustersService) GenerateClientCertificate(parent string, generateclientcertificaterequest *GenerateClientCertificateRequest) *ProjectsLocationsClustersGenerateClientCertificateCall { - c := &ProjectsLocationsClustersGenerateClientCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.generateclientcertificaterequest = generateclientcertificaterequest - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGenerateClientCertificateCall { - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Context(ctx context.Context) *ProjectsLocationsClustersGenerateClientCertificateCall { - 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 *ProjectsLocationsClustersGenerateClientCertificateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersGenerateClientCertificateCall) 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.generateclientcertificaterequest) - 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}:generateClientCertificate") - 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 "alloydb.projects.locations.clusters.generateClientCertificate" call. -// Exactly one of *GenerateClientCertificateResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GenerateClientCertificateResponse.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 *ProjectsLocationsClustersGenerateClientCertificateCall) Do(opts ...googleapi.CallOption) (*GenerateClientCertificateResponse, 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 := &GenerateClientCertificateResponse{ - 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": "Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:generateClientCertificate", - // "httpMethod": "POST", - // "id": "alloydb.projects.locations.clusters.generateClientCertificate", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location}/clusters/{cluster}", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}:generateClientCertificate", - // "request": { - // "$ref": "GenerateClientCertificateRequest" - // }, - // "response": { - // "$ref": "GenerateClientCertificateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "alloydb.projects.locations.clusters.get": type ProjectsLocationsClustersGetCall struct { diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 02b6a16ee82..845ed74b31e 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240214", + "revision": "20240304", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3534,10 +3534,18 @@ "$ref": "DNSConfig", "description": "DNSConfig contains clusterDNS config for this cluster." }, + "desiredEnableCiliumClusterwideNetworkPolicy": { + "description": "Enable/Disable Cilium Clusterwide Network Policy for the cluster.", + "type": "boolean" + }, "desiredEnableFqdnNetworkPolicy": { "description": "Enable/Disable FQDN Network Policy for the cluster.", "type": "boolean" }, + "desiredEnableMultiNetworking": { + "description": "Enable/Disable Multi-Networking for the cluster", + "type": "boolean" + }, "desiredEnablePrivateEndpoint": { "description": "Enable/Disable private endpoint for the cluster's master.", "type": "boolean" @@ -4965,6 +4973,10 @@ "$ref": "DNSConfig", "description": "DNSConfig contains clusterDNS config for this cluster." }, + "enableCiliumClusterwideNetworkPolicy": { + "description": "Whether CiliumClusterwideNetworkPolicy is enabled on this cluster.", + "type": "boolean" + }, "enableFqdnNetworkPolicy": { "description": "Whether FQDN Network Policy is enabled on this cluster.", "type": "boolean" @@ -5266,6 +5278,10 @@ "$ref": "SandboxConfig", "description": "Sandbox configuration for this node." }, + "secondaryBootDiskUpdateStrategy": { + "$ref": "SecondaryBootDiskUpdateStrategy", + "description": "Secondary boot disk update strategy." + }, "secondaryBootDisks": { "description": "List of secondary boot disks attached to the nodes.", "items": { @@ -6309,6 +6325,12 @@ }, "type": "object" }, + "SecondaryBootDiskUpdateStrategy": { + "description": "SecondaryBootDiskUpdateStrategy is a placeholder which will be extended in the future to define different options for updating secondary boot disks.", + "id": "SecondaryBootDiskUpdateStrategy", + "properties": {}, + "type": "object" + }, "SecurityBulletinEvent": { "description": "SecurityBulletinEvent is a notification sent to customers when a security bulletin has been posted that they are vulnerable to.", "id": "SecurityBulletinEvent", diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 941c64d438e..788ca5a8b88 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -1780,10 +1780,18 @@ type ClusterUpdate struct { // cluster. DesiredDnsConfig *DNSConfig `json:"desiredDnsConfig,omitempty"` + // DesiredEnableCiliumClusterwideNetworkPolicy: Enable/Disable Cilium + // Clusterwide Network Policy for the cluster. + DesiredEnableCiliumClusterwideNetworkPolicy bool `json:"desiredEnableCiliumClusterwideNetworkPolicy,omitempty"` + // DesiredEnableFqdnNetworkPolicy: Enable/Disable FQDN Network Policy // for the cluster. DesiredEnableFqdnNetworkPolicy bool `json:"desiredEnableFqdnNetworkPolicy,omitempty"` + // DesiredEnableMultiNetworking: Enable/Disable Multi-Networking for the + // cluster + DesiredEnableMultiNetworking bool `json:"desiredEnableMultiNetworking,omitempty"` + // DesiredEnablePrivateEndpoint: Enable/Disable private endpoint for the // cluster's master. DesiredEnablePrivateEndpoint bool `json:"desiredEnablePrivateEndpoint,omitempty"` @@ -4369,6 +4377,10 @@ type NetworkConfig struct { // DnsConfig: DNSConfig contains clusterDNS config for this cluster. DnsConfig *DNSConfig `json:"dnsConfig,omitempty"` + // EnableCiliumClusterwideNetworkPolicy: Whether + // CiliumClusterwideNetworkPolicy is enabled on this cluster. + EnableCiliumClusterwideNetworkPolicy bool `json:"enableCiliumClusterwideNetworkPolicy,omitempty"` + // EnableFqdnNetworkPolicy: Whether FQDN Network Policy is enabled on // this cluster. EnableFqdnNetworkPolicy bool `json:"enableFqdnNetworkPolicy,omitempty"` @@ -4792,6 +4804,9 @@ type NodeConfig struct { // SandboxConfig: Sandbox configuration for this node. SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + // SecondaryBootDiskUpdateStrategy: Secondary boot disk update strategy. + SecondaryBootDiskUpdateStrategy *SecondaryBootDiskUpdateStrategy `json:"secondaryBootDiskUpdateStrategy,omitempty"` + // SecondaryBootDisks: List of secondary boot disks attached to the // nodes. SecondaryBootDisks []*SecondaryBootDisk `json:"secondaryBootDisks,omitempty"` @@ -6546,6 +6561,12 @@ func (s *SecondaryBootDisk) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecondaryBootDiskUpdateStrategy: SecondaryBootDiskUpdateStrategy is a +// placeholder which will be extended in the future to define different +// options for updating secondary boot disks. +type SecondaryBootDiskUpdateStrategy struct { +} + // SecurityBulletinEvent: SecurityBulletinEvent is a notification sent // to customers when a security bulletin has been posted that they are // vulnerable to. diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 2fa095e7c2c..09c5ea3247b 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -2125,7 +2125,7 @@ } } }, - "revision": "20240221", + "revision": "20240312", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -2811,14 +2811,18 @@ "ALLOYDB" ], "enumDescriptions": [ - "The database provider is unknown.", - "CloudSQL runs the database.", - "RDS runs the database.", - "Amazon Aurora.", - "AlloyDB." + "Use this value for on-premise source database instances.", + "Cloud SQL is the source instance provider.", + "Amazon RDS is the source instance provider.", + "Amazon Aurora is the source instance provider.", + "AlloyDB for PostgreSQL is the source instance provider." ], "type": "string" }, + "sqlserver": { + "$ref": "SqlServerConnectionProfile", + "description": "Connection profile for a SQL Server data source." + }, "state": { "description": "The current connection profile state (e.g. DRAFT, READY, or FAILED).", "enum": [ @@ -3033,12 +3037,14 @@ "DATABASE_ENGINE_UNSPECIFIED", "MYSQL", "POSTGRESQL", + "SQLSERVER", "ORACLE" ], "enumDescriptions": [ "The source database engine of the migration job is unknown.", "The source engine is MySQL.", "The source engine is PostgreSQL.", + "The source engine is SQL Server.", "The source engine is Oracle." ], "type": "string" @@ -3211,12 +3217,14 @@ "DATABASE_ENGINE_UNSPECIFIED", "MYSQL", "POSTGRESQL", + "SQLSERVER", "ORACLE" ], "enumDescriptions": [ "The source database engine of the migration job is unknown.", "The source engine is MySQL.", "The source engine is PostgreSQL.", + "The source engine is SQL Server.", "The source engine is Oracle." ], "type": "string" @@ -3231,11 +3239,11 @@ "ALLOYDB" ], "enumDescriptions": [ - "The database provider is unknown.", - "CloudSQL runs the database.", - "RDS runs the database.", - "Amazon Aurora.", - "AlloyDB." + "Use this value for on-premise source database instances.", + "Cloud SQL is the source instance provider.", + "Amazon RDS is the source instance provider.", + "Amazon Aurora is the source instance provider.", + "AlloyDB for PostgreSQL is the source instance provider." ], "type": "string" } @@ -4445,7 +4453,8 @@ "CDC", "PROMOTE_IN_PROGRESS", "WAITING_FOR_SOURCE_WRITES_TO_STOP", - "PREPARING_THE_DUMP" + "PREPARING_THE_DUMP", + "READY_FOR_PROMOTE" ], "enumDescriptions": [ "The phase of the migration job is unknown.", @@ -4453,7 +4462,8 @@ "The migration job is CDC phase.", "The migration job is running the promote phase.", "Only RDS flow - waiting for source writes to stop", - "Only RDS flow - the sources writes stopped, waiting for dump to begin" + "Only RDS flow - the sources writes stopped, waiting for dump to begin", + "The migration job is ready to be promoted." ], "readOnly": true, "type": "string" @@ -4470,6 +4480,10 @@ "$ref": "DatabaseType", "description": "The database engine type and provider of the source." }, + "sqlserverHomogeneousMigrationJobConfig": { + "$ref": "SqlServerHomogeneousMigrationJobConfig", + "description": "Optional. Configuration for SQL Server homogeneous migration." + }, "state": { "description": "The current migration job state.", "enum": [ @@ -5567,6 +5581,130 @@ }, "type": "object" }, + "SqlServerBackups": { + "description": "Specifies the backup details in Cloud Storage for homogeneous migration to Cloud SQL for SQL Server.", + "id": "SqlServerBackups", + "properties": { + "gcsBucket": { + "description": "Required. The Cloud Storage bucket that stores backups for all replicated databases.", + "type": "string" + }, + "gcsPrefix": { + "description": "Optional. Cloud Storage path inside the bucket that stores backups.", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerConnectionProfile": { + "description": "Specifies connection parameters required specifically for SQL Server databases.", + "id": "SqlServerConnectionProfile", + "properties": { + "backups": { + "$ref": "SqlServerBackups", + "description": "The backup details in Cloud Storage for homogeneous migration to Cloud SQL for SQL Server." + }, + "cloudSqlId": { + "description": "If the source is a Cloud SQL database, use this field to provide the Cloud SQL instance ID of the source.", + "type": "string" + }, + "forwardSshConnectivity": { + "$ref": "ForwardSshTunnelConnectivity", + "description": "Forward SSH tunnel connectivity." + }, + "host": { + "description": "Required. The IP or hostname of the source SQL Server database.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Database Migration Service will be using to connect to the database. This field is not returned on request, and the value is encrypted when stored in Database Migration Service.", + "type": "string" + }, + "passwordSet": { + "description": "Output only. Indicates whether a new password is included in the request.", + "readOnly": true, + "type": "boolean" + }, + "port": { + "description": "Required. The network port of the source SQL Server database.", + "format": "int32", + "type": "integer" + }, + "privateConnectivity": { + "$ref": "PrivateConnectivity", + "description": "Private connectivity." + }, + "privateServiceConnectConnectivity": { + "$ref": "PrivateServiceConnectConnectivity", + "description": "Private Service Connect connectivity." + }, + "ssl": { + "$ref": "SslConfig", + "description": "SSL configuration for the destination to connect to the source database." + }, + "staticIpConnectivity": { + "$ref": "StaticIpConnectivity", + "description": "Static IP connectivity data (default, no additional details needed)." + }, + "username": { + "description": "Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerDatabaseBackup": { + "description": "Specifies the backup details for a single database in Cloud Storage for homogeneous migration to Cloud SQL for SQL Server.", + "id": "SqlServerDatabaseBackup", + "properties": { + "database": { + "description": "Required. Name of a SQL Server database for which to define backup configuration.", + "type": "string" + }, + "encryptionOptions": { + "$ref": "SqlServerEncryptionOptions", + "description": "Optional. Encryption settings for the database. Required if provided database backups are encrypted. Encryption settings include path to certificate, path to certificate private key, and key password." + } + }, + "type": "object" + }, + "SqlServerEncryptionOptions": { + "description": "Encryption settings for the SQL Server database.", + "id": "SqlServerEncryptionOptions", + "properties": { + "certPath": { + "description": "Required. Path to certificate.", + "type": "string" + }, + "pvkPassword": { + "description": "Required. Input only. Private key password.", + "type": "string" + }, + "pvkPath": { + "description": "Required. Path to certificate private key.", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerHomogeneousMigrationJobConfig": { + "description": "Configuration for homogeneous migration to Cloud SQL for SQL Server.", + "id": "SqlServerHomogeneousMigrationJobConfig", + "properties": { + "backupFilePattern": { + "description": "Required. Pattern that describes the default backup naming strategy. The specified pattern should ensure lexicographical order of backups. The pattern must define one of the following capture group sets: Capture group set #1 yy/yyyy - year, 2 or 4 digits mm - month number, 1-12 dd - day of month, 1-31 hh - hour of day, 00-23 mi - minutes, 00-59 ss - seconds, 00-59 Example: For backup file TestDB_backup_20230802_155400.trn, use pattern: (?.*)_backup_(?\\d{4})(?\\d{2})(?\\d{2})_(?\\d{2})(?\\d{2})(?\\d{2}).trn Capture group set #2 timestamp - unix timestamp Example: For backup file TestDB_backup_1691448254.trn, use pattern: (?.*)_backup_(?.*).trn", + "type": "string" + }, + "databaseBackups": { + "description": "Required. Backup details per database in Cloud Storage.", + "items": { + "$ref": "SqlServerDatabaseBackup" + }, + "type": "array" + } + }, + "type": "object" + }, "SshScript": { "description": "Response message for 'GenerateSshScript' request.", "id": "SshScript", diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 774ab27e632..d688ae590c6 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -1196,13 +1196,17 @@ type ConnectionProfile struct { // Provider: The database provider. // // Possible values: - // "DATABASE_PROVIDER_UNSPECIFIED" - The database provider is unknown. - // "CLOUDSQL" - CloudSQL runs the database. - // "RDS" - RDS runs the database. - // "AURORA" - Amazon Aurora. - // "ALLOYDB" - AlloyDB. + // "DATABASE_PROVIDER_UNSPECIFIED" - Use this value for on-premise + // source database instances. + // "CLOUDSQL" - Cloud SQL is the source instance provider. + // "RDS" - Amazon RDS is the source instance provider. + // "AURORA" - Amazon Aurora is the source instance provider. + // "ALLOYDB" - AlloyDB for PostgreSQL is the source instance provider. Provider string `json:"provider,omitempty"` + // Sqlserver: Connection profile for a SQL Server data source. + Sqlserver *SqlServerConnectionProfile `json:"sqlserver,omitempty"` + // State: The current connection profile state (e.g. DRAFT, READY, or // FAILED). // @@ -1564,6 +1568,7 @@ type DatabaseEngineInfo struct { // migration job is unknown. // "MYSQL" - The source engine is MySQL. // "POSTGRESQL" - The source engine is PostgreSQL. + // "SQLSERVER" - The source engine is SQL Server. // "ORACLE" - The source engine is Oracle. Engine string `json:"engine,omitempty"` @@ -1748,17 +1753,19 @@ type DatabaseType struct { // migration job is unknown. // "MYSQL" - The source engine is MySQL. // "POSTGRESQL" - The source engine is PostgreSQL. + // "SQLSERVER" - The source engine is SQL Server. // "ORACLE" - The source engine is Oracle. Engine string `json:"engine,omitempty"` // Provider: The database provider. // // Possible values: - // "DATABASE_PROVIDER_UNSPECIFIED" - The database provider is unknown. - // "CLOUDSQL" - CloudSQL runs the database. - // "RDS" - RDS runs the database. - // "AURORA" - Amazon Aurora. - // "ALLOYDB" - AlloyDB. + // "DATABASE_PROVIDER_UNSPECIFIED" - Use this value for on-premise + // source database instances. + // "CLOUDSQL" - Cloud SQL is the source instance provider. + // "RDS" - Amazon RDS is the source instance provider. + // "AURORA" - Amazon Aurora is the source instance provider. + // "ALLOYDB" - AlloyDB for PostgreSQL is the source instance provider. Provider string `json:"provider,omitempty"` // ForceSendFields is a list of field names (e.g. "Engine") to @@ -3494,6 +3501,7 @@ type MigrationJob struct { // source writes to stop // "PREPARING_THE_DUMP" - Only RDS flow - the sources writes stopped, // waiting for dump to begin + // "READY_FOR_PROMOTE" - The migration job is ready to be promoted. Phase string `json:"phase,omitempty"` // ReverseSshConnectivity: The details needed to communicate to the @@ -3507,6 +3515,10 @@ type MigrationJob struct { // SourceDatabase: The database engine type and provider of the source. SourceDatabase *DatabaseType `json:"sourceDatabase,omitempty"` + // SqlserverHomogeneousMigrationJobConfig: Optional. Configuration for + // SQL Server homogeneous migration. + SqlserverHomogeneousMigrationJobConfig *SqlServerHomogeneousMigrationJobConfig `json:"sqlserverHomogeneousMigrationJobConfig,omitempty"` + // State: The current migration job state. // // Possible values: @@ -5242,6 +5254,229 @@ func (s *SqlIpConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SqlServerBackups: Specifies the backup details in Cloud Storage for +// homogeneous migration to Cloud SQL for SQL Server. +type SqlServerBackups struct { + // GcsBucket: Required. The Cloud Storage bucket that stores backups for + // all replicated databases. + GcsBucket string `json:"gcsBucket,omitempty"` + + // GcsPrefix: Optional. Cloud Storage path inside the bucket that stores + // backups. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsBucket") 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. "GcsBucket") 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 *SqlServerBackups) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerBackups + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerConnectionProfile: Specifies connection parameters required +// specifically for SQL Server databases. +type SqlServerConnectionProfile struct { + // Backups: The backup details in Cloud Storage for homogeneous + // migration to Cloud SQL for SQL Server. + Backups *SqlServerBackups `json:"backups,omitempty"` + + // CloudSqlId: If the source is a Cloud SQL database, use this field to + // provide the Cloud SQL instance ID of the source. + CloudSqlId string `json:"cloudSqlId,omitempty"` + + // ForwardSshConnectivity: Forward SSH tunnel connectivity. + ForwardSshConnectivity *ForwardSshTunnelConnectivity `json:"forwardSshConnectivity,omitempty"` + + // Host: Required. The IP or hostname of the source SQL Server database. + Host string `json:"host,omitempty"` + + // Password: Required. Input only. The password for the user that + // Database Migration Service will be using to connect to the database. + // This field is not returned on request, and the value is encrypted + // when stored in Database Migration Service. + Password string `json:"password,omitempty"` + + // PasswordSet: Output only. Indicates whether a new password is + // included in the request. + PasswordSet bool `json:"passwordSet,omitempty"` + + // Port: Required. The network port of the source SQL Server database. + Port int64 `json:"port,omitempty"` + + // PrivateConnectivity: Private connectivity. + PrivateConnectivity *PrivateConnectivity `json:"privateConnectivity,omitempty"` + + // PrivateServiceConnectConnectivity: Private Service Connect + // connectivity. + PrivateServiceConnectConnectivity *PrivateServiceConnectConnectivity `json:"privateServiceConnectConnectivity,omitempty"` + + // Ssl: SSL configuration for the destination to connect to the source + // database. + Ssl *SslConfig `json:"ssl,omitempty"` + + // StaticIpConnectivity: Static IP connectivity data (default, no + // additional details needed). + StaticIpConnectivity *StaticIpConnectivity `json:"staticIpConnectivity,omitempty"` + + // Username: Required. The username that Database Migration Service will + // use to connect to the database. The value is encrypted when stored in + // Database Migration Service. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Backups") 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. "Backups") 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 *SqlServerConnectionProfile) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerConnectionProfile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerDatabaseBackup: Specifies the backup details for a single +// database in Cloud Storage for homogeneous migration to Cloud SQL for +// SQL Server. +type SqlServerDatabaseBackup struct { + // Database: Required. Name of a SQL Server database for which to define + // backup configuration. + Database string `json:"database,omitempty"` + + // EncryptionOptions: Optional. Encryption settings for the database. + // Required if provided database backups are encrypted. Encryption + // settings include path to certificate, path to certificate private + // key, and key password. + EncryptionOptions *SqlServerEncryptionOptions `json:"encryptionOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Database") 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. "Database") 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 *SqlServerDatabaseBackup) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerDatabaseBackup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerEncryptionOptions: Encryption settings for the SQL Server +// database. +type SqlServerEncryptionOptions struct { + // CertPath: Required. Path to certificate. + CertPath string `json:"certPath,omitempty"` + + // PvkPassword: Required. Input only. Private key password. + PvkPassword string `json:"pvkPassword,omitempty"` + + // PvkPath: Required. Path to certificate private key. + PvkPath string `json:"pvkPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CertPath") 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. "CertPath") 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 *SqlServerEncryptionOptions) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerEncryptionOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerHomogeneousMigrationJobConfig: Configuration for homogeneous +// migration to Cloud SQL for SQL Server. +type SqlServerHomogeneousMigrationJobConfig struct { + // BackupFilePattern: Required. Pattern that describes the default + // backup naming strategy. The specified pattern should ensure + // lexicographical order of backups. The pattern must define one of the + // following capture group sets: Capture group set #1 yy/yyyy - year, 2 + // or 4 digits mm - month number, 1-12 dd - day of month, 1-31 hh - hour + // of day, 00-23 mi - minutes, 00-59 ss - seconds, 00-59 Example: For + // backup file TestDB_backup_20230802_155400.trn, use pattern: + // (?.*)_backup_(?\d{4})(?\d{2})(?\d{2})_(?\d{2})(?\d{2})(?\d{2}).trn + // Capture group set #2 timestamp - unix timestamp Example: For backup + // file TestDB_backup_1691448254.trn, use pattern: + // (?.*)_backup_(?.*).trn + BackupFilePattern string `json:"backupFilePattern,omitempty"` + + // DatabaseBackups: Required. Backup details per database in Cloud + // Storage. + DatabaseBackups []*SqlServerDatabaseBackup `json:"databaseBackups,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupFilePattern") + // 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. "BackupFilePattern") 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 *SqlServerHomogeneousMigrationJobConfig) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerHomogeneousMigrationJobConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SshScript: Response message for 'GenerateSshScript' request. type SshScript struct { // Script: The ssh configuration script. diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index 68fed7dbc52..d6f9fd138a2 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -174,11 +174,215 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "lookupEntry": { + "description": "Looks up a single entry.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:lookupEntry", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lookupEntry", + "parameterOrder": [ + "name" + ], + "parameters": { + "aspectTypes": { + "description": "Optional. Limits the aspects returned to the provided aspect types. Only works if the CUSTOM view is selected.", + "location": "query", + "repeated": true, + "type": "string" + }, + "entry": { + "description": "Required. The resource name of the Entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The project to which the request should be attributed in the following form: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "paths": { + "description": "Optional. Limits the aspects returned to those associated with the provided paths within the Entry. Only works if the CUSTOM view is selected.", + "location": "query", + "repeated": true, + "type": "string" + }, + "view": { + "description": "Optional. View for controlling which parts of an entry are to be returned.", + "enum": [ + "ENTRY_VIEW_UNSPECIFIED", + "BASIC", + "FULL", + "CUSTOM", + "ALL" + ], + "enumDescriptions": [ + "Unspecified EntryView. Defaults to FULL.", + "Returns entry only, without aspects.", + "Returns all required aspects as well as the keys of all non-required aspects.", + "Returns aspects matching custom fields in GetEntryRequest. If the number of aspects would exceed 100, the first 100 will be returned.", + "Returns all aspects. If the number of aspects would exceed 100, the first 100 will be returned." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:lookupEntry", + "response": { + "$ref": "GoogleCloudDataplexV1Entry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "searchEntries": { + "description": "Searches for entries matching given query and scope.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:searchEntries", + "httpMethod": "POST", + "id": "dataplex.projects.locations.searchEntries", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The project to which the request should be attributed in the following form: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "orderBy": { + "description": "Optional. Ordering of the results. Supported options to be added later.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Pagination.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "location": "query", + "type": "string" + }, + "query": { + "description": "Required. The query against which entries in scope should be matched.", + "location": "query", + "type": "string" + }, + "scope": { + "description": "Optional. The scope under which the search should be operating. Should either be organizations/ or projects/. If left unspecified, it will default to the organization where the project provided in name is located.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:searchEntries", + "response": { + "$ref": "GoogleCloudDataplexV1SearchEntriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { "aspectTypes": { "methods": { + "create": { + "description": "Creates an AspectType", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes", + "httpMethod": "POST", + "id": "dataplex.projects.locations.aspectTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "aspectTypeId": { + "description": "Required. AspectType identifier.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the AspectType, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/aspectTypes", + "request": { + "$ref": "GoogleCloudDataplexV1AspectType" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a AspectType resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.aspectTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If the client provided etag value does not match the current etag value, the DeleteAspectTypeRequest method returns an ABORTED error response", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the AspectType: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a AspectType resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.aspectTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the AspectType: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1AspectType" + }, + "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": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}:getIamPolicy", @@ -210,6 +414,91 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Lists AspectType resources in a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes", + "httpMethod": "GET", + "id": "dataplex.projects.locations.aspectTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request. Filters are case-sensitive. The following formats are supported:labels.key1 = \"value1\" labels:key1 name = \"value\" These restrictions can be coinjoined with AND, OR and NOT conjunctions.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Order by fields (name or create_time) for the result. If not specified, the ordering is undefined.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of AspectTypes to return. The service may return fewer than this value. If unspecified, at most 10 AspectTypes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token received from a previous ListAspectTypes call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAspectTypes must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the AspectType location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/aspectTypes", + "response": { + "$ref": "GoogleCloudDataplexV1ListAspectTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a AspectType resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.aspectTypes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the AspectType, of the form: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1AspectType" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "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}/aspectTypes/{aspectTypesId}:setIamPolicy", @@ -602,6 +891,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "generateDataQualityRules": { + "description": "Generates recommended DataQualityRule from a data profiling DataScan.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}:generateDataQualityRules", + "httpMethod": "POST", + "id": "dataplex.projects.locations.dataScans.generateDataQualityRules", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name should be either * the name of a datascan with at least one successful completed data profiling job, or * the name of a successful completed data profiling datascan job.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:generateDataQualityRules", + "request": { + "$ref": "GoogleCloudDataplexV1GenerateDataQualityRulesRequest" + }, + "response": { + "$ref": "GoogleCloudDataplexV1GenerateDataQualityRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a DataScan resource.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}", @@ -846,6 +1163,34 @@ "resources": { "jobs": { "methods": { + "generateDataQualityRules": { + "description": "Generates recommended DataQualityRule from a data profiling DataScan.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}/jobs/{jobsId}:generateDataQualityRules", + "httpMethod": "POST", + "id": "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name should be either * the name of a datascan with at least one successful completed data profiling job, or * the name of a successful completed data profiling datascan job.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:generateDataQualityRules", + "request": { + "$ref": "GoogleCloudDataplexV1GenerateDataQualityRulesRequest" + }, + "response": { + "$ref": "GoogleCloudDataplexV1GenerateDataQualityRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a DataScanJob resource.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}/jobs/{jobsId}", @@ -1473,9 +1818,102 @@ }, "entryGroups": { "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}/entryGroups/{entryGroupsId}:getIamPolicy", + "create": { + "description": "Creates an EntryGroup", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups", + "httpMethod": "POST", + "id": "dataplex.projects.locations.entryGroups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "entryGroupId": { + "description": "Required. EntryGroup identifier.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the entryGroup, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/entryGroups", + "request": { + "$ref": "GoogleCloudDataplexV1EntryGroup" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a EntryGroup resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.entryGroups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If the client provided etag value does not match the current etag value, the DeleteEntryGroupRequest method returns an ABORTED error response", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the EntryGroup: projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a EntryGroup resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryGroups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the EntryGroup: projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1EntryGroup" + }, + "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": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:getIamPolicy", "httpMethod": "GET", "id": "dataplex.projects.locations.entryGroups.getIamPolicy", "parameterOrder": [ @@ -1504,6 +1942,91 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Lists EntryGroup resources in a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryGroups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of EntryGroups to return. The service may return fewer than this value. If unspecified, at most 10 EntryGroups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token received from a previous ListEntryGroups call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListEntryGroups must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the entryGroup location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entryGroups", + "response": { + "$ref": "GoogleCloudDataplexV1ListEntryGroupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a EntryGroup resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.entryGroups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the EntryGroup, of the form: projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1EntryGroup" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "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}/entryGroups/{entryGroupsId}:setIamPolicy", @@ -1544,52 +2067,440 @@ "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/[^/]+/entryGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "entries": { + "methods": { + "create": { + "description": "Creates an Entry.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries", + "httpMethod": "POST", + "id": "dataplex.projects.locations.entryGroups.entries.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "entryId": { + "description": "Required. Entry identifier. It has to be unique within an Entry Group.Entries corresponding to Google Cloud resources use Entry ID format based on Full Resource Names (https://cloud.google.com/apis/design/resource_names#full_resource_name). The format is a Full Resource Name of the resource without the prefix double slashes in the API Service Name part of Full Resource Name. This allows retrieval of entries using their associated resource name.For example if the Full Resource Name of a resource is //library.googleapis.com/shelves/shelf1/books/book2, then the suggested entry_id is library.googleapis.com/shelves/shelf1/books/book2.It is also suggested to follow the same convention for entries corresponding to resources from other providers or systems than Google Cloud.The maximum size of the field is 4000 characters.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent Entry Group: projects/{project}/locations/{location}/entryGroups/{entry_group}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entries", + "request": { + "$ref": "GoogleCloudDataplexV1Entry" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Entry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an Entry.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.entryGroups.entries.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Entry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a single entry.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryGroups.entries.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "aspectTypes": { + "description": "Optional. Limits the aspects returned to the provided aspect types. Only works if the CUSTOM view is selected.", + "location": "query", + "repeated": true, + "type": "string" + }, + "name": { + "description": "Required. The resource name of the Entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/.*$", + "required": true, + "type": "string" + }, + "paths": { + "description": "Optional. Limits the aspects returned to those associated with the provided paths within the Entry. Only works if the CUSTOM view is selected.", + "location": "query", + "repeated": true, + "type": "string" + }, + "view": { + "description": "Optional. View for controlling which parts of an entry are to be returned.", + "enum": [ + "ENTRY_VIEW_UNSPECIFIED", + "BASIC", + "FULL", + "CUSTOM", + "ALL" + ], + "enumDescriptions": [ + "Unspecified EntryView. Defaults to FULL.", + "Returns entry only, without aspects.", + "Returns all required aspects as well as the keys of all non-required aspects.", + "Returns aspects matching custom fields in GetEntryRequest. If the number of aspects would exceed 100, the first 100 will be returned.", + "Returns all aspects. If the number of aspects would exceed 100, the first 100 will be returned." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Entry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists entries within an entry group.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryGroups.entries.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter on the entries to return. Filters are case-sensitive. The request can be filtered by the following fields: entry_type, display_name. The comparison operators are =, !=, \u003c, \u003e, \u003c=, \u003e= (strings are compared according to lexical order) The logical operators AND, OR, NOT can be used in the filter. Example filter expressions: \"display_name=AnExampleDisplayName\" \"entry_type=projects/example-project/locations/global/entryTypes/example-entry_type\" \"entry_type=projects/a* OR \"entry_type=projects/k*\" \"NOT display_name=AnotherExampleDisplayName\"", + "location": "query", + "type": "string" + }, + "pageSize": { + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The pagination token returned by a previous request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent Entry Group: projects/{project}/locations/{location}/entryGroups/{entry_group}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entries", + "response": { + "$ref": "GoogleCloudDataplexV1ListEntriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an Entry.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.entryGroups.entries.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true and the entry does not exist, it will be created.", + "location": "query", + "type": "boolean" + }, + "aspectKeys": { + "description": "Optional. The map keys of the Aspects which should be modified. Supports the following syntaxes: * - matches aspect on given type and empty path * @path - matches aspect on given type and specified path * * - matches aspects on given type for all paths * *@path - matches aspects of all types on the given pathExisting aspects matching the syntax will not be removed unless delete_missing_aspects is set to true.If this field is left empty, it will be treated as specifying exactly those Aspects present in the request.", + "location": "query", + "repeated": true, + "type": "string" + }, + "deleteMissingAspects": { + "description": "Optional. If set to true and the aspect_keys specify aspect ranges, any existing aspects from that range not provided in the request will be deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Identifier. The relative resource name of the Entry, of the form: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/.*$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Mask of fields to update. To update Aspects, the update_mask must contain the value \"aspects\".If the update_mask is empty, all modifiable fields present in the request will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Entry" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Entry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "entryTypes": { + "methods": { + "create": { + "description": "Creates an EntryType", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes", + "httpMethod": "POST", + "id": "dataplex.projects.locations.entryTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "entryTypeId": { + "description": "Required. EntryType identifier.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the EntryType, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/entryTypes", + "request": { + "$ref": "GoogleCloudDataplexV1EntryType" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a EntryType resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes/{entryTypesId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.entryTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If the client provided etag value does not match the current etag value, the DeleteEntryTypeRequest method returns an ABORTED error response", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the EntryType: projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a EntryType resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes/{entryTypesId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the EntryType: projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1EntryType" + }, + "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": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes/{entryTypesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryTypes.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/[^/]+/entryTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists EntryType resources in a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request. Filters are case-sensitive. The following formats are supported:labels.key1 = \"value1\" labels:key1 name = \"value\" These restrictions can be coinjoined with AND, OR and NOT conjunctions.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Order by fields (name or create_time) for the result. If not specified, the ordering is undefined.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of EntryTypes to return. The service may return fewer than this value. If unspecified, at most 10 EntryTypes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token received from a previous ListEntryTypes call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListEntryTypes must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the EntryType location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1TestIamPermissionsRequest" - }, + "path": "v1/{+parent}/entryTypes", "response": { - "$ref": "GoogleIamV1TestIamPermissionsResponse" + "$ref": "GoogleCloudDataplexV1ListEntryTypesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - } - } - }, - "entryTypes": { - "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}/entryTypes/{entryTypesId}:getIamPolicy", - "httpMethod": "GET", - "id": "dataplex.projects.locations.entryTypes.getIamPolicy", + }, + "patch": { + "description": "Updates a EntryType resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes/{entryTypesId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.entryTypes.patch", "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": "Output only. The relative resource name of the EntryType, of the form: projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" } }, - "path": "v1/{+resource}:getIamPolicy", + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1EntryType" + }, "response": { - "$ref": "GoogleIamV1Policy" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -4360,7 +5271,7 @@ } } }, - "revision": "20240304", + "revision": "20240311", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -4578,6 +5489,269 @@ "properties": {}, "type": "object" }, + "GoogleCloudDataplexV1Aspect": { + "description": "An aspect is a single piece of metadata describing an entry.", + "id": "GoogleCloudDataplexV1Aspect", + "properties": { + "aspectSource": { + "$ref": "GoogleCloudDataplexV1AspectSource" + }, + "aspectType": { + "description": "Output only. The resource name of the type used to create this Aspect.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the Aspect was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "data": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Required. The content of the aspect, according to its aspect type schema. This will replace content. The maximum size of the field is 120KB (encoded as UTF-8).", + "type": "object" + }, + "path": { + "description": "Output only. The path in the entry under which the aspect is attached.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the Aspect was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AspectSource": { + "description": "AspectSource contains source system related information for the aspect.", + "id": "GoogleCloudDataplexV1AspectSource", + "properties": { + "createTime": { + "description": "The create time of the aspect in the source system.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "The update time of the aspect in the source system.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AspectType": { + "description": "Aspect Type is a template for creating Aspects, and represents the JSON-schema for a given Entry, e.g., BigQuery Table Schema.", + "id": "GoogleCloudDataplexV1AspectType", + "properties": { + "authorization": { + "$ref": "GoogleCloudDataplexV1AspectTypeAuthorization", + "description": "Immutable. Authorization defined for this type." + }, + "createTime": { + "description": "Output only. The time when the AspectType was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the AspectType.", + "type": "string" + }, + "displayName": { + "description": "Optional. User friendly display name.", + "type": "string" + }, + "etag": { + "description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-defined labels for the AspectType.", + "type": "object" + }, + "metadataTemplate": { + "$ref": "GoogleCloudDataplexV1AspectTypeMetadataTemplate", + "description": "Required. MetadataTemplate of the aspect." + }, + "name": { + "description": "Output only. The relative resource name of the AspectType, of the form: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.", + "readOnly": true, + "type": "string" + }, + "transferStatus": { + "description": "Output only. Denotes the transfer status of the Aspect Type. It is unspecified for Aspect Types created from Dataplex API.", + "enum": [ + "TRANSFER_STATUS_UNSPECIFIED", + "TRANSFER_STATUS_MIGRATED", + "TRANSFER_STATUS_TRANSFERRED" + ], + "enumDescriptions": [ + "The default value. It is set for resources that were not subject for migration from Data Catalog service.", + "Indicates that a resource was migrated from Data Catalog service but it hasn't been transferred yet. In particular the resource cannot be updated from Dataplex API.", + "Indicates that a resource was transferred from Data Catalog service. The resource can only be updated from Dataplex API." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System generated globally unique ID for the AspectType. This ID will be different if the AspectType is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the AspectType was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AspectTypeAuthorization": { + "description": "Autorization for an Aspect Type.", + "id": "GoogleCloudDataplexV1AspectTypeAuthorization", + "properties": { + "alternateUsePermission": { + "description": "Immutable. The IAM permission grantable on the Entry Group to allow access to instantiate Aspects of Dataplex owned Aspect Types, only settable for Dataplex owned Types.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AspectTypeMetadataTemplate": { + "description": "MetadataTemplate definition for AspectType", + "id": "GoogleCloudDataplexV1AspectTypeMetadataTemplate", + "properties": { + "annotations": { + "$ref": "GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations", + "description": "Optional. Specifies annotations on this field." + }, + "arrayItems": { + "$ref": "GoogleCloudDataplexV1AspectTypeMetadataTemplate", + "description": "Optional. array_items needs to be set if the type is array. array_items can refer to a primitive field or a complex (record only) field. To specify a primitive field, just name and type needs to be set in the nested MetadataTemplate. The recommended value for the name field is item, as this is not used in the actual payload." + }, + "constraints": { + "$ref": "GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints", + "description": "Optional. Specifies the constraints on this field." + }, + "enumValues": { + "description": "Optional. The list of values for an enum type. Needs to be defined if the type is enum.", + "items": { + "$ref": "GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue" + }, + "type": "array" + }, + "index": { + "description": "Optional. Index is used to encode Template messages. The value of index can range between 1 and 2,147,483,647. Index must be unique within all fields in a Template. (Nested Templates can reuse indexes). Once a Template is defined, the index cannot be changed, because it identifies the field in the actual storage format. Index is a mandatory field, but it is optional for top level fields, and map/array \"values\" definitions.", + "format": "int32", + "type": "integer" + }, + "mapItems": { + "$ref": "GoogleCloudDataplexV1AspectTypeMetadataTemplate", + "description": "Optional. map_items needs to be set if the type is map. map_items can refer to a primitive field or a complex (record only) field. To specify a primitive field, just name and type needs to be set in the nested MetadataTemplate. The recommended value for the name field is item, as this is not used in the actual payload." + }, + "name": { + "description": "Required. The name of the field.", + "type": "string" + }, + "recordFields": { + "description": "Optional. Field definition, needs to be specified if the type is record. Defines the nested fields.", + "items": { + "$ref": "GoogleCloudDataplexV1AspectTypeMetadataTemplate" + }, + "type": "array" + }, + "type": { + "description": "Required. The datatype of this field. The following values are supported: Primitive types (string, integer, boolean, double, datetime); datetime must be of the format RFC3339 UTC \"Zulu\" (Examples: \"2014-10-02T15:01:23Z\" and \"2014-10-02T15:01:23.045123456Z\"). Complex types (enum, array, map, record).", + "type": "string" + }, + "typeId": { + "description": "Optional. Id can be used if this definition of the field needs to be reused later. Id needs to be unique across the entire template. Id can only be specified if the field type is record.", + "type": "string" + }, + "typeRef": { + "description": "Optional. A reference to another field definition (instead of an inline definition). The value must be equal to the value of an id field defined elsewhere in the MetadataTemplate. Only fields with type as record can refer to other fields.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations": { + "description": "Definition of the annotations of a field", + "id": "GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations", + "properties": { + "deprecated": { + "description": "Optional. Marks a field as deprecated, a deprecation message can be included.", + "type": "string" + }, + "description": { + "description": "Optional. Specify a description for a field", + "type": "string" + }, + "displayName": { + "description": "Optional. Specify a displayname for a field.", + "type": "string" + }, + "displayOrder": { + "description": "Optional. Specify a display order for a field. Display order can be used to reorder where a field is rendered", + "format": "int32", + "type": "integer" + }, + "stringType": { + "description": "Optional. String Type annotations can be used to specify special meaning to string fields. The following values are supported: richText: The field must be interpreted as a rich text field. url: A fully qualified url link. resource: A service qualified resource reference.", + "type": "string" + }, + "stringValues": { + "description": "Optional. Suggested hints for string fields. These can be used to suggest values to users, through an UI for example.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints": { + "description": "Definition of the constraints of a field", + "id": "GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints", + "properties": { + "required": { + "description": "Optional. Marks this as an optional/required field.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue": { + "description": "Definition of Enumvalue (to be used by enum fields)", + "id": "GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue", + "properties": { + "deprecated": { + "description": "Optional. Optional deprecation message to be set if an enum value needs to be deprecated.", + "type": "string" + }, + "index": { + "description": "Required. Index for the enum. Cannot be modified.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. Name of the enumvalue. This is the actual value that the aspect will contain.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1Asset": { "description": "An asset represents a cloud resource that is being managed within a lake as a member of a zone.", "id": "GoogleCloudDataplexV1Asset", @@ -5207,6 +6381,44 @@ }, "type": "object" }, + "GoogleCloudDataplexV1DataDocumentationResult": { + "description": "The output of a DataDocumentation scan.", + "id": "GoogleCloudDataplexV1DataDocumentationResult", + "properties": { + "queries": { + "description": "Output only. The list of generated queries.", + "items": { + "$ref": "GoogleCloudDataplexV1DataDocumentationResultQuery" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1DataDocumentationResultQuery": { + "description": "A query in data documentation", + "id": "GoogleCloudDataplexV1DataDocumentationResultQuery", + "properties": { + "description": { + "description": "Output only. The description for the query.", + "readOnly": true, + "type": "string" + }, + "sql": { + "description": "Output only. The SQL query string which can be executed.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1DataDocumentationSpec": { + "description": "DataDocumentation scan related spec.", + "id": "GoogleCloudDataplexV1DataDocumentationSpec", + "properties": {}, + "type": "object" + }, "GoogleCloudDataplexV1DataProfileResult": { "description": "DataProfileResult defines the output of DataProfileScan. Each field of the table will have field type specific profile result.", "id": "GoogleCloudDataplexV1DataProfileResult", @@ -6121,6 +7333,15 @@ "$ref": "GoogleCloudDataplexV1DataSource", "description": "Required. The data source for DataScan." }, + "dataDocumentationResult": { + "$ref": "GoogleCloudDataplexV1DataDocumentationResult", + "description": "Output only. The result of the data documentation scan.", + "readOnly": true + }, + "dataDocumentationSpec": { + "$ref": "GoogleCloudDataplexV1DataDocumentationSpec", + "description": "DataDocumentationScan related setting." + }, "dataProfileResult": { "$ref": "GoogleCloudDataplexV1DataProfileResult", "description": "Output only. The result of the data profile scan.", @@ -6192,12 +7413,14 @@ "enum": [ "DATA_SCAN_TYPE_UNSPECIFIED", "DATA_QUALITY", - "DATA_PROFILE" + "DATA_PROFILE", + "DATA_DOCUMENTATION" ], "enumDescriptions": [ "The DataScan type is unspecified.", "Data Quality scan.", - "Data Profile scan." + "Data Profile scan.", + "Data Documentation scan." ], "readOnly": true, "type": "string" @@ -6502,6 +7725,16 @@ "description": "A DataScanJob represents an instance of DataScan execution.", "id": "GoogleCloudDataplexV1DataScanJob", "properties": { + "dataDocumentationResult": { + "$ref": "GoogleCloudDataplexV1DataDocumentationResult", + "description": "Output only. The result of the data documentation scan.", + "readOnly": true + }, + "dataDocumentationSpec": { + "$ref": "GoogleCloudDataplexV1DataDocumentationSpec", + "description": "Output only. DataDocumentationScan related setting.", + "readOnly": true + }, "dataProfileResult": { "$ref": "GoogleCloudDataplexV1DataProfileResult", "description": "Output only. The result of the data profile scan.", @@ -6572,12 +7805,14 @@ "enum": [ "DATA_SCAN_TYPE_UNSPECIFIED", "DATA_QUALITY", - "DATA_PROFILE" + "DATA_PROFILE", + "DATA_DOCUMENTATION" ], "enumDescriptions": [ "The DataScan type is unspecified.", "Data Quality scan.", - "Data Profile scan." + "Data Profile scan.", + "Data Documentation scan." ], "readOnly": true, "type": "string" @@ -6818,107 +8053,390 @@ }, "type": "object" }, - "GoogleCloudDataplexV1Entity": { - "description": "Represents tables and fileset metadata contained within a zone.", - "id": "GoogleCloudDataplexV1Entity", + "GoogleCloudDataplexV1Entity": { + "description": "Represents tables and fileset metadata contained within a zone.", + "id": "GoogleCloudDataplexV1Entity", + "properties": { + "access": { + "$ref": "GoogleCloudDataplexV1StorageAccess", + "description": "Output only. Identifies the access mechanism to the entity. Not user settable.", + "readOnly": true + }, + "asset": { + "description": "Required. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset.", + "type": "string" + }, + "catalogEntry": { + "description": "Output only. The name of the associated Data Catalog entry.", + "readOnly": true, + "type": "string" + }, + "compatibility": { + "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatus", + "description": "Output only. Metadata stores that the entity is compatible with.", + "readOnly": true + }, + "createTime": { + "description": "Output only. The time when the entity was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataPath": { + "description": "Required. Immutable. The storage path of the entity data. For Cloud Storage data, this is the fully-qualified path to the entity, such as gs://bucket/path/to/data. For BigQuery data, this is the name of the table resource, such as projects/project_id/datasets/dataset_id/tables/table_id.", + "type": "string" + }, + "dataPathPattern": { + "description": "Optional. The set of items within the data path constituting the data in the entity, represented as a glob path. Example: gs://bucket/path/to/data/**/*.csv.", + "type": "string" + }, + "description": { + "description": "Optional. User friendly longer description text. Must be shorter than or equal to 1024 characters.", + "type": "string" + }, + "displayName": { + "description": "Optional. Display name must be shorter than or equal to 256 characters.", + "type": "string" + }, + "etag": { + "description": "Optional. The etag associated with the entity, which can be retrieved with a GetEntity request. Required for update and delete requests.", + "type": "string" + }, + "format": { + "$ref": "GoogleCloudDataplexV1StorageFormat", + "description": "Required. Identifies the storage format of the entity data. It does not apply to entities with data stored in BigQuery." + }, + "id": { + "description": "Required. A user-provided entity ID. It is mutable, and will be used as the published table name. Specifying a new ID in an update entity request will override the existing value. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores, and consist of 256 or fewer characters.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}.", + "readOnly": true, + "type": "string" + }, + "schema": { + "$ref": "GoogleCloudDataplexV1Schema", + "description": "Required. The description of the data structure and layout. The schema is not included in list responses. It is only included in SCHEMA and FULL entity views of a GetEntity response." + }, + "system": { + "description": "Required. Immutable. Identifies the storage system of the entity data.", + "enum": [ + "STORAGE_SYSTEM_UNSPECIFIED", + "CLOUD_STORAGE", + "BIGQUERY" + ], + "enumDescriptions": [ + "Storage system unspecified.", + "The entity data is contained within a Cloud Storage bucket.", + "The entity data is contained within a BigQuery dataset." + ], + "type": "string" + }, + "type": { + "description": "Required. Immutable. The type of entity.", + "enum": [ + "TYPE_UNSPECIFIED", + "TABLE", + "FILESET" + ], + "enumDescriptions": [ + "Type unspecified.", + "Structured and semi-structured data.", + "Unstructured data." + ], + "type": "string" + }, + "uid": { + "description": "Output only. System generated unique ID for the Entity. This ID will be different if the Entity is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the entity was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EntityCompatibilityStatus": { + "description": "Provides compatibility information for various metadata stores.", + "id": "GoogleCloudDataplexV1EntityCompatibilityStatus", + "properties": { + "bigquery": { + "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", + "description": "Output only. Whether this entity is compatible with BigQuery.", + "readOnly": true + }, + "hiveMetastore": { + "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", + "description": "Output only. Whether this entity is compatible with Hive Metastore.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility": { + "description": "Provides compatibility information for a specific metadata store.", + "id": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", + "properties": { + "compatible": { + "description": "Output only. Whether the entity is compatible and can be represented in the metadata store.", + "readOnly": true, + "type": "boolean" + }, + "reason": { + "description": "Output only. Provides additional detail if the entity is incompatible with the metadata store.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Entry": { + "description": "An entry is a representation of a data asset which can be described by various metadata.", + "id": "GoogleCloudDataplexV1Entry", + "properties": { + "aspects": { + "additionalProperties": { + "$ref": "GoogleCloudDataplexV1Aspect" + }, + "description": "Optional. The Aspects attached to the Entry. The key is either the resource name of the aspect type (if the aspect is attached directly to the entry) or \"aspectType@path\" if the aspect is attached to an entry's path.", + "type": "object" + }, + "createTime": { + "description": "Output only. The time when the Entry was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "entrySource": { + "$ref": "GoogleCloudDataplexV1EntrySource", + "description": "Optional. Source system related information for an entry." + }, + "entryType": { + "description": "Required. Immutable. The resource name of the EntryType used to create this Entry.", + "type": "string" + }, + "fullyQualifiedName": { + "description": "Optional. A name for the entry that can reference it in an external system. The maximum size of the field is 4000 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. The relative resource name of the Entry, of the form: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", + "type": "string" + }, + "parentEntry": { + "description": "Optional. Immutable. The resource name of the parent entry.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the Entry was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EntryGroup": { + "description": "An Entry Group represents a logical grouping of one or more Entries.", + "id": "GoogleCloudDataplexV1EntryGroup", + "properties": { + "createTime": { + "description": "Output only. The time when the EntryGroup was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the EntryGroup.", + "type": "string" + }, + "displayName": { + "description": "Optional. User friendly display name.", + "type": "string" + }, + "etag": { + "description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-defined labels for the EntryGroup.", + "type": "object" + }, + "name": { + "description": "Output only. The relative resource name of the EntryGroup, of the form: projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}.", + "readOnly": true, + "type": "string" + }, + "transferStatus": { + "description": "Output only. Denotes the transfer status of the Entry Group. It is unspecified for Entry Group created from Dataplex API.", + "enum": [ + "TRANSFER_STATUS_UNSPECIFIED", + "TRANSFER_STATUS_MIGRATED", + "TRANSFER_STATUS_TRANSFERRED" + ], + "enumDescriptions": [ + "The default value. It is set for resources that were not subject for migration from Data Catalog service.", + "Indicates that a resource was migrated from Data Catalog service but it hasn't been transferred yet. In particular the resource cannot be updated from Dataplex API.", + "Indicates that a resource was transferred from Data Catalog service. The resource can only be updated from Dataplex API." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System generated globally unique ID for the EntryGroup. This ID will be different if the EntryGroup is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the EntryGroup was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EntrySource": { + "description": "EntrySource contains source system related information for the entry.", + "id": "GoogleCloudDataplexV1EntrySource", + "properties": { + "ancestors": { + "description": "Immutable. The ancestors of the Entry in the source system.", + "items": { + "$ref": "GoogleCloudDataplexV1EntrySourceAncestor" + }, + "type": "array" + }, + "createTime": { + "description": "The create time of the resource in the source system.", + "format": "google-datetime", + "type": "string" + }, + "description": { + "description": "Description of the Entry. The maximum size of the field is 2000 characters.", + "type": "string" + }, + "displayName": { + "description": "User friendly display name. The maximum size of the field is 500 characters.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels. The maximum size of keys and values is 128 characters each.", + "type": "object" + }, + "platform": { + "description": "The platform containing the source system. The maximum size of the field is 64 characters.", + "type": "string" + }, + "resource": { + "description": "The name of the resource in the source system. The maximum size of the field is 4000 characters.", + "type": "string" + }, + "system": { + "description": "The name of the source system. The maximum size of the field is 64 characters.", + "type": "string" + }, + "updateTime": { + "description": "The update time of the resource in the source system.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EntrySourceAncestor": { + "description": "Ancestor contains information about individual items in the hierarchy of an Entry.", + "id": "GoogleCloudDataplexV1EntrySourceAncestor", "properties": { - "access": { - "$ref": "GoogleCloudDataplexV1StorageAccess", - "description": "Output only. Identifies the access mechanism to the entity. Not user settable.", - "readOnly": true - }, - "asset": { - "description": "Required. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset.", + "name": { + "description": "Optional. The name of the ancestor resource.", "type": "string" }, - "catalogEntry": { - "description": "Output only. The name of the associated Data Catalog entry.", - "readOnly": true, + "type": { + "description": "Optional. The type of the ancestor resource.", "type": "string" - }, - "compatibility": { - "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatus", - "description": "Output only. Metadata stores that the entity is compatible with.", - "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EntryType": { + "description": "Entry Type is a template for creating Entries.", + "id": "GoogleCloudDataplexV1EntryType", + "properties": { + "authorization": { + "$ref": "GoogleCloudDataplexV1EntryTypeAuthorization", + "description": "Immutable. Authorization defined for this type." }, "createTime": { - "description": "Output only. The time when the entity was created.", + "description": "Output only. The time when the EntryType was created.", "format": "google-datetime", "readOnly": true, "type": "string" }, - "dataPath": { - "description": "Required. Immutable. The storage path of the entity data. For Cloud Storage data, this is the fully-qualified path to the entity, such as gs://bucket/path/to/data. For BigQuery data, this is the name of the table resource, such as projects/project_id/datasets/dataset_id/tables/table_id.", - "type": "string" - }, - "dataPathPattern": { - "description": "Optional. The set of items within the data path constituting the data in the entity, represented as a glob path. Example: gs://bucket/path/to/data/**/*.csv.", - "type": "string" - }, "description": { - "description": "Optional. User friendly longer description text. Must be shorter than or equal to 1024 characters.", + "description": "Optional. Description of the EntryType.", "type": "string" }, "displayName": { - "description": "Optional. Display name must be shorter than or equal to 256 characters.", + "description": "Optional. User friendly display name.", "type": "string" }, "etag": { - "description": "Optional. The etag associated with the entity, which can be retrieved with a GetEntity request. Required for update and delete requests.", + "description": "Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", "type": "string" }, - "format": { - "$ref": "GoogleCloudDataplexV1StorageFormat", - "description": "Required. Identifies the storage format of the entity data. It does not apply to entities with data stored in BigQuery." - }, - "id": { - "description": "Required. A user-provided entity ID. It is mutable, and will be used as the published table name. Specifying a new ID in an update entity request will override the existing value. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores, and consist of 256 or fewer characters.", - "type": "string" + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-defined labels for the EntryType.", + "type": "object" }, "name": { - "description": "Output only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}.", + "description": "Output only. The relative resource name of the EntryType, of the form: projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.", "readOnly": true, "type": "string" }, - "schema": { - "$ref": "GoogleCloudDataplexV1Schema", - "description": "Required. The description of the data structure and layout. The schema is not included in list responses. It is only included in SCHEMA and FULL entity views of a GetEntity response." + "platform": { + "description": "Optional. The platform that Entries of this type belongs to.", + "type": "string" + }, + "requiredAspects": { + "description": "AspectInfo for the entry type.", + "items": { + "$ref": "GoogleCloudDataplexV1EntryTypeAspectInfo" + }, + "type": "array" }, "system": { - "description": "Required. Immutable. Identifies the storage system of the entity data.", - "enum": [ - "STORAGE_SYSTEM_UNSPECIFIED", - "CLOUD_STORAGE", - "BIGQUERY" - ], - "enumDescriptions": [ - "Storage system unspecified.", - "The entity data is contained within a Cloud Storage bucket.", - "The entity data is contained within a BigQuery dataset." - ], + "description": "Optional. The system that Entries of this type belongs to. Examples include CloudSQL, MariaDB etc", "type": "string" }, - "type": { - "description": "Required. Immutable. The type of entity.", - "enum": [ - "TYPE_UNSPECIFIED", - "TABLE", - "FILESET" - ], - "enumDescriptions": [ - "Type unspecified.", - "Structured and semi-structured data.", - "Unstructured data." - ], - "type": "string" + "typeAliases": { + "description": "Optional. Indicates the class this Entry Type belongs to, for example, TABLE, DATABASE, MODEL.", + "items": { + "type": "string" + }, + "type": "array" }, "uid": { - "description": "Output only. System generated unique ID for the Entity. This ID will be different if the Entity is deleted and re-created with the same name.", + "description": "Output only. System generated globally unique ID for the EntryType. This ID will be different if the EntryType is deleted and re-created with the same name.", "readOnly": true, "type": "string" }, "updateTime": { - "description": "Output only. The time when the entity was last updated.", + "description": "Output only. The time when the EntryType was last updated.", "format": "google-datetime", "readOnly": true, "type": "string" @@ -6926,35 +8444,22 @@ }, "type": "object" }, - "GoogleCloudDataplexV1EntityCompatibilityStatus": { - "description": "Provides compatibility information for various metadata stores.", - "id": "GoogleCloudDataplexV1EntityCompatibilityStatus", + "GoogleCloudDataplexV1EntryTypeAspectInfo": { + "id": "GoogleCloudDataplexV1EntryTypeAspectInfo", "properties": { - "bigquery": { - "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", - "description": "Output only. Whether this entity is compatible with BigQuery.", - "readOnly": true - }, - "hiveMetastore": { - "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", - "description": "Output only. Whether this entity is compatible with Hive Metastore.", - "readOnly": true + "type": { + "description": "Required aspect type for the entry type.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility": { - "description": "Provides compatibility information for a specific metadata store.", - "id": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", + "GoogleCloudDataplexV1EntryTypeAuthorization": { + "description": "Authorization for an Entry Type.", + "id": "GoogleCloudDataplexV1EntryTypeAuthorization", "properties": { - "compatible": { - "description": "Output only. Whether the entity is compatible and can be represented in the metadata store.", - "readOnly": true, - "type": "boolean" - }, - "reason": { - "description": "Output only. Provides additional detail if the entity is incompatible with the metadata store.", - "readOnly": true, + "alternateUsePermission": { + "description": "Immutable. The IAM permission grantable on the Entry Group to allow access to instantiate Entries of Dataplex owned Entry Types, only settable for Dataplex owned Types.", "type": "string" } }, @@ -7155,6 +8660,26 @@ }, "type": "object" }, + "GoogleCloudDataplexV1GenerateDataQualityRulesRequest": { + "description": "Generate recommended DataQualityRules request.", + "id": "GoogleCloudDataplexV1GenerateDataQualityRulesRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudDataplexV1GenerateDataQualityRulesResponse": { + "description": "Generate recommended DataQualityRules response.", + "id": "GoogleCloudDataplexV1GenerateDataQualityRulesResponse", + "properties": { + "rule": { + "description": "Generated recommended {@link DataQualityRule}s.", + "items": { + "$ref": "GoogleCloudDataplexV1DataQualityRule" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1GovernanceEvent": { "description": "Payload associated with Governance related log events.", "id": "GoogleCloudDataplexV1GovernanceEvent", @@ -7587,6 +9112,31 @@ }, "type": "object" }, + "GoogleCloudDataplexV1ListAspectTypesResponse": { + "description": "List AspectTypes response", + "id": "GoogleCloudDataplexV1ListAspectTypesResponse", + "properties": { + "aspectTypes": { + "description": "ListAspectTypes under the given parent location.", + "items": { + "$ref": "GoogleCloudDataplexV1AspectType" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachableLocations": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1ListAssetsResponse": { "description": "List assets response.", "id": "GoogleCloudDataplexV1ListAssetsResponse", @@ -7759,6 +9309,73 @@ }, "type": "object" }, + "GoogleCloudDataplexV1ListEntriesResponse": { + "id": "GoogleCloudDataplexV1ListEntriesResponse", + "properties": { + "entries": { + "description": "The list of entries.", + "items": { + "$ref": "GoogleCloudDataplexV1Entry" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Pagination token.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListEntryGroupsResponse": { + "description": "List ListEntryGroups response.", + "id": "GoogleCloudDataplexV1ListEntryGroupsResponse", + "properties": { + "entryGroups": { + "description": "ListEntryGroups under the given parent location.", + "items": { + "$ref": "GoogleCloudDataplexV1EntryGroup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachableLocations": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListEntryTypesResponse": { + "description": "List EntryTypes response", + "id": "GoogleCloudDataplexV1ListEntryTypesResponse", + "properties": { + "entryTypes": { + "description": "ListEntryTypes under the given parent location.", + "items": { + "$ref": "GoogleCloudDataplexV1EntryType" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachableLocations": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1ListEnvironmentsResponse": { "description": "List environments response.", "id": "GoogleCloudDataplexV1ListEnvironmentsResponse", @@ -8242,6 +9859,101 @@ }, "type": "object" }, + "GoogleCloudDataplexV1SearchEntriesResponse": { + "id": "GoogleCloudDataplexV1SearchEntriesResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token.", + "type": "string" + }, + "results": { + "description": "The results matching the search query.", + "items": { + "$ref": "GoogleCloudDataplexV1SearchEntriesResult" + }, + "type": "array" + }, + "totalSize": { + "description": "The estimated total number of matching entries. Not guaranteed to be accurate.", + "format": "int32", + "type": "integer" + }, + "unreachable": { + "description": "Unreachable locations. Search results don't include data from those locations.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1SearchEntriesResult": { + "description": "A single result of a SearchEntries request.", + "id": "GoogleCloudDataplexV1SearchEntriesResult", + "properties": { + "dataplexEntry": { + "$ref": "GoogleCloudDataplexV1Entry", + "description": "Entry format of the result." + }, + "description": { + "deprecated": true, + "description": "Entry description.", + "type": "string" + }, + "displayName": { + "deprecated": true, + "description": "Display name.", + "type": "string" + }, + "entry": { + "deprecated": true, + "description": "Resource name of the entry.", + "type": "string" + }, + "entryType": { + "deprecated": true, + "description": "The entry type.", + "type": "string" + }, + "fullyQualifiedName": { + "deprecated": true, + "description": "Fully qualified name.", + "type": "string" + }, + "linkedResource": { + "description": "Linked resource name.", + "type": "string" + }, + "modifyTime": { + "deprecated": true, + "description": "The last modification timestamp.", + "format": "google-datetime", + "type": "string" + }, + "relativeResource": { + "deprecated": true, + "description": "Relative resource name.", + "type": "string" + }, + "snippets": { + "$ref": "GoogleCloudDataplexV1SearchEntriesResultSnippets", + "description": "Snippets." + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1SearchEntriesResultSnippets": { + "description": "Snippets for the entry, contains HTML-style highlighting for matched tokens, will be used in UI.", + "id": "GoogleCloudDataplexV1SearchEntriesResultSnippets", + "properties": { + "dataplexEntry": { + "$ref": "GoogleCloudDataplexV1Entry", + "description": "Entry" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1Session": { "description": "Represents an active analyze session running for a user.", "id": "GoogleCloudDataplexV1Session", diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index 30f242ca003..6e0df0a14af 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -265,11 +265,23 @@ type ProjectsLocationsDataTaxonomiesAttributesService struct { func NewProjectsLocationsEntryGroupsService(s *Service) *ProjectsLocationsEntryGroupsService { rs := &ProjectsLocationsEntryGroupsService{s: s} + rs.Entries = NewProjectsLocationsEntryGroupsEntriesService(s) return rs } type ProjectsLocationsEntryGroupsService struct { s *Service + + Entries *ProjectsLocationsEntryGroupsEntriesService +} + +func NewProjectsLocationsEntryGroupsEntriesService(s *Service) *ProjectsLocationsEntryGroupsEntriesService { + rs := &ProjectsLocationsEntryGroupsEntriesService{s: s} + return rs +} + +type ProjectsLocationsEntryGroupsEntriesService struct { + s *Service } func NewProjectsLocationsEntryTypesService(s *Service) *ProjectsLocationsEntryTypesService { @@ -765,6 +777,406 @@ type GoogleCloudDataplexV1ActionMissingResource struct { type GoogleCloudDataplexV1ActionUnauthorizedResource struct { } +// GoogleCloudDataplexV1Aspect: An aspect is a single piece of metadata +// describing an entry. +type GoogleCloudDataplexV1Aspect struct { + AspectSource *GoogleCloudDataplexV1AspectSource `json:"aspectSource,omitempty"` + + // AspectType: Output only. The resource name of the type used to create + // this Aspect. + AspectType string `json:"aspectType,omitempty"` + + // CreateTime: Output only. The time when the Aspect was created. + CreateTime string `json:"createTime,omitempty"` + + // Data: Required. The content of the aspect, according to its aspect + // type schema. This will replace content. The maximum size of the field + // is 120KB (encoded as UTF-8). + Data googleapi.RawMessage `json:"data,omitempty"` + + // Path: Output only. The path in the entry under which the aspect is + // attached. + Path string `json:"path,omitempty"` + + // UpdateTime: Output only. The time when the Aspect was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AspectSource") 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. "AspectSource") 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 *GoogleCloudDataplexV1Aspect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Aspect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AspectSource: AspectSource contains source +// system related information for the aspect. +type GoogleCloudDataplexV1AspectSource struct { + // CreateTime: The create time of the aspect in the source system. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: The update time of the aspect in the source system. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AspectSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AspectSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AspectType: Aspect Type is a template for +// creating Aspects, and represents the JSON-schema for a given Entry, +// e.g., BigQuery Table Schema. +type GoogleCloudDataplexV1AspectType struct { + // Authorization: Immutable. Authorization defined for this type. + Authorization *GoogleCloudDataplexV1AspectTypeAuthorization `json:"authorization,omitempty"` + + // CreateTime: Output only. The time when the AspectType was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Description of the AspectType. + Description string `json:"description,omitempty"` + + // DisplayName: Optional. User friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // Etag: This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure + // the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // Labels: Optional. User-defined labels for the AspectType. + Labels map[string]string `json:"labels,omitempty"` + + // MetadataTemplate: Required. MetadataTemplate of the aspect. + MetadataTemplate *GoogleCloudDataplexV1AspectTypeMetadataTemplate `json:"metadataTemplate,omitempty"` + + // Name: Output only. The relative resource name of the AspectType, of + // the form: + // projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_ + // type_id}. + Name string `json:"name,omitempty"` + + // TransferStatus: Output only. Denotes the transfer status of the + // Aspect Type. It is unspecified for Aspect Types created from Dataplex + // API. + // + // Possible values: + // "TRANSFER_STATUS_UNSPECIFIED" - The default value. It is set for + // resources that were not subject for migration from Data Catalog + // service. + // "TRANSFER_STATUS_MIGRATED" - Indicates that a resource was migrated + // from Data Catalog service but it hasn't been transferred yet. In + // particular the resource cannot be updated from Dataplex API. + // "TRANSFER_STATUS_TRANSFERRED" - Indicates that a resource was + // transferred from Data Catalog service. The resource can only be + // updated from Dataplex API. + TransferStatus string `json:"transferStatus,omitempty"` + + // Uid: Output only. System generated globally unique ID for the + // AspectType. This ID will be different if the AspectType is deleted + // and re-created with the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the AspectType was last + // 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. "Authorization") 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. "Authorization") 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 *GoogleCloudDataplexV1AspectType) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AspectType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AspectTypeAuthorization: Autorization for an +// Aspect Type. +type GoogleCloudDataplexV1AspectTypeAuthorization struct { + // AlternateUsePermission: Immutable. The IAM permission grantable on + // the Entry Group to allow access to instantiate Aspects of Dataplex + // owned Aspect Types, only settable for Dataplex owned Types. + AlternateUsePermission string `json:"alternateUsePermission,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AlternateUsePermission") 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. "AlternateUsePermission") + // 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 *GoogleCloudDataplexV1AspectTypeAuthorization) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AspectTypeAuthorization + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AspectTypeMetadataTemplate: MetadataTemplate +// definition for AspectType +type GoogleCloudDataplexV1AspectTypeMetadataTemplate struct { + // Annotations: Optional. Specifies annotations on this field. + Annotations *GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations `json:"annotations,omitempty"` + + // ArrayItems: Optional. array_items needs to be set if the type is + // array. array_items can refer to a primitive field or a complex + // (record only) field. To specify a primitive field, just name and type + // needs to be set in the nested MetadataTemplate. The recommended value + // for the name field is item, as this is not used in the actual + // payload. + ArrayItems *GoogleCloudDataplexV1AspectTypeMetadataTemplate `json:"arrayItems,omitempty"` + + // Constraints: Optional. Specifies the constraints on this field. + Constraints *GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints `json:"constraints,omitempty"` + + // EnumValues: Optional. The list of values for an enum type. Needs to + // be defined if the type is enum. + EnumValues []*GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue `json:"enumValues,omitempty"` + + // Index: Optional. Index is used to encode Template messages. The value + // of index can range between 1 and 2,147,483,647. Index must be unique + // within all fields in a Template. (Nested Templates can reuse + // indexes). Once a Template is defined, the index cannot be changed, + // because it identifies the field in the actual storage format. Index + // is a mandatory field, but it is optional for top level fields, and + // map/array "values" definitions. + Index int64 `json:"index,omitempty"` + + // MapItems: Optional. map_items needs to be set if the type is map. + // map_items can refer to a primitive field or a complex (record only) + // field. To specify a primitive field, just name and type needs to be + // set in the nested MetadataTemplate. The recommended value for the + // name field is item, as this is not used in the actual payload. + MapItems *GoogleCloudDataplexV1AspectTypeMetadataTemplate `json:"mapItems,omitempty"` + + // Name: Required. The name of the field. + Name string `json:"name,omitempty"` + + // RecordFields: Optional. Field definition, needs to be specified if + // the type is record. Defines the nested fields. + RecordFields []*GoogleCloudDataplexV1AspectTypeMetadataTemplate `json:"recordFields,omitempty"` + + // Type: Required. The datatype of this field. The following values are + // supported: Primitive types (string, integer, boolean, double, + // datetime); datetime must be of the format RFC3339 UTC "Zulu" + // (Examples: "2014-10-02T15:01:23Z" and + // "2014-10-02T15:01:23.045123456Z"). Complex types (enum, array, map, + // record). + Type string `json:"type,omitempty"` + + // TypeId: Optional. Id can be used if this definition of the field + // needs to be reused later. Id needs to be unique across the entire + // template. Id can only be specified if the field type is record. + TypeId string `json:"typeId,omitempty"` + + // TypeRef: Optional. A reference to another field definition (instead + // of an inline definition). The value must be equal to the value of an + // id field defined elsewhere in the MetadataTemplate. Only fields with + // type as record can refer to other fields. + TypeRef string `json:"typeRef,omitempty"` + + // 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 *GoogleCloudDataplexV1AspectTypeMetadataTemplate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AspectTypeMetadataTemplate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations: +// Definition of the annotations of a field +type GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations struct { + // Deprecated -- Optional. Marks a field as deprecated, a deprecation + // message can be included. + Deprecated string `json:"deprecated,omitempty"` + + // Description: Optional. Specify a description for a field + Description string `json:"description,omitempty"` + + // DisplayName: Optional. Specify a displayname for a field. + DisplayName string `json:"displayName,omitempty"` + + // DisplayOrder: Optional. Specify a display order for a field. Display + // order can be used to reorder where a field is rendered + DisplayOrder int64 `json:"displayOrder,omitempty"` + + // StringType: Optional. String Type annotations can be used to specify + // special meaning to string fields. The following values are supported: + // richText: The field must be interpreted as a rich text field. url: A + // fully qualified url link. resource: A service qualified resource + // reference. + StringType string `json:"stringType,omitempty"` + + // StringValues: Optional. Suggested hints for string fields. These can + // be used to suggest values to users, through an UI for example. + StringValues []string `json:"stringValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Deprecated") 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. "Deprecated") 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 *GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints: +// Definition of the constraints of a field +type GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints struct { + // Required: Optional. Marks this as an optional/required field. + Required bool `json:"required,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Required") 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. "Required") 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 *GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue: Definition +// of Enumvalue (to be used by enum fields) +type GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue struct { + // Deprecated -- Optional. Optional deprecation message to be set if an + // enum value needs to be deprecated. + Deprecated string `json:"deprecated,omitempty"` + + // Index: Required. Index for the enum. Cannot be modified. + Index int64 `json:"index,omitempty"` + + // Name: Required. Name of the enumvalue. This is the actual value that + // the aspect will contain. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Deprecated") 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. "Deprecated") 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 *GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1Asset: An asset represents a cloud resource that // is being managed within a lake as a member of a zone. type GoogleCloudDataplexV1Asset struct { @@ -1646,29 +2058,95 @@ func (s *GoogleCloudDataplexV1DataAttributeBindingPath) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1DataProfileResult: DataProfileResult defines the -// output of DataProfileScan. Each field of the table will have field -// type specific profile result. -type GoogleCloudDataplexV1DataProfileResult struct { - // PostScanActionsResult: Output only. The result of post scan actions. - PostScanActionsResult *GoogleCloudDataplexV1DataProfileResultPostScanActionsResult `json:"postScanActionsResult,omitempty"` - - // Profile: The profile information per field. - Profile *GoogleCloudDataplexV1DataProfileResultProfile `json:"profile,omitempty"` - - // RowCount: The count of rows scanned. - RowCount int64 `json:"rowCount,omitempty,string"` - - // ScannedData: The data scanned for this result. - ScannedData *GoogleCloudDataplexV1ScannedData `json:"scannedData,omitempty"` +// GoogleCloudDataplexV1DataDocumentationResult: The output of a +// DataDocumentation scan. +type GoogleCloudDataplexV1DataDocumentationResult struct { + // Queries: Output only. The list of generated queries. + Queries []*GoogleCloudDataplexV1DataDocumentationResultQuery `json:"queries,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "PostScanActionsResult") 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. "Queries") 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. "Queries") 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 *GoogleCloudDataplexV1DataDocumentationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1DataDocumentationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1DataDocumentationResultQuery: A query in data +// documentation +type GoogleCloudDataplexV1DataDocumentationResultQuery struct { + // Description: Output only. The description for the query. + Description string `json:"description,omitempty"` + + // Sql: Output only. The SQL query string which can be executed. + Sql string `json:"sql,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 *GoogleCloudDataplexV1DataDocumentationResultQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1DataDocumentationResultQuery + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1DataDocumentationSpec: DataDocumentation scan +// related spec. +type GoogleCloudDataplexV1DataDocumentationSpec struct { +} + +// GoogleCloudDataplexV1DataProfileResult: DataProfileResult defines the +// output of DataProfileScan. Each field of the table will have field +// type specific profile result. +type GoogleCloudDataplexV1DataProfileResult struct { + // PostScanActionsResult: Output only. The result of post scan actions. + PostScanActionsResult *GoogleCloudDataplexV1DataProfileResultPostScanActionsResult `json:"postScanActionsResult,omitempty"` + + // Profile: The profile information per field. + Profile *GoogleCloudDataplexV1DataProfileResultProfile `json:"profile,omitempty"` + + // RowCount: The count of rows scanned. + RowCount int64 `json:"rowCount,omitempty,string"` + + // ScannedData: The data scanned for this result. + ScannedData *GoogleCloudDataplexV1ScannedData `json:"scannedData,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PostScanActionsResult") 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. "PostScanActionsResult") to @@ -3380,6 +3858,13 @@ type GoogleCloudDataplexV1DataScan struct { // Data: Required. The data source for DataScan. Data *GoogleCloudDataplexV1DataSource `json:"data,omitempty"` + // DataDocumentationResult: Output only. The result of the data + // documentation scan. + DataDocumentationResult *GoogleCloudDataplexV1DataDocumentationResult `json:"dataDocumentationResult,omitempty"` + + // DataDocumentationSpec: DataDocumentationScan related setting. + DataDocumentationSpec *GoogleCloudDataplexV1DataDocumentationSpec `json:"dataDocumentationSpec,omitempty"` + // DataProfileResult: Output only. The result of the data profile scan. DataProfileResult *GoogleCloudDataplexV1DataProfileResult `json:"dataProfileResult,omitempty"` @@ -3433,6 +3918,7 @@ type GoogleCloudDataplexV1DataScan struct { // "DATA_SCAN_TYPE_UNSPECIFIED" - The DataScan type is unspecified. // "DATA_QUALITY" - Data Quality scan. // "DATA_PROFILE" - Data Profile scan. + // "DATA_DOCUMENTATION" - Data Documentation scan. Type string `json:"type,omitempty"` // Uid: Output only. System generated globally unique ID for the scan. @@ -3913,6 +4399,14 @@ func (s *GoogleCloudDataplexV1DataScanExecutionStatus) MarshalJSON() ([]byte, er // GoogleCloudDataplexV1DataScanJob: A DataScanJob represents an // instance of DataScan execution. type GoogleCloudDataplexV1DataScanJob struct { + // DataDocumentationResult: Output only. The result of the data + // documentation scan. + DataDocumentationResult *GoogleCloudDataplexV1DataDocumentationResult `json:"dataDocumentationResult,omitempty"` + + // DataDocumentationSpec: Output only. DataDocumentationScan related + // setting. + DataDocumentationSpec *GoogleCloudDataplexV1DataDocumentationSpec `json:"dataDocumentationSpec,omitempty"` + // DataProfileResult: Output only. The result of the data profile scan. DataProfileResult *GoogleCloudDataplexV1DataProfileResult `json:"dataProfileResult,omitempty"` @@ -3960,6 +4454,7 @@ type GoogleCloudDataplexV1DataScanJob struct { // "DATA_SCAN_TYPE_UNSPECIFIED" - The DataScan type is unspecified. // "DATA_QUALITY" - Data Quality scan. // "DATA_PROFILE" - Data Profile scan. + // "DATA_DOCUMENTATION" - Data Documentation scan. Type string `json:"type,omitempty"` // Uid: Output only. System generated globally unique ID for the @@ -3970,18 +4465,19 @@ type GoogleCloudDataplexV1DataScanJob struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DataProfileResult") - // 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. + // "DataDocumentationResult") 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. "DataProfileResult") 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. "DataDocumentationResult") + // 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. @@ -4514,59 +5010,118 @@ func (s *GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility) MarshalJSO return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1Environment: Environment represents a -// user-visible compute infrastructure for analytics within a lake. -type GoogleCloudDataplexV1Environment struct { - // CreateTime: Output only. Environment creation time. +// GoogleCloudDataplexV1Entry: An entry is a representation of a data +// asset which can be described by various metadata. +type GoogleCloudDataplexV1Entry struct { + // Aspects: Optional. The Aspects attached to the Entry. The key is + // either the resource name of the aspect type (if the aspect is + // attached directly to the entry) or "aspectType@path" if the aspect is + // attached to an entry's path. + Aspects map[string]GoogleCloudDataplexV1Aspect `json:"aspects,omitempty"` + + // CreateTime: Output only. The time when the Entry was created. CreateTime string `json:"createTime,omitempty"` - // Description: Optional. Description of the environment. + // EntrySource: Optional. Source system related information for an + // entry. + EntrySource *GoogleCloudDataplexV1EntrySource `json:"entrySource,omitempty"` + + // EntryType: Required. Immutable. The resource name of the EntryType + // used to create this Entry. + EntryType string `json:"entryType,omitempty"` + + // FullyQualifiedName: Optional. A name for the entry that can reference + // it in an external system. The maximum size of the field is 4000 + // characters. + FullyQualifiedName string `json:"fullyQualifiedName,omitempty"` + + // Name: Identifier. The relative resource name of the Entry, of the + // form: + // projects/{project}/locations/{location}/entryGroups/{entry_group}/entr + // ies/{entry}. + Name string `json:"name,omitempty"` + + // ParentEntry: Optional. Immutable. The resource name of the parent + // entry. + ParentEntry string `json:"parentEntry,omitempty"` + + // UpdateTime: Output only. The time when the Entry was last 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. "Aspects") 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. "Aspects") 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 *GoogleCloudDataplexV1Entry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Entry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EntryGroup: An Entry Group represents a logical +// grouping of one or more Entries. +type GoogleCloudDataplexV1EntryGroup struct { + // CreateTime: Output only. The time when the EntryGroup was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Description of the EntryGroup. Description string `json:"description,omitempty"` // DisplayName: Optional. User friendly display name. DisplayName string `json:"displayName,omitempty"` - // Endpoints: Output only. URI Endpoints to access sessions associated - // with the Environment. - Endpoints *GoogleCloudDataplexV1EnvironmentEndpoints `json:"endpoints,omitempty"` - - // InfrastructureSpec: Required. Infrastructure specification for the - // Environment. - InfrastructureSpec *GoogleCloudDataplexV1EnvironmentInfrastructureSpec `json:"infrastructureSpec,omitempty"` + // Etag: This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure + // the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` - // Labels: Optional. User defined labels for the environment. + // Labels: Optional. User-defined labels for the EntryGroup. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. The relative resource name of the environment, of + // Name: Output only. The relative resource name of the EntryGroup, of // the form: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environm - // ent/{environment_id} + // projects/{project_number}/locations/{location_id}/entryGroups/{entry_g + // roup_id}. Name string `json:"name,omitempty"` - // SessionSpec: Optional. Configuration for sessions created for this - // environment. - SessionSpec *GoogleCloudDataplexV1EnvironmentSessionSpec `json:"sessionSpec,omitempty"` - - // SessionStatus: Output only. Status of sessions created for this - // environment. - SessionStatus *GoogleCloudDataplexV1EnvironmentSessionStatus `json:"sessionStatus,omitempty"` - - // State: Output only. Current state of the environment. + // TransferStatus: Output only. Denotes the transfer status of the Entry + // Group. It is unspecified for Entry Group created from Dataplex API. // // Possible values: - // "STATE_UNSPECIFIED" - State is not specified. - // "ACTIVE" - Resource is active, i.e., ready to use. - // "CREATING" - Resource is under creation. - // "DELETING" - Resource is under deletion. - // "ACTION_REQUIRED" - Resource is active but has unresolved actions. - State string `json:"state,omitempty"` + // "TRANSFER_STATUS_UNSPECIFIED" - The default value. It is set for + // resources that were not subject for migration from Data Catalog + // service. + // "TRANSFER_STATUS_MIGRATED" - Indicates that a resource was migrated + // from Data Catalog service but it hasn't been transferred yet. In + // particular the resource cannot be updated from Dataplex API. + // "TRANSFER_STATUS_TRANSFERRED" - Indicates that a resource was + // transferred from Data Catalog service. The resource can only be + // updated from Dataplex API. + TransferStatus string `json:"transferStatus,omitempty"` // Uid: Output only. System generated globally unique ID for the - // environment. This ID will be different if the environment is deleted + // EntryGroup. This ID will be different if the EntryGroup is deleted // and re-created with the same name. Uid string `json:"uid,omitempty"` - // UpdateTime: Output only. The time when the environment was last + // UpdateTime: Output only. The time when the EntryGroup was last // updated. UpdateTime string `json:"updateTime,omitempty"` @@ -4591,22 +5146,50 @@ type GoogleCloudDataplexV1Environment struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDataplexV1Environment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDataplexV1Environment +func (s *GoogleCloudDataplexV1EntryGroup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EntryGroup raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1EnvironmentEndpoints: URI Endpoints to access -// sessions associated with the Environment. -type GoogleCloudDataplexV1EnvironmentEndpoints struct { - // Notebooks: Output only. URI to serve notebook APIs - Notebooks string `json:"notebooks,omitempty"` +// GoogleCloudDataplexV1EntrySource: EntrySource contains source system +// related information for the entry. +type GoogleCloudDataplexV1EntrySource struct { + // Ancestors: Immutable. The ancestors of the Entry in the source + // system. + Ancestors []*GoogleCloudDataplexV1EntrySourceAncestor `json:"ancestors,omitempty"` - // Sql: Output only. URI to serve SQL APIs - Sql string `json:"sql,omitempty"` + // CreateTime: The create time of the resource in the source system. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Notebooks") to + // Description: Description of the Entry. The maximum size of the field + // is 2000 characters. + Description string `json:"description,omitempty"` + + // DisplayName: User friendly display name. The maximum size of the + // field is 500 characters. + DisplayName string `json:"displayName,omitempty"` + + // Labels: User-defined labels. The maximum size of keys and values is + // 128 characters each. + Labels map[string]string `json:"labels,omitempty"` + + // Platform: The platform containing the source system. The maximum size + // of the field is 64 characters. + Platform string `json:"platform,omitempty"` + + // Resource: The name of the resource in the source system. The maximum + // size of the field is 4000 characters. + Resource string `json:"resource,omitempty"` + + // System: The name of the source system. The maximum size of the field + // is 64 characters. + System string `json:"system,omitempty"` + + // UpdateTime: The update time of the resource in the source system. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ancestors") 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 @@ -4614,7 +5197,7 @@ type GoogleCloudDataplexV1EnvironmentEndpoints struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Notebooks") to include in + // NullFields is a list of field names (e.g. "Ancestors") 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 @@ -4623,24 +5206,22 @@ type GoogleCloudDataplexV1EnvironmentEndpoints struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDataplexV1EnvironmentEndpoints) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDataplexV1EnvironmentEndpoints +func (s *GoogleCloudDataplexV1EntrySource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EntrySource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1EnvironmentInfrastructureSpec: Configuration for -// the underlying infrastructure used to run workloads. -type GoogleCloudDataplexV1EnvironmentInfrastructureSpec struct { - // Compute: Optional. Compute resources needed for analyze interactive - // workloads. - Compute *GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources `json:"compute,omitempty"` +// GoogleCloudDataplexV1EntrySourceAncestor: Ancestor contains +// information about individual items in the hierarchy of an Entry. +type GoogleCloudDataplexV1EntrySourceAncestor struct { + // Name: Optional. The name of the ancestor resource. + Name string `json:"name,omitempty"` - // OsImage: Required. Software Runtime Configuration for analyze - // interactive workloads. - OsImage *GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime `json:"osImage,omitempty"` + // Type: Optional. The type of the ancestor resource. + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Compute") to + // 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 @@ -4648,8 +5229,8 @@ type GoogleCloudDataplexV1EnvironmentInfrastructureSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Compute") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. @@ -4657,27 +5238,70 @@ type GoogleCloudDataplexV1EnvironmentInfrastructureSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDataplexV1EnvironmentInfrastructureSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDataplexV1EnvironmentInfrastructureSpec +func (s *GoogleCloudDataplexV1EntrySourceAncestor) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EntrySourceAncestor raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources: -// Compute resources associated with the analyze interactive workloads. -type GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources struct { - // DiskSizeGb: Optional. Size in GB of the disk. Default is 100 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty"` +// GoogleCloudDataplexV1EntryType: Entry Type is a template for creating +// Entries. +type GoogleCloudDataplexV1EntryType struct { + // Authorization: Immutable. Authorization defined for this type. + Authorization *GoogleCloudDataplexV1EntryTypeAuthorization `json:"authorization,omitempty"` - // MaxNodeCount: Optional. Max configurable nodes. If max_node_count > - // node_count, then auto-scaling is enabled. - MaxNodeCount int64 `json:"maxNodeCount,omitempty"` + // CreateTime: Output only. The time when the EntryType was created. + CreateTime string `json:"createTime,omitempty"` - // NodeCount: Optional. Total number of nodes in the sessions created - // for this environment. - NodeCount int64 `json:"nodeCount,omitempty"` + // Description: Optional. Description of the EntryType. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to + // DisplayName: Optional. User friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Optional. This checksum is computed by the server based on the + // value of other fields, and may be sent on update and delete requests + // to ensure the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // Labels: Optional. User-defined labels for the EntryType. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The relative resource name of the EntryType, of + // the form: + // projects/{project_number}/locations/{location_id}/entryTypes/{entry_ty + // pe_id}. + Name string `json:"name,omitempty"` + + // Platform: Optional. The platform that Entries of this type belongs + // to. + Platform string `json:"platform,omitempty"` + + // RequiredAspects: AspectInfo for the entry type. + RequiredAspects []*GoogleCloudDataplexV1EntryTypeAspectInfo `json:"requiredAspects,omitempty"` + + // System: Optional. The system that Entries of this type belongs to. + // Examples include CloudSQL, MariaDB etc + System string `json:"system,omitempty"` + + // TypeAliases: Optional. Indicates the class this Entry Type belongs + // to, for example, TABLE, DATABASE, MODEL. + TypeAliases []string `json:"typeAliases,omitempty"` + + // Uid: Output only. System generated globally unique ID for the + // EntryType. This ID will be different if the EntryType is deleted and + // re-created with the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the EntryType was last + // 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. "Authorization") 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 @@ -4685,29 +5309,275 @@ type GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskSizeGb") 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 + // NullFields is a list of field names (e.g. "Authorization") 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 *GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources +func (s *GoogleCloudDataplexV1EntryType) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EntryType raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime: -// Software Runtime Configuration to run Analyze. -type GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime struct { - // ImageVersion: Required. Dataplex Image version. - ImageVersion string `json:"imageVersion,omitempty"` +type GoogleCloudDataplexV1EntryTypeAspectInfo struct { + // Type: Required aspect type for the entry type. + Type string `json:"type,omitempty"` - // JavaLibraries: Optional. List of Java jars to be included in the - // runtime environment. Valid input includes Cloud Storage URIs to Jar + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EntryTypeAspectInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EntryTypeAspectInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EntryTypeAuthorization: Authorization for an +// Entry Type. +type GoogleCloudDataplexV1EntryTypeAuthorization struct { + // AlternateUsePermission: Immutable. The IAM permission grantable on + // the Entry Group to allow access to instantiate Entries of Dataplex + // owned Entry Types, only settable for Dataplex owned Types. + AlternateUsePermission string `json:"alternateUsePermission,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AlternateUsePermission") 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. "AlternateUsePermission") + // 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 *GoogleCloudDataplexV1EntryTypeAuthorization) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EntryTypeAuthorization + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Environment: Environment represents a +// user-visible compute infrastructure for analytics within a lake. +type GoogleCloudDataplexV1Environment struct { + // CreateTime: Output only. Environment creation time. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Description of the environment. + Description string `json:"description,omitempty"` + + // DisplayName: Optional. User friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // Endpoints: Output only. URI Endpoints to access sessions associated + // with the Environment. + Endpoints *GoogleCloudDataplexV1EnvironmentEndpoints `json:"endpoints,omitempty"` + + // InfrastructureSpec: Required. Infrastructure specification for the + // Environment. + InfrastructureSpec *GoogleCloudDataplexV1EnvironmentInfrastructureSpec `json:"infrastructureSpec,omitempty"` + + // Labels: Optional. User defined labels for the environment. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The relative resource name of the environment, of + // the form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environm + // ent/{environment_id} + Name string `json:"name,omitempty"` + + // SessionSpec: Optional. Configuration for sessions created for this + // environment. + SessionSpec *GoogleCloudDataplexV1EnvironmentSessionSpec `json:"sessionSpec,omitempty"` + + // SessionStatus: Output only. Status of sessions created for this + // environment. + SessionStatus *GoogleCloudDataplexV1EnvironmentSessionStatus `json:"sessionStatus,omitempty"` + + // State: Output only. Current state of the environment. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not specified. + // "ACTIVE" - Resource is active, i.e., ready to use. + // "CREATING" - Resource is under creation. + // "DELETING" - Resource is under deletion. + // "ACTION_REQUIRED" - Resource is active but has unresolved actions. + State string `json:"state,omitempty"` + + // Uid: Output only. System generated globally unique ID for the + // environment. This ID will be different if the environment is deleted + // and re-created with the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the environment was last + // 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. "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 *GoogleCloudDataplexV1Environment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Environment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EnvironmentEndpoints: URI Endpoints to access +// sessions associated with the Environment. +type GoogleCloudDataplexV1EnvironmentEndpoints struct { + // Notebooks: Output only. URI to serve notebook APIs + Notebooks string `json:"notebooks,omitempty"` + + // Sql: Output only. URI to serve SQL APIs + Sql string `json:"sql,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Notebooks") 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. "Notebooks") 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 *GoogleCloudDataplexV1EnvironmentEndpoints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentEndpoints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EnvironmentInfrastructureSpec: Configuration for +// the underlying infrastructure used to run workloads. +type GoogleCloudDataplexV1EnvironmentInfrastructureSpec struct { + // Compute: Optional. Compute resources needed for analyze interactive + // workloads. + Compute *GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources `json:"compute,omitempty"` + + // OsImage: Required. Software Runtime Configuration for analyze + // interactive workloads. + OsImage *GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime `json:"osImage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compute") 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. "Compute") 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 *GoogleCloudDataplexV1EnvironmentInfrastructureSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentInfrastructureSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources: +// Compute resources associated with the analyze interactive workloads. +type GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources struct { + // DiskSizeGb: Optional. Size in GB of the disk. Default is 100 GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty"` + + // MaxNodeCount: Optional. Max configurable nodes. If max_node_count > + // node_count, then auto-scaling is enabled. + MaxNodeCount int64 `json:"maxNodeCount,omitempty"` + + // NodeCount: Optional. Total number of nodes in the sessions created + // for this environment. + NodeCount int64 `json:"nodeCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskSizeGb") 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. "DiskSizeGb") 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 *GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime: +// Software Runtime Configuration to run Analyze. +type GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime struct { + // ImageVersion: Required. Dataplex Image version. + ImageVersion string `json:"imageVersion,omitempty"` + + // JavaLibraries: Optional. List of Java jars to be included in the + // runtime environment. Valid input includes Cloud Storage URIs to Jar // binaries. For example, gs://bucket-name/my/path/to/file.jar JavaLibraries []string `json:"javaLibraries,omitempty"` @@ -4814,28 +5684,66 @@ func (s *GoogleCloudDataplexV1EnvironmentSessionStatus) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1GovernanceEvent: Payload associated with -// Governance related log events. -type GoogleCloudDataplexV1GovernanceEvent struct { - // Entity: Entity resource information if the log event is associated - // with a specific entity. - Entity *GoogleCloudDataplexV1GovernanceEventEntity `json:"entity,omitempty"` +// GoogleCloudDataplexV1GenerateDataQualityRulesRequest: Generate +// recommended DataQualityRules request. +type GoogleCloudDataplexV1GenerateDataQualityRulesRequest struct { +} - // EventType: The type of the event. - // - // Possible values: - // "EVENT_TYPE_UNSPECIFIED" - An unspecified event type. - // "RESOURCE_IAM_POLICY_UPDATE" - Resource IAM policy update event. - // "BIGQUERY_TABLE_CREATE" - BigQuery table create event. - // "BIGQUERY_TABLE_UPDATE" - BigQuery table update event. - // "BIGQUERY_TABLE_DELETE" - BigQuery table delete event. - // "BIGQUERY_CONNECTION_CREATE" - BigQuery connection create event. - // "BIGQUERY_CONNECTION_UPDATE" - BigQuery connection update event. - // "BIGQUERY_CONNECTION_DELETE" - BigQuery connection delete event. - // "BIGQUERY_TAXONOMY_CREATE" - BigQuery taxonomy created. - // "BIGQUERY_POLICY_TAG_CREATE" - BigQuery policy tag created. - // "BIGQUERY_POLICY_TAG_DELETE" - BigQuery policy tag deleted. - // "BIGQUERY_POLICY_TAG_SET_IAM_POLICY" - BigQuery set iam policy for +// GoogleCloudDataplexV1GenerateDataQualityRulesResponse: Generate +// recommended DataQualityRules response. +type GoogleCloudDataplexV1GenerateDataQualityRulesResponse struct { + // Rule: Generated recommended {@link DataQualityRule}s. + Rule []*GoogleCloudDataplexV1DataQualityRule `json:"rule,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Rule") 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. "Rule") 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 *GoogleCloudDataplexV1GenerateDataQualityRulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1GenerateDataQualityRulesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1GovernanceEvent: Payload associated with +// Governance related log events. +type GoogleCloudDataplexV1GovernanceEvent struct { + // Entity: Entity resource information if the log event is associated + // with a specific entity. + Entity *GoogleCloudDataplexV1GovernanceEventEntity `json:"entity,omitempty"` + + // EventType: The type of the event. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - An unspecified event type. + // "RESOURCE_IAM_POLICY_UPDATE" - Resource IAM policy update event. + // "BIGQUERY_TABLE_CREATE" - BigQuery table create event. + // "BIGQUERY_TABLE_UPDATE" - BigQuery table update event. + // "BIGQUERY_TABLE_DELETE" - BigQuery table delete event. + // "BIGQUERY_CONNECTION_CREATE" - BigQuery connection create event. + // "BIGQUERY_CONNECTION_UPDATE" - BigQuery connection update event. + // "BIGQUERY_CONNECTION_DELETE" - BigQuery connection delete event. + // "BIGQUERY_TAXONOMY_CREATE" - BigQuery taxonomy created. + // "BIGQUERY_POLICY_TAG_CREATE" - BigQuery policy tag created. + // "BIGQUERY_POLICY_TAG_DELETE" - BigQuery policy tag deleted. + // "BIGQUERY_POLICY_TAG_SET_IAM_POLICY" - BigQuery set iam policy for // policy tag. // "ACCESS_POLICY_UPDATE" - Access policy update event. // "GOVERNANCE_RULE_MATCHED_RESOURCES" - Number of resources matched @@ -5286,6 +6194,46 @@ func (s *GoogleCloudDataplexV1ListActionsResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDataplexV1ListAspectTypesResponse: List AspectTypes +// response +type GoogleCloudDataplexV1ListAspectTypesResponse struct { + // AspectTypes: ListAspectTypes under the given parent location. + AspectTypes []*GoogleCloudDataplexV1AspectType `json:"aspectTypes,omitempty"` + + // 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"` + + // UnreachableLocations: Locations that could not be reached. + UnreachableLocations []string `json:"unreachableLocations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AspectTypes") 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. "AspectTypes") 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 *GoogleCloudDataplexV1ListAspectTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListAspectTypesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1ListAssetsResponse: List assets response. type GoogleCloudDataplexV1ListAssetsResponse struct { // Assets: Asset under the given parent zone. @@ -5597,6 +6545,119 @@ func (s *GoogleCloudDataplexV1ListEntitiesResponse) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GoogleCloudDataplexV1ListEntriesResponse struct { + // Entries: The list of entries. + Entries []*GoogleCloudDataplexV1Entry `json:"entries,omitempty"` + + // NextPageToken: Pagination 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. "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 *GoogleCloudDataplexV1ListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListEntriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListEntryGroupsResponse: List ListEntryGroups +// response. +type GoogleCloudDataplexV1ListEntryGroupsResponse struct { + // EntryGroups: ListEntryGroups under the given parent location. + EntryGroups []*GoogleCloudDataplexV1EntryGroup `json:"entryGroups,omitempty"` + + // 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"` + + // UnreachableLocations: Locations that could not be reached. + UnreachableLocations []string `json:"unreachableLocations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EntryGroups") 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. "EntryGroups") 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 *GoogleCloudDataplexV1ListEntryGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListEntryGroupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListEntryTypesResponse: List EntryTypes response +type GoogleCloudDataplexV1ListEntryTypesResponse struct { + // EntryTypes: ListEntryTypes under the given parent location. + EntryTypes []*GoogleCloudDataplexV1EntryType `json:"entryTypes,omitempty"` + + // 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"` + + // UnreachableLocations: Locations that could not be reached. + UnreachableLocations []string `json:"unreachableLocations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EntryTypes") 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. "EntryTypes") 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 *GoogleCloudDataplexV1ListEntryTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListEntryTypesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1ListEnvironmentsResponse: List environments // response. type GoogleCloudDataplexV1ListEnvironmentsResponse struct { @@ -6363,6 +7424,134 @@ func (s *GoogleCloudDataplexV1SchemaSchemaField) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GoogleCloudDataplexV1SearchEntriesResponse struct { + // NextPageToken: Pagination token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Results: The results matching the search query. + Results []*GoogleCloudDataplexV1SearchEntriesResult `json:"results,omitempty"` + + // TotalSize: The estimated total number of matching entries. Not + // guaranteed to be accurate. + TotalSize int64 `json:"totalSize,omitempty"` + + // Unreachable: Unreachable locations. Search results don't include data + // from those locations. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *GoogleCloudDataplexV1SearchEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1SearchEntriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1SearchEntriesResult: A single result of a +// SearchEntries request. +type GoogleCloudDataplexV1SearchEntriesResult struct { + // DataplexEntry: Entry format of the result. + DataplexEntry *GoogleCloudDataplexV1Entry `json:"dataplexEntry,omitempty"` + + // Description: Entry description. + Description string `json:"description,omitempty"` + + // DisplayName: Display name. + DisplayName string `json:"displayName,omitempty"` + + // Entry: Resource name of the entry. + Entry string `json:"entry,omitempty"` + + // EntryType: The entry type. + EntryType string `json:"entryType,omitempty"` + + // FullyQualifiedName: Fully qualified name. + FullyQualifiedName string `json:"fullyQualifiedName,omitempty"` + + // LinkedResource: Linked resource name. + LinkedResource string `json:"linkedResource,omitempty"` + + // ModifyTime: The last modification timestamp. + ModifyTime string `json:"modifyTime,omitempty"` + + // RelativeResource: Relative resource name. + RelativeResource string `json:"relativeResource,omitempty"` + + // Snippets: Snippets. + Snippets *GoogleCloudDataplexV1SearchEntriesResultSnippets `json:"snippets,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataplexEntry") 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. "DataplexEntry") 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 *GoogleCloudDataplexV1SearchEntriesResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1SearchEntriesResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1SearchEntriesResultSnippets: Snippets for the +// entry, contains HTML-style highlighting for matched tokens, will be +// used in UI. +type GoogleCloudDataplexV1SearchEntriesResultSnippets struct { + // DataplexEntry: Entry + DataplexEntry *GoogleCloudDataplexV1Entry `json:"dataplexEntry,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataplexEntry") 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. "DataplexEntry") 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 *GoogleCloudDataplexV1SearchEntriesResultSnippets) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1SearchEntriesResultSnippets + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1Session: Represents an active analyze session // running for a user. type GoogleCloudDataplexV1Session struct { @@ -8293,36 +9482,4366 @@ type GoogleTypeExpr struct { NullFields []string `json:"-"` } -func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "dataplex.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 "dataplex.projects.locations.get" call. +// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.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) (*GoogleCloudLocationLocation, 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 := &GoogleCloudLocationLocation{ + 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": "dataplex.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": "GoogleCloudLocationLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.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 "dataplex.projects.locations.list" call. +// Exactly one of *GoogleCloudLocationListLocationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudLocationListLocationsResponse.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) (*GoogleCloudLocationListLocationsResponse, 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 := &GoogleCloudLocationListLocationsResponse{ + 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": "dataplex.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": "GoogleCloudLocationListLocationsResponse" + // }, + // "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(*GoogleCloudLocationListLocationsResponse) 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 "dataplex.projects.locations.lookupEntry": + +type ProjectsLocationsLookupEntryCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// LookupEntry: Looks up a single entry. +// +// - name: The project to which the request should be attributed in the +// following form: projects/{project}/locations/{location}. +func (r *ProjectsLocationsService) LookupEntry(name string) *ProjectsLocationsLookupEntryCall { + c := &ProjectsLocationsLookupEntryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AspectTypes sets the optional parameter "aspectTypes": Limits the +// aspects returned to the provided aspect types. Only works if the +// CUSTOM view is selected. +func (c *ProjectsLocationsLookupEntryCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) + return c +} + +// Entry sets the optional parameter "entry": Required. The resource +// name of the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/entr +// ies/{entry}. +func (c *ProjectsLocationsLookupEntryCall) Entry(entry string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.Set("entry", entry) + return c +} + +// Paths sets the optional parameter "paths": Limits the aspects +// returned to those associated with the provided paths within the +// Entry. Only works if the CUSTOM view is selected. +func (c *ProjectsLocationsLookupEntryCall) Paths(paths ...string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// View sets the optional parameter "view": View for controlling which +// parts of an entry are to be returned. +// +// Possible values: +// +// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. +// "BASIC" - Returns entry only, without aspects. +// "FULL" - Returns all required aspects as well as the keys of all +// +// non-required aspects. +// +// "CUSTOM" - Returns aspects matching custom fields in +// +// GetEntryRequest. If the number of aspects would exceed 100, the first +// 100 will be returned. +// +// "ALL" - Returns all aspects. If the number of aspects would exceed +// +// 100, the first 100 will be returned. +func (c *ProjectsLocationsLookupEntryCall) View(view string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupEntryCall { + 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 *ProjectsLocationsLookupEntryCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupEntryCall { + 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 *ProjectsLocationsLookupEntryCall) Context(ctx context.Context) *ProjectsLocationsLookupEntryCall { + 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 *ProjectsLocationsLookupEntryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLookupEntryCall) 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}:lookupEntry") + 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 "dataplex.projects.locations.lookupEntry" call. +// Exactly one of *GoogleCloudDataplexV1Entry or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, 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 := &GoogleCloudDataplexV1Entry{ + 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": "Looks up a single entry.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:lookupEntry", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lookupEntry", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "aspectTypes": { + // "description": "Optional. Limits the aspects returned to the provided aspect types. Only works if the CUSTOM view is selected.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "entry": { + // "description": "Required. The resource name of the Entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The project to which the request should be attributed in the following form: projects/{project}/locations/{location}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "paths": { + // "description": "Optional. Limits the aspects returned to those associated with the provided paths within the Entry. Only works if the CUSTOM view is selected.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. View for controlling which parts of an entry are to be returned.", + // "enum": [ + // "ENTRY_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL", + // "CUSTOM", + // "ALL" + // ], + // "enumDescriptions": [ + // "Unspecified EntryView. Defaults to FULL.", + // "Returns entry only, without aspects.", + // "Returns all required aspects as well as the keys of all non-required aspects.", + // "Returns aspects matching custom fields in GetEntryRequest. If the number of aspects would exceed 100, the first 100 will be returned.", + // "Returns all aspects. If the number of aspects would exceed 100, the first 100 will be returned." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}:lookupEntry", + // "response": { + // "$ref": "GoogleCloudDataplexV1Entry" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.searchEntries": + +type ProjectsLocationsSearchEntriesCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchEntries: Searches for entries matching given query and scope. +// +// - name: The project to which the request should be attributed in the +// following form: projects/{project}/locations/{location}. +func (r *ProjectsLocationsService) SearchEntries(name string) *ProjectsLocationsSearchEntriesCall { + c := &ProjectsLocationsSearchEntriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// OrderBy sets the optional parameter "orderBy": Ordering of the +// results. Supported options to be added later. +func (c *ProjectsLocationsSearchEntriesCall) OrderBy(orderBy string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Pagination. +func (c *ProjectsLocationsSearchEntriesCall) PageSize(pageSize int64) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": +func (c *ProjectsLocationsSearchEntriesCall) PageToken(pageToken string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": Required. The query +// against which entries in scope should be matched. +func (c *ProjectsLocationsSearchEntriesCall) Query(query string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("query", query) + return c +} + +// Scope sets the optional parameter "scope": The scope under which the +// search should be operating. Should either be organizations/ or +// projects/. If left unspecified, it will default to the organization +// where the project provided in name is located. +func (c *ProjectsLocationsSearchEntriesCall) Scope(scope string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("scope", scope) + 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 *ProjectsLocationsSearchEntriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchEntriesCall { + 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 *ProjectsLocationsSearchEntriesCall) Context(ctx context.Context) *ProjectsLocationsSearchEntriesCall { + 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 *ProjectsLocationsSearchEntriesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSearchEntriesCall) 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}:searchEntries") + 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 "dataplex.projects.locations.searchEntries" call. +// Exactly one of *GoogleCloudDataplexV1SearchEntriesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1SearchEntriesResponse.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 *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1SearchEntriesResponse, 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 := &GoogleCloudDataplexV1SearchEntriesResponse{ + 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": "Searches for entries matching given query and scope.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:searchEntries", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.searchEntries", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The project to which the request should be attributed in the following form: projects/{project}/locations/{location}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Ordering of the results. Supported options to be added later.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Pagination.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "location": "query", + // "type": "string" + // }, + // "query": { + // "description": "Required. The query against which entries in scope should be matched.", + // "location": "query", + // "type": "string" + // }, + // "scope": { + // "description": "Optional. The scope under which the search should be operating. Should either be organizations/ or projects/. If left unspecified, it will default to the organization where the project provided in name is located.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}:searchEntries", + // "response": { + // "$ref": "GoogleCloudDataplexV1SearchEntriesResponse" + // }, + // "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 *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1SearchEntriesResponse) 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 "dataplex.projects.locations.aspectTypes.create": + +type ProjectsLocationsAspectTypesCreateCall struct { + s *Service + parent string + googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an AspectType +// +// - parent: The resource name of the AspectType, of the form: +// projects/{project_number}/locations/{location_id} where location_id +// refers to a GCP region. +func (r *ProjectsLocationsAspectTypesService) Create(parent string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesCreateCall { + c := &ProjectsLocationsAspectTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype + return c +} + +// AspectTypeId sets the optional parameter "aspectTypeId": Required. +// AspectType identifier. +func (c *ProjectsLocationsAspectTypesCreateCall) AspectTypeId(aspectTypeId string) *ProjectsLocationsAspectTypesCreateCall { + c.urlParams_.Set("aspectTypeId", aspectTypeId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsAspectTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesCreateCall { + 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 *ProjectsLocationsAspectTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesCreateCall { + 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 *ProjectsLocationsAspectTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesCreateCall { + 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 *ProjectsLocationsAspectTypesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesCreateCall) 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.googleclouddataplexv1aspecttype) + 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}/aspectTypes") + 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 "dataplex.projects.locations.aspectTypes.create" 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 *ProjectsLocationsAspectTypesCreateCall) 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": "Creates an AspectType", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.aspectTypes.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "aspectTypeId": { + // "description": "Required. AspectType identifier.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the AspectType, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/aspectTypes", + // "request": { + // "$ref": "GoogleCloudDataplexV1AspectType" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.aspectTypes.delete": + +type ProjectsLocationsAspectTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a AspectType resource. +// +// - name: The resource name of the AspectType: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspec +// t_type_id}. +func (r *ProjectsLocationsAspectTypesService) Delete(name string) *ProjectsLocationsAspectTypesDeleteCall { + c := &ProjectsLocationsAspectTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If the client provided etag +// value does not match the current etag value, the +// DeleteAspectTypeRequest method returns an ABORTED error response +func (c *ProjectsLocationsAspectTypesDeleteCall) Etag(etag string) *ProjectsLocationsAspectTypesDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *ProjectsLocationsAspectTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesDeleteCall { + 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 *ProjectsLocationsAspectTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesDeleteCall { + 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 *ProjectsLocationsAspectTypesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesDeleteCall) 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 "dataplex.projects.locations.aspectTypes.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 *ProjectsLocationsAspectTypesDeleteCall) 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 AspectType resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.aspectTypes.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. If the client provided etag value does not match the current etag value, the DeleteAspectTypeRequest method returns an ABORTED error response", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the AspectType: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.aspectTypes.get": + +type ProjectsLocationsAspectTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a AspectType resource. +// +// - name: The resource name of the AspectType: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspec +// t_type_id}. +func (r *ProjectsLocationsAspectTypesService) Get(name string) *ProjectsLocationsAspectTypesGetCall { + c := &ProjectsLocationsAspectTypesGetCall{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 *ProjectsLocationsAspectTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetCall { + 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 *ProjectsLocationsAspectTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetCall { + 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 *ProjectsLocationsAspectTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetCall { + 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 *ProjectsLocationsAspectTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesGetCall) 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 "dataplex.projects.locations.aspectTypes.get" call. +// Exactly one of *GoogleCloudDataplexV1AspectType or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1AspectType.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 *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1AspectType, 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 := &GoogleCloudDataplexV1AspectType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a AspectType resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.aspectTypes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the AspectType: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1AspectType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.aspectTypes.getIamPolicy": + +type ProjectsLocationsAspectTypesGetIamPolicyCall 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 *ProjectsLocationsAspectTypesService) GetIamPolicy(resource string) *ProjectsLocationsAspectTypesGetIamPolicyCall { + c := &ProjectsLocationsAspectTypesGetIamPolicyCall{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 *ProjectsLocationsAspectTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAspectTypesGetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) 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/{+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 "dataplex.projects.locations.aspectTypes.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 *ProjectsLocationsAspectTypesGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.aspectTypes.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/[^/]+/aspectTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.aspectTypes.list": + +type ProjectsLocationsAspectTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists AspectType resources in a project and location. +// +// - parent: The resource name of the AspectType location, of the form: +// projects/{project_number}/locations/{location_id} where location_id +// refers to a GCP region. +func (r *ProjectsLocationsAspectTypesService) List(parent string) *ProjectsLocationsAspectTypesListCall { + c := &ProjectsLocationsAspectTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. Filters +// are case-sensitive. The following formats are supported:labels.key1 = +// "value1" labels:key1 name = "value" These restrictions can be +// coinjoined with AND, OR and NOT conjunctions. +func (c *ProjectsLocationsAspectTypesListCall) Filter(filter string) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields (name +// or create_time) for the result. If not specified, the ordering is +// undefined. +func (c *ProjectsLocationsAspectTypesListCall) OrderBy(orderBy string) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// AspectTypes to return. The service may return fewer than this value. +// If unspecified, at most 10 AspectTypes will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsAspectTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListAspectTypes call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to ListAspectTypes must match the call that provided the +// page token. +func (c *ProjectsLocationsAspectTypesListCall) PageToken(pageToken string) *ProjectsLocationsAspectTypesListCall { + 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 *ProjectsLocationsAspectTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesListCall { + 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 *ProjectsLocationsAspectTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesListCall { + 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 *ProjectsLocationsAspectTypesListCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesListCall { + 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 *ProjectsLocationsAspectTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesListCall) 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}/aspectTypes") + 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 "dataplex.projects.locations.aspectTypes.list" call. +// Exactly one of *GoogleCloudDataplexV1ListAspectTypesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1ListAspectTypesResponse.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 *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListAspectTypesResponse, 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 := &GoogleCloudDataplexV1ListAspectTypesResponse{ + 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 AspectType resources in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.aspectTypes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter request. Filters are case-sensitive. The following formats are supported:labels.key1 = \"value1\" labels:key1 name = \"value\" These restrictions can be coinjoined with AND, OR and NOT conjunctions.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields (name or create_time) for the result. If not specified, the ordering is undefined.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of AspectTypes to return. The service may return fewer than this value. If unspecified, at most 10 AspectTypes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListAspectTypes call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAspectTypes must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the AspectType location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/aspectTypes", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListAspectTypesResponse" + // }, + // "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 *ProjectsLocationsAspectTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListAspectTypesResponse) 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 "dataplex.projects.locations.aspectTypes.patch": + +type ProjectsLocationsAspectTypesPatchCall struct { + s *Service + name string + googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a AspectType resource. +// +// - name: Output only. The relative resource name of the AspectType, of +// the form: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspec +// t_type_id}. +func (r *ProjectsLocationsAspectTypesService) Patch(name string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesPatchCall { + c := &ProjectsLocationsAspectTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. +func (c *ProjectsLocationsAspectTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAspectTypesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsAspectTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesPatchCall { + 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 *ProjectsLocationsAspectTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesPatchCall { + 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 *ProjectsLocationsAspectTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesPatchCall { + 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 *ProjectsLocationsAspectTypesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesPatchCall) 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.googleclouddataplexv1aspecttype) + 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 "dataplex.projects.locations.aspectTypes.patch" 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 *ProjectsLocationsAspectTypesPatchCall) 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": "Updates a AspectType resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.aspectTypes.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the AspectType, of the form: projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1AspectType" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.aspectTypes.setIamPolicy": + +type ProjectsLocationsAspectTypesSetIamPolicyCall 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 *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAspectTypesSetIamPolicyCall { + c := &ProjectsLocationsAspectTypesSetIamPolicyCall{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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesSetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesSetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) 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, "v1/{+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 "dataplex.projects.locations.aspectTypes.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 *ProjectsLocationsAspectTypesSetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.aspectTypes.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/[^/]+/aspectTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.aspectTypes.testIamPermissions": + +type ProjectsLocationsAspectTypesTestIamPermissionsCall 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 *ProjectsLocationsAspectTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + c := &ProjectsLocationsAspectTypesTestIamPermissionsCall{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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) 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, "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 "dataplex.projects.locations.aspectTypes.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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/aspectTypes/{aspectTypesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.aspectTypes.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/[^/]+/aspectTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataAttributeBindings.create": + +type ProjectsLocationsDataAttributeBindingsCreateCall struct { + s *Service + parent string + googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a DataAttributeBinding resource. +// +// - parent: The resource name of the parent data taxonomy +// projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Create(parent string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsCreateCall { + c := &ProjectsLocationsDataAttributeBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding + return c +} + +// DataAttributeBindingId sets the optional parameter +// "dataAttributeBindingId": Required. DataAttributeBinding identifier. +// * Must contain only lowercase letters, numbers and hyphens. * Must +// start with a letter. * Must be between 1-63 characters. * Must end +// with a number or a letter. * Must be unique within the Location. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) DataAttributeBindingId(dataAttributeBindingId string) *ProjectsLocationsDataAttributeBindingsCreateCall { + c.urlParams_.Set("dataAttributeBindingId", dataAttributeBindingId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsCreateCall { + 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsCreateCall { + 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsCreateCall { + 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) 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.googleclouddataplexv1dataattributebinding) + 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}/dataAttributeBindings") + 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 "dataplex.projects.locations.dataAttributeBindings.create" 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 *ProjectsLocationsDataAttributeBindingsCreateCall) 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": "Create a DataAttributeBinding resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataAttributeBindings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "dataAttributeBindingId": { + // "description": "Required. DataAttributeBinding identifier. * Must contain only lowercase letters, numbers and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the Location.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent data taxonomy projects/{project_number}/locations/{location_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/dataAttributeBindings", + // "request": { + // "$ref": "GoogleCloudDataplexV1DataAttributeBinding" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataAttributeBindings.delete": + +type ProjectsLocationsDataAttributeBindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataAttributeBinding resource. All attributes +// within the DataAttributeBinding must be deleted before the +// DataAttributeBinding can be deleted. +// +// - name: The resource name of the DataAttributeBinding: +// projects/{project_number}/locations/{location_id}/dataAttributeBindi +// ngs/{data_attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Delete(name string) *ProjectsLocationsDataAttributeBindingsDeleteCall { + c := &ProjectsLocationsDataAttributeBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": Required. If the client +// provided etag value does not match the current etag value, the +// DeleteDataAttributeBindingRequest method returns an ABORTED error +// response. Etags must be used when calling the +// DeleteDataAttributeBinding. +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Etag(etag string) *ProjectsLocationsDataAttributeBindingsDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsDeleteCall { + 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsDeleteCall { + 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) 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 "dataplex.projects.locations.dataAttributeBindings.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 *ProjectsLocationsDataAttributeBindingsDeleteCall) 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 DataAttributeBinding resource. All attributes within the DataAttributeBinding must be deleted before the DataAttributeBinding can be deleted.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.dataAttributeBindings.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Required. If the client provided etag value does not match the current etag value, the DeleteDataAttributeBindingRequest method returns an ABORTED error response. Etags must be used when calling the DeleteDataAttributeBinding.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the DataAttributeBinding: projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataAttributeBindings.get": + +type ProjectsLocationsDataAttributeBindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a DataAttributeBinding resource. +// +// - name: The resource name of the DataAttributeBinding: +// projects/{project_number}/locations/{location_id}/dataAttributeBindi +// ngs/{data_attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Get(name string) *ProjectsLocationsDataAttributeBindingsGetCall { + c := &ProjectsLocationsDataAttributeBindingsGetCall{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 *ProjectsLocationsDataAttributeBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetCall { + 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 *ProjectsLocationsDataAttributeBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetCall { + 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 *ProjectsLocationsDataAttributeBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetCall { + 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 *ProjectsLocationsDataAttributeBindingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsGetCall) 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 "dataplex.projects.locations.dataAttributeBindings.get" call. +// Exactly one of *GoogleCloudDataplexV1DataAttributeBinding or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1DataAttributeBinding.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 *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttributeBinding, 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 := &GoogleCloudDataplexV1DataAttributeBinding{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a DataAttributeBinding resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataAttributeBindings.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the DataAttributeBinding: projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1DataAttributeBinding" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataAttributeBindings.getIamPolicy": + +type ProjectsLocationsDataAttributeBindingsGetIamPolicyCall 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 *ProjectsLocationsDataAttributeBindingsService) GetIamPolicy(resource string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { + c := &ProjectsLocationsDataAttributeBindingsGetIamPolicyCall{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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { + 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { + 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { + 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { + 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) 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/{+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 "dataplex.projects.locations.dataAttributeBindings.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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataAttributeBindings.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/[^/]+/dataAttributeBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataAttributeBindings.list": + +type ProjectsLocationsDataAttributeBindingsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DataAttributeBinding resources in a project and location. +// +// - parent: The resource name of the Location: +// projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) List(parent string) *ProjectsLocationsDataAttributeBindingsListCall { + c := &ProjectsLocationsDataAttributeBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. Filter +// using resource: filter=resource:"resource-name" Filter using +// attribute: filter=attributes:"attribute-name" Filter using attribute +// in paths list: filter=paths.attributes:"attribute-name" +func (c *ProjectsLocationsDataAttributeBindingsListCall) Filter(filter string) *ProjectsLocationsDataAttributeBindingsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for +// the result. +func (c *ProjectsLocationsDataAttributeBindingsListCall) OrderBy(orderBy string) *ProjectsLocationsDataAttributeBindingsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataAttributeBindings to return. The service may return fewer than +// this value. If unspecified, at most 10 DataAttributeBindings will be +// returned. The maximum value is 1000; values above 1000 will be +// coerced to 1000. +func (c *ProjectsLocationsDataAttributeBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataAttributeBindingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListDataAttributeBindings call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to ListDataAttributeBindings must match the call +// that provided the page token. +func (c *ProjectsLocationsDataAttributeBindingsListCall) PageToken(pageToken string) *ProjectsLocationsDataAttributeBindingsListCall { + 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 *ProjectsLocationsDataAttributeBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsListCall { + 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 *ProjectsLocationsDataAttributeBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsListCall { + 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 *ProjectsLocationsDataAttributeBindingsListCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsListCall { + 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 *ProjectsLocationsDataAttributeBindingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsListCall) 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}/dataAttributeBindings") + 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 "dataplex.projects.locations.dataAttributeBindings.list" call. +// Exactly one of +// *GoogleCloudDataplexV1ListDataAttributeBindingsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDataplexV1ListDataAttributeBindingsResponse.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 *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributeBindingsResponse, 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 := &GoogleCloudDataplexV1ListDataAttributeBindingsResponse{ + 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 DataAttributeBinding resources in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataAttributeBindings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter request. Filter using resource: filter=resource:\"resource-name\" Filter using attribute: filter=attributes:\"attribute-name\" Filter using attribute in paths list: filter=paths.attributes:\"attribute-name\"", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of DataAttributeBindings to return. The service may return fewer than this value. If unspecified, at most 10 DataAttributeBindings will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListDataAttributeBindings call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataAttributeBindings must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the Location: projects/{project_number}/locations/{location_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/dataAttributeBindings", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListDataAttributeBindingsResponse" + // }, + // "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 *ProjectsLocationsDataAttributeBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributeBindingsResponse) 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 "dataplex.projects.locations.dataAttributeBindings.patch": + +type ProjectsLocationsDataAttributeBindingsPatchCall struct { + s *Service + name string + googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataAttributeBinding resource. +// +// - name: Output only. The relative resource name of the Data Attribute +// Binding, of the form: +// projects/{project_number}/locations/{location}/dataAttributeBindings +// /{data_attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Patch(name string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsPatchCall { + c := &ProjectsLocationsDataAttributeBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataAttributeBindingsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsPatchCall { + 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsPatchCall { + 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsPatchCall { + 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) 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.googleclouddataplexv1dataattributebinding) + 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 "dataplex.projects.locations.dataAttributeBindings.patch" 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 *ProjectsLocationsDataAttributeBindingsPatchCall) 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": "Updates a DataAttributeBinding resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.dataAttributeBindings.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the Data Attribute Binding, of the form: projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1DataAttributeBinding" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataAttributeBindings.setIamPolicy": + +type ProjectsLocationsDataAttributeBindingsSetIamPolicyCall 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 *ProjectsLocationsDataAttributeBindingsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { + c := &ProjectsLocationsDataAttributeBindingsSetIamPolicyCall{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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { + 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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { + 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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) 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, "v1/{+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 "dataplex.projects.locations.dataAttributeBindings.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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataAttributeBindings.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/[^/]+/dataAttributeBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataAttributeBindings.testIamPermissions": + +type ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall 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 *ProjectsLocationsDataAttributeBindingsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { + c := &ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall{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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { + 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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { + 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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) 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, "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 "dataplex.projects.locations.dataAttributeBindings.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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataAttributeBindings.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/[^/]+/dataAttributeBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataScans.create": + +type ProjectsLocationsDataScansCreateCall struct { + s *Service + parent string + googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DataScan resource. +// +// - parent: The resource name of the parent location: +// projects/{project}/locations/{location_id} where project refers to +// a project_id or project_number and location_id refers to a GCP +// region. +func (r *ProjectsLocationsDataScansService) Create(parent string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansCreateCall { + c := &ProjectsLocationsDataScansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1datascan = googleclouddataplexv1datascan + return c +} + +// DataScanId sets the optional parameter "dataScanId": Required. +// DataScan identifier. Must contain only lowercase letters, numbers and +// hyphens. Must start with a letter. Must end with a number or a +// letter. Must be between 1-63 characters. Must be unique within the +// customer project / location. +func (c *ProjectsLocationsDataScansCreateCall) DataScanId(dataScanId string) *ProjectsLocationsDataScansCreateCall { + c.urlParams_.Set("dataScanId", dataScanId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsDataScansCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansCreateCall { + 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 *ProjectsLocationsDataScansCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansCreateCall { + 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 *ProjectsLocationsDataScansCreateCall) Context(ctx context.Context) *ProjectsLocationsDataScansCreateCall { + 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 *ProjectsLocationsDataScansCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataScansCreateCall) 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.googleclouddataplexv1datascan) + 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}/dataScans") + 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 "dataplex.projects.locations.dataScans.create" 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 *ProjectsLocationsDataScansCreateCall) 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": "Creates a DataScan resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataScans.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "dataScanId": { + // "description": "Required. DataScan identifier. Must contain only lowercase letters, numbers and hyphens. Must start with a letter. Must end with a number or a letter. Must be between 1-63 characters. Must be unique within the customer project / location.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent location: projects/{project}/locations/{location_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/dataScans", + // "request": { + // "$ref": "GoogleCloudDataplexV1DataScan" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataScans.delete": + +type ProjectsLocationsDataScansDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataScan resource. +// +// - name: The resource name of the dataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} +// where project refers to a project_id or project_number and +// location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansService) Delete(name string) *ProjectsLocationsDataScansDeleteCall { + c := &ProjectsLocationsDataScansDeleteCall{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 *ProjectsLocationsDataScansDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansDeleteCall { + 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 *ProjectsLocationsDataScansDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataScansDeleteCall { + 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 *ProjectsLocationsDataScansDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataScansDeleteCall) 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 "dataplex.projects.locations.dataScans.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 *ProjectsLocationsDataScansDeleteCall) 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 DataScan resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.dataScans.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the dataScan: projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataScans.generateDataQualityRules": + +type ProjectsLocationsDataScansGenerateDataQualityRulesCall struct { + s *Service + name string + googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateDataQualityRules: Generates recommended DataQualityRule from +// a data profiling DataScan. +// +// - name: The name should be either * the name of a datascan with at +// least one successful completed data profiling job, or * the name of +// a successful completed data profiling datascan job. +func (r *ProjectsLocationsDataScansService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { + c := &ProjectsLocationsDataScansGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest + 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 *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { + 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 *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { + 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 *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) 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.googleclouddataplexv1generatedataqualityrulesrequest) + 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}:generateDataQualityRules") + 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 "dataplex.projects.locations.dataScans.generateDataQualityRules" call. +// Exactly one of *GoogleCloudDataplexV1GenerateDataQualityRulesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.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 *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, 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 := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Generates recommended DataQualityRule from a data profiling DataScan.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}:generateDataQualityRules", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataScans.generateDataQualityRules", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name should be either * the name of a datascan with at least one successful completed data profiling job, or * the name of a successful completed data profiling datascan job.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:generateDataQualityRules", + // "request": { + // "$ref": "GoogleCloudDataplexV1GenerateDataQualityRulesRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1GenerateDataQualityRulesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataScans.get": + +type ProjectsLocationsDataScansGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DataScan resource. +// +// - name: The resource name of the dataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} +// where project refers to a project_id or project_number and +// location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansService) Get(name string) *ProjectsLocationsDataScansGetCall { + c := &ProjectsLocationsDataScansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": Select the DataScan view to +// return. Defaults to BASIC. +// +// Possible values: +// +// "DATA_SCAN_VIEW_UNSPECIFIED" - The API will default to the BASIC +// +// view. +// +// "BASIC" - Basic view that does not include spec and result. +// "FULL" - Include everything. +func (c *ProjectsLocationsDataScansGetCall) View(view string) *ProjectsLocationsDataScansGetCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsDataScansGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetCall { + 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 *ProjectsLocationsDataScansGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetCall { + 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 *ProjectsLocationsDataScansGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetCall { + 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 *ProjectsLocationsDataScansGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataScansGetCall) 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 "dataplex.projects.locations.dataScans.get" call. +// Exactly one of *GoogleCloudDataplexV1DataScan or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1DataScan.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 *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScan, 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 := &GoogleCloudDataplexV1DataScan{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a DataScan resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataScans.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the dataScan: projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. Select the DataScan view to return. Defaults to BASIC.", + // "enum": [ + // "DATA_SCAN_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "The API will default to the BASIC view.", + // "Basic view that does not include spec and result.", + // "Include everything." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1DataScan" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.dataScans.getIamPolicy": + +type ProjectsLocationsDataScansGetIamPolicyCall 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 *ProjectsLocationsDataScansService) GetIamPolicy(resource string) *ProjectsLocationsDataScansGetIamPolicyCall { + c := &ProjectsLocationsDataScansGetIamPolicyCall{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 *ProjectsLocationsDataScansGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataScansGetIamPolicyCall { + 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 *ProjectsLocationsDataScansGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetIamPolicyCall { + 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 *ProjectsLocationsDataScansGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetIamPolicyCall { + 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 *ProjectsLocationsDataScansGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetIamPolicyCall { + 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 *ProjectsLocationsDataScansGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataScansGetIamPolicyCall) 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/{+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 "dataplex.projects.locations.dataScans.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 *ProjectsLocationsDataScansGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataScans.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/[^/]+/dataScans/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "dataplex.projects.locations.get": +// method id "dataplex.projects.locations.dataScans.list": -type ProjectsLocationsGetCall struct { +type ProjectsLocationsDataScansListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets information about a location. +// List: Lists DataScans. // -// - 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 +// - parent: The resource name of the parent location: +// projects/{project}/locations/{location_id} where project refers to +// a project_id or project_number and location_id refers to a GCP +// region. +func (r *ProjectsLocationsDataScansService) List(parent string) *ProjectsLocationsDataScansListCall { + c := &ProjectsLocationsDataScansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsDataScansListCall) Filter(filter string) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields (name +// or create_time) for the result. If not specified, the ordering is +// undefined. +func (c *ProjectsLocationsDataScansListCall) OrderBy(orderBy string) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// dataScans to return. The service may return fewer than this value. If +// unspecified, at most 500 scans will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataScansListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListDataScans call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided +// to ListDataScans must match the call that provided the page token. +func (c *ProjectsLocationsDataScansListCall) PageToken(pageToken string) *ProjectsLocationsDataScansListCall { + 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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDataScansListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8332,7 +13851,7 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // 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 { +func (c *ProjectsLocationsDataScansListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansListCall { c.ifNoneMatch_ = entityTag return c } @@ -8340,21 +13859,21 @@ func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocati // 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 *ProjectsLocationsDataScansListCall) Context(ctx context.Context) *ProjectsLocationsDataScansListCall { 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 *ProjectsLocationsDataScansListCall) 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 *ProjectsLocationsDataScansListCall) 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_ { @@ -8367,7 +13886,7 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8375,19 +13894,21 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.get" call. -// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.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) (*GoogleCloudLocationLocation, error) { +// Do executes the "dataplex.projects.locations.dataScans.list" call. +// Exactly one of *GoogleCloudDataplexV1ListDataScansResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1ListDataScansResponse.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 *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScansResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8406,7 +13927,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationLocation{ + ret := &GoogleCloudDataplexV1ListDataScansResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8418,25 +13939,46 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "description": "Lists DataScans.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans", // "httpMethod": "GET", - // "id": "dataplex.projects.locations.get", + // "id": "dataplex.projects.locations.dataScans.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Resource name for the location.", + // "filter": { + // "description": "Optional. Filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields (name or create_time) for the result. If not specified, the ordering is undefined.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of dataScans to return. The service may return fewer than this value. If unspecified, at most 500 scans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListDataScans call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataScans must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent location: projects/{project}/locations/{location_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/dataScans", // "response": { - // "$ref": "GoogleCloudLocationLocation" + // "$ref": "GoogleCloudDataplexV1ListDataScansResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8445,103 +13987,110 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } -// method id "dataplex.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 +// 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 *ProjectsLocationsDataScansListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScansResponse) 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) + } } -// 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 -} +// method id "dataplex.projects.locations.dataScans.patch": -// 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 +type ProjectsLocationsDataScansPatchCall struct { + s *Service + name string + googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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) +// Patch: Updates a DataScan resource. +// +// - name: Output only. The relative resource name of the scan, of the +// form: +// projects/{project}/locations/{location_id}/dataScans/{datascan_id}, +// where project refers to a project_id or project_number and +// location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansService) Patch(name string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansPatchCall { + c := &ProjectsLocationsDataScansPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1datascan = googleclouddataplexv1datascan 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)) +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. +func (c *ProjectsLocationsDataScansPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataScansPatchCall { + c.urlParams_.Set("updateMask", updateMask) 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 +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsDataScansPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansPatchCall { + 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 *ProjectsLocationsDataScansPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansPatchCall { + 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 *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDataScansPatchCall) Context(ctx context.Context) *ProjectsLocationsDataScansPatchCall { 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 *ProjectsLocationsDataScansPatchCall) 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 *ProjectsLocationsDataScansPatchCall) 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.googleclouddataplexv1datascan) + 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}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -8552,16 +14101,14 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.list" call. -// Exactly one of *GoogleCloudLocationListLocationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudLocationListLocationsResponse.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) (*GoogleCloudLocationListLocationsResponse, error) { +// Do executes the "dataplex.projects.locations.dataScans.patch" 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 *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8580,7 +14127,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8592,41 +14139,39 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.list", + // "description": "Updates a DataScan resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.dataScans.patch", // "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": "Output only. The relative resource name of the scan, of the form: projects/{project}/locations/{location_id}/dataScans/{datascan_id}, where project refers to a project_id or project_number and location_id refers to a GCP region.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "pageToken": { - // "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.", + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "v1/{+name}/locations", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1DataScan" + // }, // "response": { - // "$ref": "GoogleCloudLocationListLocationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8635,139 +14180,94 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } -// 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(*GoogleCloudLocationListLocationsResponse) 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 "dataplex.projects.locations.aspectTypes.getIamPolicy": +// method id "dataplex.projects.locations.dataScans.run": -type ProjectsLocationsAspectTypesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansRunCall struct { + s *Service + name string + googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest + 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. +// Run: Runs an on-demand execution of a DataScan // -// - 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 *ProjectsLocationsAspectTypesService) GetIamPolicy(resource string) *ProjectsLocationsAspectTypesGetIamPolicyCall { - c := &ProjectsLocationsAspectTypesGetIamPolicyCall{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 *ProjectsLocationsAspectTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAspectTypesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The resource name of the DataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. +// where project refers to a project_id or project_number and +// location_id refers to a GCP region.Only OnDemand data scans are +// allowed. +func (r *ProjectsLocationsDataScansService) Run(name string, googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest) *ProjectsLocationsDataScansRunCall { + c := &ProjectsLocationsDataScansRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1rundatascanrequest = googleclouddataplexv1rundatascanrequest 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataScansRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansRunCall { 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetIamPolicyCall { - 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataScansRunCall) Context(ctx context.Context) *ProjectsLocationsDataScansRunCall { 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataScansRunCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansRunCall) 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.googleclouddataplexv1rundatascanrequest) + 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}:run") 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 "dataplex.projects.locations.aspectTypes.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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// Do executes the "dataplex.projects.locations.dataScans.run" call. +// Exactly one of *GoogleCloudDataplexV1RunDataScanResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1RunDataScanResponse.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 *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunDataScanResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8786,7 +14286,7 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1RunDataScanResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8798,31 +14298,28 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.Call } 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}/aspectTypes/{aspectTypesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.aspectTypes.getIamPolicy", + // "description": "Runs an on-demand execution of a DataScan", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}:run", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataScans.run", // "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": "Required. The resource name of the DataScan: projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. where project refers to a project_id or project_number and location_id refers to a GCP region.Only OnDemand data scans are allowed.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}:run", + // "request": { + // "$ref": "GoogleCloudDataplexV1RunDataScanRequest" + // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudDataplexV1RunDataScanResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8831,9 +14328,9 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.Call } -// method id "dataplex.projects.locations.aspectTypes.setIamPolicy": +// method id "dataplex.projects.locations.dataScans.setIamPolicy": -type ProjectsLocationsAspectTypesSetIamPolicyCall struct { +type ProjectsLocationsDataScansSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -8850,8 +14347,8 @@ type ProjectsLocationsAspectTypesSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAspectTypesSetIamPolicyCall { - c := &ProjectsLocationsAspectTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataScansService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataScansSetIamPolicyCall { + c := &ProjectsLocationsDataScansSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -8860,7 +14357,7 @@ func (r *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, goog // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesSetIamPolicyCall { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8868,21 +14365,21 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) 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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesSetIamPolicyCall { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansSetIamPolicyCall { 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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) 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_ { @@ -8910,14 +14407,14 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataScans.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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8949,9 +14446,9 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.Call 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}/aspectTypes/{aspectTypesId}:setIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}:setIamPolicy", // "httpMethod": "POST", - // "id": "dataplex.projects.locations.aspectTypes.setIamPolicy", + // "id": "dataplex.projects.locations.dataScans.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -8959,7 +14456,7 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.Call // "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/[^/]+/aspectTypes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", // "required": true, // "type": "string" // } @@ -8978,9 +14475,9 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.Call } -// method id "dataplex.projects.locations.aspectTypes.testIamPermissions": +// method id "dataplex.projects.locations.dataScans.testIamPermissions": -type ProjectsLocationsAspectTypesTestIamPermissionsCall struct { +type ProjectsLocationsDataScansTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -9000,8 +14497,8 @@ type ProjectsLocationsAspectTypesTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsAspectTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAspectTypesTestIamPermissionsCall { - c := &ProjectsLocationsAspectTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataScansService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataScansTestIamPermissionsCall { + c := &ProjectsLocationsDataScansTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -9010,7 +14507,7 @@ func (r *ProjectsLocationsAspectTypesService) TestIamPermissions(resource string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesTestIamPermissionsCall { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9018,21 +14515,21 @@ func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Fields(s ...googlea // 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesTestIamPermissionsCall { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataScansTestIamPermissionsCall { 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) 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_ { @@ -9060,7 +14557,7 @@ func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.dataScans.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 @@ -9068,7 +14565,7 @@ func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) doRequest(alt strin // 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9100,9 +14597,9 @@ func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Do(opts ...googleap 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}/aspectTypes/{aspectTypesId}:testIamPermissions", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}:testIamPermissions", // "httpMethod": "POST", - // "id": "dataplex.projects.locations.aspectTypes.testIamPermissions", + // "id": "dataplex.projects.locations.dataScans.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -9110,7 +14607,7 @@ func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Do(opts ...googleap // "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/[^/]+/aspectTypes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", // "required": true, // "type": "string" // } @@ -9129,50 +14626,34 @@ func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Do(opts ...googleap } -// method id "dataplex.projects.locations.dataAttributeBindings.create": +// method id "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules": -type ProjectsLocationsDataAttributeBindingsCreateCall struct { - s *Service - parent string - googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall struct { + s *Service + name string + googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a DataAttributeBinding resource. +// GenerateDataQualityRules: Generates recommended DataQualityRule from +// a data profiling DataScan. // -// - parent: The resource name of the parent data taxonomy -// projects/{project_number}/locations/{location_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Create(parent string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsCreateCall { - c := &ProjectsLocationsDataAttributeBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding - return c -} - -// DataAttributeBindingId sets the optional parameter -// "dataAttributeBindingId": Required. DataAttributeBinding identifier. -// * Must contain only lowercase letters, numbers and hyphens. * Must -// start with a letter. * Must be between 1-63 characters. * Must end -// with a number or a letter. * Must be unique within the Location. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) DataAttributeBindingId(dataAttributeBindingId string) *ProjectsLocationsDataAttributeBindingsCreateCall { - c.urlParams_.Set("dataAttributeBindingId", dataAttributeBindingId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": Only -// validate the request, but do not perform mutations. The default is -// false. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - name: The name should be either * the name of a datascan with at +// least one successful completed data profiling job, or * the name of +// a successful completed data profiling datascan job. +func (r *ProjectsLocationsDataScansJobsService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { + c := &ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsCreateCall { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9180,21 +14661,21 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Fields(s ...googleapi // 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsCreateCall { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) 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_ { @@ -9202,14 +14683,14 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattributebinding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1generatedataqualityrulesrequest) 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}/dataAttributeBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9217,19 +14698,21 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.create" 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules" call. +// Exactly one of *GoogleCloudDataplexV1GenerateDataQualityRulesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.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 *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9248,7 +14731,7 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9260,38 +14743,28 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Create a DataAttributeBinding resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings", + // "description": "Generates recommended DataQualityRule from a data profiling DataScan.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}/jobs/{jobsId}:generateDataQualityRules", // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataAttributeBindings.create", + // "id": "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "dataAttributeBindingId": { - // "description": "Required. DataAttributeBinding identifier. * Must contain only lowercase letters, numbers and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the Location.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the parent data taxonomy projects/{project_number}/locations/{location_id}", + // "name": { + // "description": "Required. The name should be either * the name of a datascan with at least one successful completed data profiling job, or * the name of a successful completed data profiling datascan job.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+$", // "required": true, // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+parent}/dataAttributeBindings", + // "path": "v1/{+name}:generateDataQualityRules", // "request": { - // "$ref": "GoogleCloudDataplexV1DataAttributeBinding" + // "$ref": "GoogleCloudDataplexV1GenerateDataQualityRulesRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDataplexV1GenerateDataQualityRulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9300,77 +14773,96 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi. } -// method id "dataplex.projects.locations.dataAttributeBindings.delete": +// method id "dataplex.projects.locations.dataScans.jobs.get": -type ProjectsLocationsDataAttributeBindingsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataAttributeBinding resource. All attributes -// within the DataAttributeBinding must be deleted before the -// DataAttributeBinding can be deleted. +// Get: Gets a DataScanJob resource. // -// - name: The resource name of the DataAttributeBinding: -// projects/{project_number}/locations/{location_id}/dataAttributeBindi -// ngs/{data_attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Delete(name string) *ProjectsLocationsDataAttributeBindingsDeleteCall { - c := &ProjectsLocationsDataAttributeBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the DataScanJob: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/ +// jobs/{data_scan_job_id} where project refers to a project_id or +// project_number and location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansJobsService) Get(name string) *ProjectsLocationsDataScansJobsGetCall { + c := &ProjectsLocationsDataScansJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Etag sets the optional parameter "etag": Required. If the client -// provided etag value does not match the current etag value, the -// DeleteDataAttributeBindingRequest method returns an ABORTED error -// response. Etags must be used when calling the -// DeleteDataAttributeBinding. -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Etag(etag string) *ProjectsLocationsDataAttributeBindingsDeleteCall { - c.urlParams_.Set("etag", etag) +// View sets the optional parameter "view": Select the DataScanJob view +// to return. Defaults to BASIC. +// +// Possible values: +// +// "DATA_SCAN_JOB_VIEW_UNSPECIFIED" - The API will default to the +// +// BASIC view. +// +// "BASIC" - Basic view that does not include spec and result. +// "FULL" - Include everything. +func (c *ProjectsLocationsDataScansJobsGetCall) View(view string) *ProjectsLocationsDataScansJobsGetCall { + c.urlParams_.Set("view", view) 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsDeleteCall { +func (c *ProjectsLocationsDataScansJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGetCall { 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 *ProjectsLocationsDataScansJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsGetCall { + 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsDeleteCall { +func (c *ProjectsLocationsDataScansJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGetCall { 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansJobsGetCall) 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("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -9381,14 +14873,14 @@ func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.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 +// Do executes the "dataplex.projects.locations.dataScans.jobs.get" call. +// Exactly one of *GoogleCloudDataplexV1DataScanJob or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1DataScanJob.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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScanJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9407,7 +14899,7 @@ func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1DataScanJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9419,30 +14911,40 @@ func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deletes a DataAttributeBinding resource. All attributes within the DataAttributeBinding must be deleted before the DataAttributeBinding can be deleted.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}", - // "httpMethod": "DELETE", - // "id": "dataplex.projects.locations.dataAttributeBindings.delete", + // "description": "Gets a DataScanJob resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}/jobs/{jobsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataScans.jobs.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "etag": { - // "description": "Required. If the client provided etag value does not match the current etag value, the DeleteDataAttributeBindingRequest method returns an ABORTED error response. Etags must be used when calling the DeleteDataAttributeBinding.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. The resource name of the DataAttributeBinding: projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}", + // "description": "Required. The resource name of the DataScanJob: projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "Optional. Select the DataScanJob view to return. Defaults to BASIC.", + // "enum": [ + // "DATA_SCAN_JOB_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "The API will default to the BASIC view.", + // "Basic view that does not include spec and result.", + // "Include everything." + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDataplexV1DataScanJob" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9451,32 +14953,66 @@ func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi. } -// method id "dataplex.projects.locations.dataAttributeBindings.get": +// method id "dataplex.projects.locations.dataScans.jobs.list": + +type ProjectsLocationsDataScansJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DataScanJobs under the given DataScan. +// +// - parent: The resource name of the parent environment: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} +// where project refers to a project_id or project_number and +// location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansJobsService) List(parent string) *ProjectsLocationsDataScansJobsListCall { + c := &ProjectsLocationsDataScansJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for +// filtering the results of the ListDataScanJobs request.If unspecified, +// all datascan jobs will be returned. Multiple filters can be applied +// (with AND, OR logical operators). Filters are case-sensitive.Allowed +// fields are: start_time end_timestart_time and end_time expect +// RFC-3339 formatted strings (e.g. 2018-10-08T18:30:00-07:00).For +// instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < +// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs +// between specified start and end times. +func (c *ProjectsLocationsDataScansJobsListCall) Filter(filter string) *ProjectsLocationsDataScansJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} -type ProjectsLocationsDataAttributeBindingsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataScanJobs to return. The service may return fewer than this value. +// If unspecified, at most 10 DataScanJobs will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataScansJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Get: Retrieves a DataAttributeBinding resource. -// -// - name: The resource name of the DataAttributeBinding: -// projects/{project_number}/locations/{location_id}/dataAttributeBindi -// ngs/{data_attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Get(name string) *ProjectsLocationsDataAttributeBindingsGetCall { - c := &ProjectsLocationsDataAttributeBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListDataScanJobs call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to ListDataScanJobs must match the call that provided the +// page token. +func (c *ProjectsLocationsDataScansJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataScansJobsListCall { + 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 *ProjectsLocationsDataAttributeBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetCall { +func (c *ProjectsLocationsDataScansJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9486,7 +15022,7 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsDataAttributeBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetCall { +func (c *ProjectsLocationsDataScansJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsListCall { c.ifNoneMatch_ = entityTag return c } @@ -9494,21 +15030,21 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) IfNoneMatch(entityTag st // 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 *ProjectsLocationsDataAttributeBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetCall { +func (c *ProjectsLocationsDataScansJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsListCall { 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 *ProjectsLocationsDataAttributeBindingsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansJobsListCall) 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_ { @@ -9521,7 +15057,7 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9529,21 +15065,21 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.get" call. -// Exactly one of *GoogleCloudDataplexV1DataAttributeBinding or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "dataplex.projects.locations.dataScans.jobs.list" call. +// Exactly one of *GoogleCloudDataplexV1ListDataScanJobsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDataplexV1DataAttributeBinding.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDataplexV1ListDataScanJobsResponse.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 *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttributeBinding, error) { +func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScanJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9562,7 +15098,7 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataAttributeBinding{ + ret := &GoogleCloudDataplexV1ListDataScanJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9574,25 +15110,41 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Retrieves a DataAttributeBinding resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}", + // "description": "Lists DataScanJobs under the given DataScan.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}/jobs", // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataAttributeBindings.get", + // "id": "dataplex.projects.locations.dataScans.jobs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the DataAttributeBinding: projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}", + // "filter": { + // "description": "Optional. An expression for filtering the results of the ListDataScanJobs request.If unspecified, all datascan jobs will be returned. Multiple filters can be applied (with AND, OR logical operators). Filters are case-sensitive.Allowed fields are: start_time end_timestart_time and end_time expect RFC-3339 formatted strings (e.g. 2018-10-08T18:30:00-07:00).For instance, 'start_time \u003e 2018-10-08T00:00:00.123456789Z AND end_time \u003c 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between specified start and end times.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of DataScanJobs to return. The service may return fewer than this value. If unspecified, at most 10 DataScanJobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListDataScanJobs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataScanJobs must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent environment: projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/jobs", // "response": { - // "$ref": "GoogleCloudDataplexV1DataAttributeBinding" + // "$ref": "GoogleCloudDataplexV1ListDataScanJobsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9601,118 +15153,129 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.Cal } -// method id "dataplex.projects.locations.dataAttributeBindings.getIamPolicy": +// 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 *ProjectsLocationsDataScansJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScanJobsResponse) 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 ProjectsLocationsDataAttributeBindingsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "dataplex.projects.locations.dataTaxonomies.create": + +type ProjectsLocationsDataTaxonomiesCreateCall struct { + s *Service + parent string + googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy + 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. +// Create: Create a DataTaxonomy resource. // -// - 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 *ProjectsLocationsDataAttributeBindingsService) GetIamPolicy(resource string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - c := &ProjectsLocationsDataAttributeBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the data taxonomy location, of the +// form: projects/{project_number}/locations/{location_id} where +// location_id refers to a GCP region. +func (r *ProjectsLocationsDataTaxonomiesService) Create(parent string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesCreateCall { + c := &ProjectsLocationsDataTaxonomiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// DataTaxonomyId sets the optional parameter "dataTaxonomyId": +// Required. DataTaxonomy identifier. * Must contain only lowercase +// letters, numbers and hyphens. * Must start with a letter. * Must be +// between 1-63 characters. * Must end with a number or a letter. * Must +// be unique within the Project. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) DataTaxonomyId(dataTaxonomyId string) *ProjectsLocationsDataTaxonomiesCreateCall { + c.urlParams_.Set("dataTaxonomyId", dataTaxonomyId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesCreateCall { + 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesCreateCall { 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesCreateCall { 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesCreateCall) 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.googleclouddataplexv1datataxonomy) + 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/{+parent}/dataTaxonomies") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.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 +// Do executes the "dataplex.projects.locations.dataTaxonomies.create" 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9731,7 +15294,7 @@ func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9743,31 +15306,38 @@ func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...goog } 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}/dataAttributeBindings/{dataAttributeBindingsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataAttributeBindings.getIamPolicy", + // "description": "Create a DataTaxonomy resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataTaxonomies.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "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", + // "dataTaxonomyId": { + // "description": "Required. DataTaxonomy identifier. * Must contain only lowercase letters, numbers and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the Project.", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "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.", + // "parent": { + // "description": "Required. The resource name of the data taxonomy location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/dataTaxonomies", + // "request": { + // "$ref": "GoogleCloudDataplexV1DataTaxonomy" + // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9776,135 +15346,92 @@ func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...goog } -// method id "dataplex.projects.locations.dataAttributeBindings.list": +// method id "dataplex.projects.locations.dataTaxonomies.delete": -type ProjectsLocationsDataAttributeBindingsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists DataAttributeBinding resources in a project and location. +// Delete: Deletes a DataTaxonomy resource. All attributes within the +// DataTaxonomy must be deleted before the DataTaxonomy can be deleted. // -// - parent: The resource name of the Location: -// projects/{project_number}/locations/{location_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) List(parent string) *ProjectsLocationsDataAttributeBindingsListCall { - c := &ProjectsLocationsDataAttributeBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter request. Filter -// using resource: filter=resource:"resource-name" Filter using -// attribute: filter=attributes:"attribute-name" Filter using attribute -// in paths list: filter=paths.attributes:"attribute-name" -func (c *ProjectsLocationsDataAttributeBindingsListCall) Filter(filter string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Order by fields for -// the result. -func (c *ProjectsLocationsDataAttributeBindingsListCall) OrderBy(orderBy string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataAttributeBindings to return. The service may return fewer than -// this value. If unspecified, at most 10 DataAttributeBindings will be -// returned. The maximum value is 1000; values above 1000 will be -// coerced to 1000. -func (c *ProjectsLocationsDataAttributeBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da +// ta_taxonomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Delete(name string) *ProjectsLocationsDataTaxonomiesDeleteCall { + c := &ProjectsLocationsDataTaxonomiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListDataAttributeBindings call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to ListDataAttributeBindings must match the call -// that provided the page token. -func (c *ProjectsLocationsDataAttributeBindingsListCall) PageToken(pageToken string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Etag sets the optional parameter "etag": If the client provided etag +// value does not match the current etag value,the DeleteDataTaxonomy +// method returns an ABORTED error. +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesDeleteCall { + c.urlParams_.Set("etag", etag) 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 *ProjectsLocationsDataAttributeBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsListCall { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesDeleteCall { 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 *ProjectsLocationsDataAttributeBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsListCall { - 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 *ProjectsLocationsDataAttributeBindingsListCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsListCall { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesDeleteCall { 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 *ProjectsLocationsDataAttributeBindingsListCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) 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}/dataAttributeBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.list" call. -// Exactly one of -// *GoogleCloudDataplexV1ListDataAttributeBindingsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDataplexV1ListDataAttributeBindingsResponse.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 *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributeBindingsResponse, error) { +// Do executes the "dataplex.projects.locations.dataTaxonomies.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 *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9923,7 +15450,7 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataAttributeBindingsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9935,46 +15462,30 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists DataAttributeBinding resources in a project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataAttributeBindings.list", + // "description": "Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before the DataTaxonomy can be deleted.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.dataTaxonomies.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter request. Filter using resource: filter=resource:\"resource-name\" Filter using attribute: filter=attributes:\"attribute-name\" Filter using attribute in paths list: filter=paths.attributes:\"attribute-name\"", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Order by fields for the result.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Maximum number of DataAttributeBindings to return. The service may return fewer than this value. If unspecified, at most 10 DataAttributeBindings will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token received from a previous ListDataAttributeBindings call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataAttributeBindings must match the call that provided the page token.", + // "etag": { + // "description": "Optional. If the client provided etag value does not match the current etag value,the DeleteDataTaxonomy method returns an ABORTED error.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The resource name of the Location: projects/{project_number}/locations/{location_id}", + // "name": { + // "description": "Required. The resource name of the DataTaxonomy: projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/dataAttributeBindings", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudDataplexV1ListDataAttributeBindingsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9983,109 +15494,79 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.Ca } -// 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 *ProjectsLocationsDataAttributeBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributeBindingsResponse) 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 "dataplex.projects.locations.dataAttributeBindings.patch": +// method id "dataplex.projects.locations.dataTaxonomies.get": -type ProjectsLocationsDataAttributeBindingsPatchCall struct { - s *Service - name string - googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataAttributeBinding resource. +// Get: Retrieves a DataTaxonomy resource. // -// - name: Output only. The relative resource name of the Data Attribute -// Binding, of the form: -// projects/{project_number}/locations/{location}/dataAttributeBindings -// /{data_attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Patch(name string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsPatchCall { - c := &ProjectsLocationsDataAttributeBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da +// ta_taxonomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocationsDataTaxonomiesGetCall { + c := &ProjectsLocationsDataTaxonomiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataAttributeBindingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": Only -// validate the request, but do not perform mutations. The default is -// false. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsPatchCall { - 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsPatchCall { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetCall { 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 *ProjectsLocationsDataTaxonomiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetCall { + 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsPatchCall { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetCall { 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesGetCall) 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.googleclouddataplexv1dataattributebinding) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -10096,14 +15577,15 @@ func (c *ProjectsLocationsDataAttributeBindingsPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.patch" 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "dataplex.projects.locations.dataTaxonomies.get" call. +// Exactly one of *GoogleCloudDataplexV1DataTaxonomy or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1DataTaxonomy.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 *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataTaxonomy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10122,7 +15604,7 @@ func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1DataTaxonomy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10134,39 +15616,25 @@ func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Updates a DataAttributeBinding resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataAttributeBindings/{dataAttributeBindingsId}", - // "httpMethod": "PATCH", - // "id": "dataplex.projects.locations.dataAttributeBindings.patch", + // "description": "Retrieves a DataTaxonomy resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataTaxonomies.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The relative resource name of the Data Attribute Binding, of the form: projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}", + // "description": "Required. The resource name of the DataTaxonomy: projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Mask of fields to update.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudDataplexV1DataAttributeBinding" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDataplexV1DataTaxonomy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10175,75 +15643,100 @@ func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.C } -// method id "dataplex.projects.locations.dataAttributeBindings.setIamPolicy": +// method id "dataplex.projects.locations.dataTaxonomies.getIamPolicy": -type ProjectsLocationsDataAttributeBindingsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { + s *Service + resource 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. +// 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 -// specified. See Resource names +// requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsDataAttributeBindingsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { - c := &ProjectsLocationsDataAttributeBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + 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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + 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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + 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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { 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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) 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 + 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/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -10254,14 +15747,14 @@ func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10292,26 +15785,29 @@ func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...goog } 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}/dataAttributeBindings/{dataAttributeBindingsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataAttributeBindings.setIamPolicy", + // "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}/dataTaxonomies/{dataTaxonomiesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataTaxonomies.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 specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "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/[^/]+/dataAttributeBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, + // "path": "v1/{+resource}:getIamPolicy", // "response": { // "$ref": "GoogleIamV1Policy" // }, @@ -10322,97 +15818,133 @@ func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...goog } -// method id "dataplex.projects.locations.dataAttributeBindings.testIamPermissions": +// method id "dataplex.projects.locations.dataTaxonomies.list": -type ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesListCall struct { + s *Service + parent 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. +// List: Lists DataTaxonomy resources in a project and location. // -// - 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 *ProjectsLocationsDataAttributeBindingsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { - c := &ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The resource name of the DataTaxonomy location, of the +// form: projects/{project_number}/locations/{location_id} where +// location_id refers to a GCP region. +func (r *ProjectsLocationsDataTaxonomiesService) List(parent string) *ProjectsLocationsDataTaxonomiesListCall { + c := &ProjectsLocationsDataTaxonomiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsDataTaxonomiesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for +// the result. +func (c *ProjectsLocationsDataTaxonomiesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataTaxonomies to return. The service may return fewer than this +// value. If unspecified, at most 10 DataTaxonomies will be returned. +// The maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataTaxonomiesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListDataTaxonomies call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to ListDataTaxonomies must match the call that provided the +// page token. +func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesListCall { + 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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesListCall { 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 *ProjectsLocationsDataTaxonomiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesListCall { + 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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesListCall { 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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesListCall) 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 + 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}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// Do executes the "dataplex.projects.locations.dataTaxonomies.list" call. +// Exactly one of *GoogleCloudDataplexV1ListDataTaxonomiesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1ListDataTaxonomiesResponse.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 *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataTaxonomiesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10431,7 +15963,7 @@ func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudDataplexV1ListDataTaxonomiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10443,28 +15975,46 @@ func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts . } 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}/dataAttributeBindings/{dataAttributeBindingsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataAttributeBindings.testIamPermissions", + // "description": "Lists DataTaxonomy resources in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataTaxonomies.list", // "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.", + // "filter": { + // "description": "Optional. Filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of DataTaxonomies to return. The service may return fewer than this value. If unspecified, at most 10 DataTaxonomies will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListDataTaxonomies call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataTaxonomies must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the DataTaxonomy location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1/{+parent}/dataTaxonomies", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleCloudDataplexV1ListDataTaxonomiesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10473,44 +16023,62 @@ func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts . } -// method id "dataplex.projects.locations.dataScans.create": +// 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 *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataTaxonomiesResponse) 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 ProjectsLocationsDataScansCreateCall struct { - s *Service - parent string - googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dataplex.projects.locations.dataTaxonomies.patch": + +type ProjectsLocationsDataTaxonomiesPatchCall struct { + s *Service + name string + googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataScan resource. +// Patch: Updates a DataTaxonomy resource. // -// - parent: The resource name of the parent location: -// projects/{project}/locations/{location_id} where project refers to -// a project_id or project_number and location_id refers to a GCP -// region. -func (r *ProjectsLocationsDataScansService) Create(parent string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansCreateCall { - c := &ProjectsLocationsDataScansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1datascan = googleclouddataplexv1datascan +// - name: Output only. The relative resource name of the DataTaxonomy, +// of the form: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da +// ta_taxonomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Patch(name string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesPatchCall { + c := &ProjectsLocationsDataTaxonomiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy return c } -// DataScanId sets the optional parameter "dataScanId": Required. -// DataScan identifier. Must contain only lowercase letters, numbers and -// hyphens. Must start with a letter. Must end with a number or a -// letter. Must be between 1-63 characters. Must be unique within the -// customer project / location. -func (c *ProjectsLocationsDataScansCreateCall) DataScanId(dataScanId string) *ProjectsLocationsDataScansCreateCall { - c.urlParams_.Set("dataScanId", dataScanId) +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. +func (c *ProjectsLocationsDataTaxonomiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // ValidateOnly sets the optional parameter "validateOnly": Only // validate the request, but do not perform mutations. The default is // false. -func (c *ProjectsLocationsDataScansCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansCreateCall { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -10518,7 +16086,7 @@ func (c *ProjectsLocationsDataScansCreateCall) ValidateOnly(validateOnly bool) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataScansCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansCreateCall { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10526,21 +16094,21 @@ func (c *ProjectsLocationsDataScansCreateCall) Fields(s ...googleapi.Field) *Pro // 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 *ProjectsLocationsDataScansCreateCall) Context(ctx context.Context) *ProjectsLocationsDataScansCreateCall { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesPatchCall { 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 *ProjectsLocationsDataScansCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) 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_ { @@ -10548,34 +16116,34 @@ func (c *ProjectsLocationsDataScansCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datascan) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datataxonomy) 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}/dataScans") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.create" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.patch" 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 *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10606,35 +16174,36 @@ func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a DataScan resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataScans.create", + // "description": "Updates a DataTaxonomy resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.dataTaxonomies.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "dataScanId": { - // "description": "Required. DataScan identifier. Must contain only lowercase letters, numbers and hyphens. Must start with a letter. Must end with a number or a letter. Must be between 1-63 characters. Must be unique within the customer project / location.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the parent location: projects/{project}/locations/{location_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "name": { + // "description": "Output only. The relative resource name of the DataTaxonomy, of the form: projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", // "required": true, // "type": "string" // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, // "validateOnly": { // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", // "location": "query", // "type": "boolean" // } // }, - // "path": "v1/{+parent}/dataScans", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudDataplexV1DataScan" + // "$ref": "GoogleCloudDataplexV1DataTaxonomy" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -10646,32 +16215,36 @@ func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) } -// method id "dataplex.projects.locations.dataScans.delete": +// method id "dataplex.projects.locations.dataTaxonomies.setIamPolicy": -type ProjectsLocationsDataScansDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataScan resource. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy.Can return NOT_FOUND, +// INVALID_ARGUMENT, and PERMISSION_DENIED errors. // -// - name: The resource name of the dataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} -// where project refers to a project_id or project_number and -// location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansService) Delete(name string) *ProjectsLocationsDataScansDeleteCall { - c := &ProjectsLocationsDataScansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesSetIamPolicyCall{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 *ProjectsLocationsDataScansDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansDeleteCall { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10679,21 +16252,21 @@ func (c *ProjectsLocationsDataScansDeleteCall) Fields(s ...googleapi.Field) *Pro // 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 *ProjectsLocationsDataScansDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataScansDeleteCall { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { 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 *ProjectsLocationsDataScansDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) 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_ { @@ -10701,29 +16274,34 @@ func (c *ProjectsLocationsDataScansDeleteCall) doRequest(alt string) (*http.Resp } 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.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 +// Do executes the "dataplex.projects.locations.dataTaxonomies.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 *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10742,7 +16320,7 @@ func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10754,25 +16332,28 @@ func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a DataScan resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}", - // "httpMethod": "DELETE", - // "id": "dataplex.projects.locations.dataScans.delete", + // "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}/dataTaxonomies/{dataTaxonomiesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataTaxonomies.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the dataScan: projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "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/[^/]+/dataScans/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10781,114 +16362,97 @@ func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "dataplex.projects.locations.dataScans.get": - -type ProjectsLocationsDataScansGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} +// method id "dataplex.projects.locations.dataTaxonomies.testIamPermissions": -// Get: Gets a DataScan resource. -// -// - name: The resource name of the dataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} -// where project refers to a project_id or project_number and -// location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansService) Get(name string) *ProjectsLocationsDataScansGetCall { - c := &ProjectsLocationsDataScansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Select the DataScan view to -// return. Defaults to BASIC. -// -// Possible values: -// -// "DATA_SCAN_VIEW_UNSPECIFIED" - The API will default to the BASIC -// -// view. +// 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. // -// "BASIC" - Basic view that does not include spec and result. -// "FULL" - Include everything. -func (c *ProjectsLocationsDataScansGetCall) View(view string) *ProjectsLocationsDataScansGetCall { - c.urlParams_.Set("view", view) +// - 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 *ProjectsLocationsDataTaxonomiesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { + c := &ProjectsLocationsDataTaxonomiesTestIamPermissionsCall{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 *ProjectsLocationsDataScansGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetCall { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { 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 *ProjectsLocationsDataScansGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetCall { - 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 *ProjectsLocationsDataScansGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetCall { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { 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 *ProjectsLocationsDataScansGetCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) 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.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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.get" call. -// Exactly one of *GoogleCloudDataplexV1DataScan or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudDataplexV1DataScan.ServerResponse.Header or (if a +// Do executes the "dataplex.projects.locations.dataTaxonomies.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 *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScan, error) { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10907,7 +16471,7 @@ func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataScan{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10919,40 +16483,28 @@ func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Gets a DataScan resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataScans.get", + // "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}/dataTaxonomies/{dataTaxonomiesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataTaxonomies.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the dataScan: projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "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/[^/]+/dataScans/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", // "required": true, // "type": "string" - // }, - // "view": { - // "description": "Optional. Select the DataScan view to return. Defaults to BASIC.", - // "enum": [ - // "DATA_SCAN_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "The API will default to the BASIC view.", - // "Basic view that does not include spec and result.", - // "Include everything." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "GoogleCloudDataplexV1DataScan" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10961,118 +16513,108 @@ func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*G } -// method id "dataplex.projects.locations.dataScans.getIamPolicy": +// method id "dataplex.projects.locations.dataTaxonomies.attributes.create": -type ProjectsLocationsDataScansGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesAttributesCreateCall struct { + s *Service + parent string + googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute + 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. +// Create: Create a DataAttribute resource. // -// - 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 *ProjectsLocationsDataScansService) GetIamPolicy(resource string) *ProjectsLocationsDataScansGetIamPolicyCall { - c := &ProjectsLocationsDataScansGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the parent data taxonomy +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da +// ta_taxonomy_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Create(parent string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { + c := &ProjectsLocationsDataTaxonomiesAttributesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute 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 *ProjectsLocationsDataScansGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataScansGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// DataAttributeId sets the optional parameter "dataAttributeId": +// Required. DataAttribute identifier. * Must contain only lowercase +// letters, numbers and hyphens. * Must start with a letter. * Must be +// between 1-63 characters. * Must end with a number or a letter. * Must +// be unique within the DataTaxonomy. +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) DataAttributeId(dataAttributeId string) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { + c.urlParams_.Set("dataAttributeId", dataAttributeId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { + 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 *ProjectsLocationsDataScansGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { 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 *ProjectsLocationsDataScansGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetIamPolicyCall { - 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 *ProjectsLocationsDataScansGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { 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 *ProjectsLocationsDataScansGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) 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.googleclouddataplexv1dataattribute) + 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/{+parent}/attributes") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.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 +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.create" 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 *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11091,7 +16633,7 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11103,31 +16645,38 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOp } 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}/dataScans/{dataScansId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataScans.getIamPolicy", + // "description": "Create a DataAttribute resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataTaxonomies.attributes.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "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", + // "dataAttributeId": { + // "description": "Required. DataAttribute identifier. * Must contain only lowercase letters, numbers and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the DataTaxonomy.", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "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.", + // "parent": { + // "description": "Required. The resource name of the parent data taxonomy projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", // "required": true, // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/attributes", + // "request": { + // "$ref": "GoogleCloudDataplexV1DataAttribute" + // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11136,132 +16685,91 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOp } -// method id "dataplex.projects.locations.dataScans.list": +// method id "dataplex.projects.locations.dataTaxonomies.attributes.delete": -type ProjectsLocationsDataScansListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesAttributesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists DataScans. +// Delete: Deletes a Data Attribute resource. // -// - parent: The resource name of the parent location: -// projects/{project}/locations/{location_id} where project refers to -// a project_id or project_number and location_id refers to a GCP -// region. -func (r *ProjectsLocationsDataScansService) List(parent string) *ProjectsLocationsDataScansListCall { - c := &ProjectsLocationsDataScansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataScansListCall) Filter(filter string) *ProjectsLocationsDataScansListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Order by fields (name -// or create_time) for the result. If not specified, the ordering is -// undefined. -func (c *ProjectsLocationsDataScansListCall) OrderBy(orderBy string) *ProjectsLocationsDataScansListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// dataScans to return. The service may return fewer than this value. If -// unspecified, at most 500 scans will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataScansListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: The resource name of the DataAttribute: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da +// taTaxonomy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Delete(name string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { + c := &ProjectsLocationsDataTaxonomiesAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListDataScans call. Provide this to retrieve -// the subsequent page. When paginating, all other parameters provided -// to ListDataScans must match the call that provided the page token. -func (c *ProjectsLocationsDataScansListCall) PageToken(pageToken string) *ProjectsLocationsDataScansListCall { - c.urlParams_.Set("pageToken", pageToken) +// Etag sets the optional parameter "etag": If the client provided etag +// value does not match the current etag value, the DeleteDataAttribute +// method returns an ABORTED error response. +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { + c.urlParams_.Set("etag", etag) 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 *ProjectsLocationsDataScansListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { 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 *ProjectsLocationsDataScansListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansListCall { - 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 *ProjectsLocationsDataScansListCall) Context(ctx context.Context) *ProjectsLocationsDataScansListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { 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 *ProjectsLocationsDataScansListCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) 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}/dataScans") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.list" call. -// Exactly one of *GoogleCloudDataplexV1ListDataScansResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDataplexV1ListDataScansResponse.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 *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScansResponse, error) { +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.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 *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11280,7 +16788,7 @@ func (c *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataScansResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11292,158 +16800,111 @@ func (c *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Lists DataScans.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataScans.list", + // "description": "Deletes a Data Attribute resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.dataTaxonomies.attributes.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter request.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Order by fields (name or create_time) for the result. If not specified, the ordering is undefined.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Maximum number of dataScans to return. The service may return fewer than this value. If unspecified, at most 500 scans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token received from a previous ListDataScans call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataScans must match the call that provided the page token.", + // "etag": { + // "description": "Optional. If the client provided etag value does not match the current etag value, the DeleteDataAttribute method returns an ABORTED error response.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The resource name of the parent location: projects/{project}/locations/{location_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "name": { + // "description": "Required. The resource name of the DataAttribute: projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/dataScans", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudDataplexV1ListDataScansResponse" + // "$ref": "GoogleLongrunningOperation" // }, - // "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 *ProjectsLocationsDataScansListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScansResponse) 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 "dataplex.projects.locations.dataScans.patch": - -type ProjectsLocationsDataScansPatchCall struct { - s *Service - name string - googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a DataScan resource. -// -// - name: Output only. The relative resource name of the scan, of the -// form: -// projects/{project}/locations/{location_id}/dataScans/{datascan_id}, -// where project refers to a project_id or project_number and -// location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansService) Patch(name string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansPatchCall { - c := &ProjectsLocationsDataScansPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1datascan = googleclouddataplexv1datascan - return c + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. -func (c *ProjectsLocationsDataScansPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataScansPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c +// method id "dataplex.projects.locations.dataTaxonomies.attributes.get": + +type ProjectsLocationsDataTaxonomiesAttributesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ValidateOnly sets the optional parameter "validateOnly": Only -// validate the request, but do not perform mutations. The default is -// false. -func (c *ProjectsLocationsDataScansPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// Get: Retrieves a Data Attribute resource. +// +// - name: The resource name of the dataAttribute: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da +// taTaxonomy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { + c := &ProjectsLocationsDataTaxonomiesAttributesGetCall{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 *ProjectsLocationsDataScansPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetCall { 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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { + 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 *ProjectsLocationsDataScansPatchCall) Context(ctx context.Context) *ProjectsLocationsDataScansPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetCall { 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 *ProjectsLocationsDataScansPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) 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.googleclouddataplexv1datascan) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -11454,14 +16915,15 @@ func (c *ProjectsLocationsDataScansPatchCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.patch" 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 *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.get" call. +// Exactly one of *GoogleCloudDataplexV1DataAttribute or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1DataAttribute.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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11480,7 +16942,7 @@ func (c *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1DataAttribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11492,39 +16954,25 @@ func (c *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates a DataScan resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}", - // "httpMethod": "PATCH", - // "id": "dataplex.projects.locations.dataScans.patch", + // "description": "Retrieves a Data Attribute resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataTaxonomies.attributes.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The relative resource name of the scan, of the form: projects/{project}/locations/{location_id}/dataScans/{datascan_id}, where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "description": "Required. The resource name of the dataAttribute: projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Mask of fields to update.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudDataplexV1DataScan" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDataplexV1DataAttribute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11533,94 +16981,118 @@ func (c *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) ( } -// method id "dataplex.projects.locations.dataScans.run": +// method id "dataplex.projects.locations.dataTaxonomies.attributes.getIamPolicy": -type ProjectsLocationsDataScansRunCall struct { - s *Service - name string - googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Run: Runs an on-demand execution of a DataScan +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: The resource name of the DataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. -// where project refers to a project_id or project_number and -// location_id refers to a GCP region.Only OnDemand data scans are -// allowed. -func (r *ProjectsLocationsDataScansService) Run(name string, googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest) *ProjectsLocationsDataScansRunCall { - c := &ProjectsLocationsDataScansRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1rundatascanrequest = googleclouddataplexv1rundatascanrequest +// - 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 *ProjectsLocationsDataTaxonomiesAttributesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall{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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { + 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 *ProjectsLocationsDataScansRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansRunCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { + 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 *ProjectsLocationsDataScansRunCall) Context(ctx context.Context) *ProjectsLocationsDataScansRunCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { 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 *ProjectsLocationsDataScansRunCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansRunCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) 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.googleclouddataplexv1rundatascanrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.run" call. -// Exactly one of *GoogleCloudDataplexV1RunDataScanResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDataplexV1RunDataScanResponse.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 *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunDataScanResponse, error) { +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11639,7 +17111,7 @@ func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1RunDataScanResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11651,28 +17123,31 @@ func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Runs an on-demand execution of a DataScan", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}:run", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataScans.run", + // "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}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataTaxonomies.attributes.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the DataScan: projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. where project refers to a project_id or project_number and location_id refers to a GCP region.Only OnDemand data scans are allowed.", + // "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/[^/]+/dataScans/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:run", - // "request": { - // "$ref": "GoogleCloudDataplexV1RunDataScanRequest" - // }, + // "path": "v1/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleCloudDataplexV1RunDataScanResponse" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11681,93 +17156,133 @@ func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*G } -// method id "dataplex.projects.locations.dataScans.setIamPolicy": +// method id "dataplex.projects.locations.dataTaxonomies.attributes.list": + +type ProjectsLocationsDataTaxonomiesAttributesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Data Attribute resources in a DataTaxonomy. +// +// - parent: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da +// ta_taxonomy_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) List(parent string) *ProjectsLocationsDataTaxonomiesAttributesListCall { + c := &ProjectsLocationsDataTaxonomiesAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesAttributesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for +// the result. +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesAttributesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} -type ProjectsLocationsDataScansSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataAttributes to return. The service may return fewer than this +// value. If unspecified, at most 10 dataAttributes will be returned. +// The maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesAttributesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// 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 *ProjectsLocationsDataScansService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataScansSetIamPolicyCall { - c := &ProjectsLocationsDataScansSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListDataAttributes call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to ListDataAttributes must match the call that provided the +// page token. +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesAttributesListCall { + 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 *ProjectsLocationsDataScansSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesListCall { 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 *ProjectsLocationsDataTaxonomiesAttributesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesListCall { + 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 *ProjectsLocationsDataScansSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesListCall { 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 *ProjectsLocationsDataScansSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) 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 + 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/{+parent}/attributes") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.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 *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.list" call. +// Exactly one of *GoogleCloudDataplexV1ListDataAttributesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1ListDataAttributesResponse.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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11786,7 +17301,7 @@ func (c *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1ListDataAttributesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11798,28 +17313,46 @@ func (c *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOp } 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}/dataScans/{dataScansId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataScans.setIamPolicy", + // "description": "Lists Data Attribute resources in a DataTaxonomy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.dataTaxonomies.attributes.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "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": "Optional. Filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of DataAttributes to return. The service may return fewer than this value. If unspecified, at most 10 dataAttributes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListDataAttributes call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataAttributes must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the DataTaxonomy: projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, + // "path": "v1/{+parent}/attributes", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudDataplexV1ListDataAttributesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11828,39 +17361,70 @@ func (c *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOp } -// method id "dataplex.projects.locations.dataScans.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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributesResponse) 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 ProjectsLocationsDataScansTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dataplex.projects.locations.dataTaxonomies.attributes.patch": + +type ProjectsLocationsDataTaxonomiesAttributesPatchCall struct { + s *Service + name string + googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute + 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. +// Patch: Updates a DataAttribute resource. // -// - 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 *ProjectsLocationsDataScansService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataScansTestIamPermissionsCall { - c := &ProjectsLocationsDataScansTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: Output only. The relative resource name of the dataAttribute, +// of the form: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da +// taTaxonomy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Patch(name string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { + c := &ProjectsLocationsDataTaxonomiesAttributesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { + 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 *ProjectsLocationsDataScansTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11868,21 +17432,21 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Fields(s ...googleapi // 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 *ProjectsLocationsDataScansTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataScansTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { 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 *ProjectsLocationsDataScansTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) 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_ { @@ -11890,35 +17454,34 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) 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/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", 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 "dataplex.projects.locations.dataScans.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 +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.patch" 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 *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11937,7 +17500,7 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11949,28 +17512,39 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi. } 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}/dataScans/{dataScansId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataScans.testIamPermissions", + // "description": "Updates a DataAttribute resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.dataTaxonomies.attributes.patch", // "parameterOrder": [ - // "resource" + // "name" // ], // "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.", + // "name": { + // "description": "Output only. The relative resource name of the dataAttribute, of the form: projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataScans/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+resource}:testIamPermissions", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // "$ref": "GoogleCloudDataplexV1DataAttribute" // }, // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11979,114 +17553,93 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi. } -// method id "dataplex.projects.locations.dataScans.jobs.get": - -type ProjectsLocationsDataScansJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} +// method id "dataplex.projects.locations.dataTaxonomies.attributes.setIamPolicy": -// Get: Gets a DataScanJob resource. -// -// - name: The resource name of the DataScanJob: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/ -// jobs/{data_scan_job_id} where project refers to a project_id or -// project_number and location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansJobsService) Get(name string) *ProjectsLocationsDataScansJobsGetCall { - c := &ProjectsLocationsDataScansJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Select the DataScanJob view -// to return. Defaults to BASIC. -// -// Possible values: -// -// "DATA_SCAN_JOB_VIEW_UNSPECIFIED" - The API will default to the -// -// BASIC view. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy.Can return NOT_FOUND, +// INVALID_ARGUMENT, and PERMISSION_DENIED errors. // -// "BASIC" - Basic view that does not include spec and result. -// "FULL" - Include everything. -func (c *ProjectsLocationsDataScansJobsGetCall) View(view string) *ProjectsLocationsDataScansJobsGetCall { - c.urlParams_.Set("view", view) +// - 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 *ProjectsLocationsDataTaxonomiesAttributesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall{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 *ProjectsLocationsDataScansJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGetCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { 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 *ProjectsLocationsDataScansJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsGetCall { - 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 *ProjectsLocationsDataScansJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGetCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { 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 *ProjectsLocationsDataScansJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) 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.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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.jobs.get" call. -// Exactly one of *GoogleCloudDataplexV1DataScanJob or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudDataplexV1DataScanJob.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 +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.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 *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScanJob, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12105,7 +17658,7 @@ func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataScanJob{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12117,40 +17670,28 @@ func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets a DataScanJob resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}/jobs/{jobsId}", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataScans.jobs.get", + // "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}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataTaxonomies.attributes.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the DataScanJob: projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "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/[^/]+/dataScans/[^/]+/jobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" - // }, - // "view": { - // "description": "Optional. Select the DataScanJob view to return. Defaults to BASIC.", - // "enum": [ - // "DATA_SCAN_JOB_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "The API will default to the BASIC view.", - // "Basic view that does not include spec and result.", - // "Include everything." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, // "response": { - // "$ref": "GoogleCloudDataplexV1DataScanJob" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12159,133 +17700,97 @@ func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) } -// method id "dataplex.projects.locations.dataScans.jobs.list": +// method id "dataplex.projects.locations.dataTaxonomies.attributes.testIamPermissions": -type ProjectsLocationsDataScansJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists DataScanJobs under the given DataScan. +// 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. // -// - parent: The resource name of the parent environment: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} -// where project refers to a project_id or project_number and -// location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansJobsService) List(parent string) *ProjectsLocationsDataScansJobsListCall { - c := &ProjectsLocationsDataScansJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for -// filtering the results of the ListDataScanJobs request.If unspecified, -// all datascan jobs will be returned. Multiple filters can be applied -// (with AND, OR logical operators). Filters are case-sensitive.Allowed -// fields are: start_time end_timestart_time and end_time expect -// RFC-3339 formatted strings (e.g. 2018-10-08T18:30:00-07:00).For -// instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < -// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs -// between specified start and end times. -func (c *ProjectsLocationsDataScansJobsListCall) Filter(filter string) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataScanJobs to return. The service may return fewer than this value. -// If unspecified, at most 10 DataScanJobs will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataScansJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListDataScanJobs call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to ListDataScanJobs must match the call that provided the -// page token. -func (c *ProjectsLocationsDataScansJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - 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 *ProjectsLocationsDataTaxonomiesAttributesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { + c := &ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall{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 *ProjectsLocationsDataScansJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsListCall { - 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 *ProjectsLocationsDataScansJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsListCall { - c.ifNoneMatch_ = entityTag +// for more information. +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { + 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 *ProjectsLocationsDataScansJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { 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 *ProjectsLocationsDataScansJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) 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.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, "v1/{+parent}/jobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 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{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.jobs.list" call. -// Exactly one of *GoogleCloudDataplexV1ListDataScanJobsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDataplexV1ListDataScanJobsResponse.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 *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScanJobsResponse, error) { +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.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 *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12304,7 +17809,7 @@ func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataScanJobsResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12316,41 +17821,28 @@ func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lists DataScanJobs under the given DataScan.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataScans/{dataScansId}/jobs", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataScans.jobs.list", + // "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}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.dataTaxonomies.attributes.testIamPermissions", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "Optional. An expression for filtering the results of the ListDataScanJobs request.If unspecified, all datascan jobs will be returned. Multiple filters can be applied (with AND, OR logical operators). Filters are case-sensitive.Allowed fields are: start_time end_timestart_time and end_time expect RFC-3339 formatted strings (e.g. 2018-10-08T18:30:00-07:00).For instance, 'start_time \u003e 2018-10-08T00:00:00.123456789Z AND end_time \u003c 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between specified start and end times.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Maximum number of DataScanJobs to return. The service may return fewer than this value. If unspecified, at most 10 DataScanJobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token received from a previous ListDataScanJobs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataScanJobs must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the parent environment: projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where project refers to a project_id or project_number and location_id refers to a GCP region.", + // "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/[^/]+/dataScans/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/jobs", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "GoogleCloudDataplexV1ListDataScanJobsResponse" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12359,64 +17851,40 @@ func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption } -// 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 *ProjectsLocationsDataScansJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScanJobsResponse) 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 "dataplex.projects.locations.dataTaxonomies.create": +// method id "dataplex.projects.locations.entryGroups.create": -type ProjectsLocationsDataTaxonomiesCreateCall struct { - s *Service - parent string - googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsCreateCall struct { + s *Service + parent string + googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a DataTaxonomy resource. +// Create: Creates an EntryGroup // -// - parent: The resource name of the data taxonomy location, of the -// form: projects/{project_number}/locations/{location_id} where -// location_id refers to a GCP region. -func (r *ProjectsLocationsDataTaxonomiesService) Create(parent string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesCreateCall { - c := &ProjectsLocationsDataTaxonomiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the entryGroup, of the form: +// projects/{project_number}/locations/{location_id} where location_id +// refers to a GCP region. +func (r *ProjectsLocationsEntryGroupsService) Create(parent string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsCreateCall { + c := &ProjectsLocationsEntryGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy + c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup return c } -// DataTaxonomyId sets the optional parameter "dataTaxonomyId": -// Required. DataTaxonomy identifier. * Must contain only lowercase -// letters, numbers and hyphens. * Must start with a letter. * Must be -// between 1-63 characters. * Must end with a number or a letter. * Must -// be unique within the Project. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) DataTaxonomyId(dataTaxonomyId string) *ProjectsLocationsDataTaxonomiesCreateCall { - c.urlParams_.Set("dataTaxonomyId", dataTaxonomyId) +// EntryGroupId sets the optional parameter "entryGroupId": Required. +// EntryGroup identifier. +func (c *ProjectsLocationsEntryGroupsCreateCall) EntryGroupId(entryGroupId string) *ProjectsLocationsEntryGroupsCreateCall { + c.urlParams_.Set("entryGroupId", entryGroupId) return c } // ValidateOnly sets the optional parameter "validateOnly": Only // validate the request, but do not perform mutations. The default is // false. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsEntryGroupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -12424,7 +17892,7 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsEntryGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12432,21 +17900,21 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsDataTaxonomiesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsEntryGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsCreateCall { 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 *ProjectsLocationsDataTaxonomiesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsCreateCall) 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_ { @@ -12454,14 +17922,14 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datataxonomy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrygroup) 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}/dataTaxonomies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12474,14 +17942,14 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.create" call. +// Do executes the "dataplex.projects.locations.entryGroups.create" 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 *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12512,21 +17980,21 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Create a DataTaxonomy resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies", + // "description": "Creates an EntryGroup", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups", // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataTaxonomies.create", + // "id": "dataplex.projects.locations.entryGroups.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "dataTaxonomyId": { - // "description": "Required. DataTaxonomy identifier. * Must contain only lowercase letters, numbers and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the Project.", + // "entryGroupId": { + // "description": "Required. EntryGroup identifier.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the data taxonomy location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + // "description": "Required. The resource name of the entryGroup, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -12538,9 +18006,9 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOpt // "type": "boolean" // } // }, - // "path": "v1/{+parent}/dataTaxonomies", + // "path": "v1/{+parent}/entryGroups", // "request": { - // "$ref": "GoogleCloudDataplexV1DataTaxonomy" + // "$ref": "GoogleCloudDataplexV1EntryGroup" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -12552,9 +18020,9 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOpt } -// method id "dataplex.projects.locations.dataTaxonomies.delete": +// method id "dataplex.projects.locations.entryGroups.delete": -type ProjectsLocationsDataTaxonomiesDeleteCall struct { +type ProjectsLocationsEntryGroupsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12562,22 +18030,21 @@ type ProjectsLocationsDataTaxonomiesDeleteCall struct { header_ http.Header } -// Delete: Deletes a DataTaxonomy resource. All attributes within the -// DataTaxonomy must be deleted before the DataTaxonomy can be deleted. +// Delete: Deletes a EntryGroup resource. // -// - name: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da -// ta_taxonomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Delete(name string) *ProjectsLocationsDataTaxonomiesDeleteCall { - c := &ProjectsLocationsDataTaxonomiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryGroup: +// projects/{project_number}/locations/{location_id}/entryGroups/{entry +// _group_id}. +func (r *ProjectsLocationsEntryGroupsService) Delete(name string) *ProjectsLocationsEntryGroupsDeleteCall { + c := &ProjectsLocationsEntryGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Etag sets the optional parameter "etag": If the client provided etag -// value does not match the current etag value,the DeleteDataTaxonomy -// method returns an ABORTED error. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesDeleteCall { +// value does not match the current etag value, the +// DeleteEntryGroupRequest method returns an ABORTED error response +func (c *ProjectsLocationsEntryGroupsDeleteCall) Etag(etag string) *ProjectsLocationsEntryGroupsDeleteCall { c.urlParams_.Set("etag", etag) return c } @@ -12585,7 +18052,7 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesDeleteCall { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12593,21 +18060,21 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsDataTaxonomiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesDeleteCall { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsDeleteCall { 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 *ProjectsLocationsDataTaxonomiesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsDeleteCall) 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_ { @@ -12630,14 +18097,14 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.delete" call. +// Do executes the "dataplex.projects.locations.entryGroups.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 *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12668,23 +18135,23 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before the DataTaxonomy can be deleted.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}", + // "description": "Deletes a EntryGroup resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", // "httpMethod": "DELETE", - // "id": "dataplex.projects.locations.dataTaxonomies.delete", + // "id": "dataplex.projects.locations.entryGroups.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "etag": { - // "description": "Optional. If the client provided etag value does not match the current etag value,the DeleteDataTaxonomy method returns an ABORTED error.", + // "description": "Optional. If the client provided etag value does not match the current etag value, the DeleteEntryGroupRequest method returns an ABORTED error response", // "location": "query", // "type": "string" // }, // "name": { - // "description": "Required. The resource name of the DataTaxonomy: projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}", + // "description": "Required. The resource name of the EntryGroup: projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", // "required": true, // "type": "string" // } @@ -12700,9 +18167,9 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOpt } -// method id "dataplex.projects.locations.dataTaxonomies.get": +// method id "dataplex.projects.locations.entryGroups.get": -type ProjectsLocationsDataTaxonomiesGetCall struct { +type ProjectsLocationsEntryGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12711,13 +18178,13 @@ type ProjectsLocationsDataTaxonomiesGetCall struct { header_ http.Header } -// Get: Retrieves a DataTaxonomy resource. +// Get: Retrieves a EntryGroup resource. // -// - name: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da -// ta_taxonomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocationsDataTaxonomiesGetCall { - c := &ProjectsLocationsDataTaxonomiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryGroup: +// projects/{project_number}/locations/{location_id}/entryGroups/{entry +// _group_id}. +func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocationsEntryGroupsGetCall { + c := &ProjectsLocationsEntryGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12725,7 +18192,7 @@ func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12735,7 +18202,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) 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 *ProjectsLocationsDataTaxonomiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -12743,21 +18210,21 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) 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 *ProjectsLocationsDataTaxonomiesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetCall { 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 *ProjectsLocationsDataTaxonomiesGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsGetCall) 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_ { @@ -12783,15 +18250,14 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.get" call. -// Exactly one of *GoogleCloudDataplexV1DataTaxonomy or error will be +// Do executes the "dataplex.projects.locations.entryGroups.get" call. +// Exactly one of *GoogleCloudDataplexV1EntryGroup or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudDataplexV1DataTaxonomy.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 *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataTaxonomy, error) { +// either *GoogleCloudDataplexV1EntryGroup.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 *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12810,7 +18276,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataTaxonomy{ + ret := &GoogleCloudDataplexV1EntryGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12822,25 +18288,25 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Retrieves a DataTaxonomy resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}", + // "description": "Retrieves a EntryGroup resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataTaxonomies.get", + // "id": "dataplex.projects.locations.entryGroups.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the DataTaxonomy: projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}", + // "description": "Required. The resource name of the EntryGroup: projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudDataplexV1DataTaxonomy" + // "$ref": "GoogleCloudDataplexV1EntryGroup" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12849,9 +18315,9 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption } -// method id "dataplex.projects.locations.dataTaxonomies.getIamPolicy": +// method id "dataplex.projects.locations.entryGroups.getIamPolicy": -type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -12868,8 +18334,8 @@ type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryGroupsService) GetIamPolicy(resource string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { + c := &ProjectsLocationsEntryGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -12887,7 +18353,7 @@ func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) * // resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -12895,7 +18361,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicy // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12905,7 +18371,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -12913,21 +18379,21 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) 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_ { @@ -12953,14 +18419,14 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryGroups.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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12992,9 +18458,9 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.C 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}/dataTaxonomies/{dataTaxonomiesId}:getIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:getIamPolicy", // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataTaxonomies.getIamPolicy", + // "id": "dataplex.projects.locations.entryGroups.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -13008,7 +18474,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.C // "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/[^/]+/dataTaxonomies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", // "required": true, // "type": "string" // } @@ -13024,9 +18490,9 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.C } -// method id "dataplex.projects.locations.dataTaxonomies.list": +// method id "dataplex.projects.locations.entryGroups.list": -type ProjectsLocationsDataTaxonomiesListCall struct { +type ProjectsLocationsEntryGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -13035,45 +18501,45 @@ type ProjectsLocationsDataTaxonomiesListCall struct { header_ http.Header } -// List: Lists DataTaxonomy resources in a project and location. +// List: Lists EntryGroup resources in a project and location. // -// - parent: The resource name of the DataTaxonomy location, of the -// form: projects/{project_number}/locations/{location_id} where -// location_id refers to a GCP region. -func (r *ProjectsLocationsDataTaxonomiesService) List(parent string) *ProjectsLocationsDataTaxonomiesListCall { - c := &ProjectsLocationsDataTaxonomiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the entryGroup location, of the form: +// projects/{project_number}/locations/{location_id} where location_id +// refers to a GCP region. +func (r *ProjectsLocationsEntryGroupsService) List(parent string) *ProjectsLocationsEntryGroupsListCall { + c := &ProjectsLocationsEntryGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataTaxonomiesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Filter(filter string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Order by fields for // the result. -func (c *ProjectsLocationsDataTaxonomiesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// DataTaxonomies to return. The service may return fewer than this -// value. If unspecified, at most 10 DataTaxonomies will be returned. -// The maximum value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataTaxonomiesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesListCall { +// EntryGroups to return. The service may return fewer than this value. +// If unspecified, at most 10 EntryGroups will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsEntryGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListDataTaxonomies call. Provide this to +// received from a previous ListEntryGroups call. Provide this to // retrieve the subsequent page. When paginating, all other parameters -// provided to ListDataTaxonomies must match the call that provided the +// provided to ListEntryGroups must match the call that provided the // page token. -func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -13081,7 +18547,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13091,7 +18557,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) * // 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 *ProjectsLocationsDataTaxonomiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsListCall { c.ifNoneMatch_ = entityTag return c } @@ -13099,21 +18565,21 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) 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 *ProjectsLocationsDataTaxonomiesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsListCall { 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 *ProjectsLocationsDataTaxonomiesListCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsListCall) 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_ { @@ -13126,7 +18592,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13139,18 +18605,16 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.list" call. -// Exactly one of *GoogleCloudDataplexV1ListDataTaxonomiesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "dataplex.projects.locations.entryGroups.list" call. +// Exactly one of *GoogleCloudDataplexV1ListEntryGroupsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDataplexV1ListDataTaxonomiesResponse.ServerResponse.Header -// -// or (if a response was returned at all) in -// +// *GoogleCloudDataplexV1ListEntryGroupsResponse.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 *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataTaxonomiesResponse, error) { +func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13169,7 +18633,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataTaxonomiesResponse{ + ret := &GoogleCloudDataplexV1ListEntryGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13181,10 +18645,10 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Lists DataTaxonomy resources in a project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies", + // "description": "Lists EntryGroup resources in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups", // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataTaxonomies.list", + // "id": "dataplex.projects.locations.entryGroups.list", // "parameterOrder": [ // "parent" // ], @@ -13200,27 +18664,27 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "pageSize": { - // "description": "Optional. Maximum number of DataTaxonomies to return. The service may return fewer than this value. If unspecified, at most 10 DataTaxonomies will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "description": "Optional. Maximum number of EntryGroups to return. The service may return fewer than this value. If unspecified, at most 10 EntryGroups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. Page token received from a previous ListDataTaxonomies call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataTaxonomies must match the call that provided the page token.", + // "description": "Optional. Page token received from a previous ListEntryGroups call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListEntryGroups must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the DataTaxonomy location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + // "description": "Required. The resource name of the entryGroup location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/dataTaxonomies", + // "path": "v1/{+parent}/entryGroups", // "response": { - // "$ref": "GoogleCloudDataplexV1ListDataTaxonomiesResponse" + // "$ref": "GoogleCloudDataplexV1ListEntryGroupsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13232,7 +18696,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOptio // 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 *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataTaxonomiesResponse) error) error { +func (c *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -13250,33 +18714,33 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f f } } -// method id "dataplex.projects.locations.dataTaxonomies.patch": +// method id "dataplex.projects.locations.entryGroups.patch": -type ProjectsLocationsDataTaxonomiesPatchCall struct { - s *Service - name string - googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsPatchCall struct { + s *Service + name string + googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataTaxonomy resource. +// Patch: Updates a EntryGroup resource. // -// - name: Output only. The relative resource name of the DataTaxonomy, -// of the form: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da -// ta_taxonomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Patch(name string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesPatchCall { - c := &ProjectsLocationsDataTaxonomiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The relative resource name of the EntryGroup, of +// the form: +// projects/{project_number}/locations/{location_id}/entryGroups/{entry +// _group_id}. +func (r *ProjectsLocationsEntryGroupsService) Patch(name string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsPatchCall { + c := &ProjectsLocationsEntryGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy + c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup return c } // UpdateMask sets the optional parameter "updateMask": Required. Mask // of fields to update. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -13284,7 +18748,7 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) UpdateMask(updateMask string) // ValidateOnly sets the optional parameter "validateOnly": Only // validate the request, but do not perform mutations. The default is // false. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -13292,7 +18756,7 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly boo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13300,21 +18764,21 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsDataTaxonomiesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsPatchCall { 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 *ProjectsLocationsDataTaxonomiesPatchCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsPatchCall) 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_ { @@ -13322,7 +18786,7 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datataxonomy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrygroup) if err != nil { return nil, err } @@ -13342,14 +18806,14 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.patch" call. +// Do executes the "dataplex.projects.locations.entryGroups.patch" 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 *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13380,18 +18844,18 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Updates a DataTaxonomy resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}", + // "description": "Updates a EntryGroup resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}", // "httpMethod": "PATCH", - // "id": "dataplex.projects.locations.dataTaxonomies.patch", + // "id": "dataplex.projects.locations.entryGroups.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The relative resource name of the DataTaxonomy, of the form: projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.", + // "description": "Output only. The relative resource name of the EntryGroup, of the form: projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", // "required": true, // "type": "string" // }, @@ -13409,7 +18873,7 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOpti // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudDataplexV1DataTaxonomy" + // "$ref": "GoogleCloudDataplexV1EntryGroup" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -13421,9 +18885,9 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOpti } -// method id "dataplex.projects.locations.dataTaxonomies.setIamPolicy": +// method id "dataplex.projects.locations.entryGroups.setIamPolicy": -type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -13440,8 +18904,8 @@ type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryGroupsSetIamPolicyCall { + c := &ProjectsLocationsEntryGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -13450,7 +18914,7 @@ func (r *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, g // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13458,21 +18922,21 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Fields(s ...googleapi. // 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 *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsSetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) 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_ { @@ -13500,14 +18964,14 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryGroups.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 *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13539,9 +19003,9 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.C 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}/dataTaxonomies/{dataTaxonomiesId}:setIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataTaxonomies.setIamPolicy", + // "id": "dataplex.projects.locations.entryGroups.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -13549,7 +19013,7 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.C // "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/[^/]+/dataTaxonomies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", // "required": true, // "type": "string" // } @@ -13568,9 +19032,9 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.C } -// method id "dataplex.projects.locations.dataTaxonomies.testIamPermissions": +// method id "dataplex.projects.locations.entryGroups.testIamPermissions": -type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { +type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -13586,184 +19050,21 @@ type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { // 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 *ProjectsLocationsDataTaxonomiesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { - c := &ProjectsLocationsDataTaxonomiesTestIamPermissionsCall{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 *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { - 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 *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { - 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 *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) 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, "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 "dataplex.projects.locations.dataTaxonomies.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 *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataTaxonomies.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/[^/]+/dataTaxonomies/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataplex.projects.locations.dataTaxonomies.attributes.create": - -type ProjectsLocationsDataTaxonomiesAttributesCreateCall struct { - s *Service - parent string - googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Create a DataAttribute resource. -// -// - parent: The resource name of the parent data taxonomy -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da -// ta_taxonomy_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Create(parent string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { - c := &ProjectsLocationsDataTaxonomiesAttributesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute - return c -} - -// DataAttributeId sets the optional parameter "dataAttributeId": -// Required. DataAttribute identifier. * Must contain only lowercase -// letters, numbers and hyphens. * Must start with a letter. * Must be -// between 1-63 characters. * Must end with a number or a letter. * Must -// be unique within the DataTaxonomy. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) DataAttributeId(dataAttributeId string) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { - c.urlParams_.Set("dataAttributeId", dataAttributeId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": Only -// validate the request, but do not perform mutations. The default is -// false. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - 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 *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { + c := &ProjectsLocationsEntryGroupsTestIamPermissionsCall{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 *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13771,21 +19072,21 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Fields(s ...google // 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 *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { 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 *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) 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_ { @@ -13793,14 +19094,14 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) + 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, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13808,19 +19109,20 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.create" 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 +// Do executes the "dataplex.projects.locations.entryGroups.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 *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13839,7 +19141,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13851,38 +19153,28 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Create a DataAttribute resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes", + // "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}/entryGroups/{entryGroupsId}:testIamPermissions", // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataTaxonomies.attributes.create", + // "id": "dataplex.projects.locations.entryGroups.testIamPermissions", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "dataAttributeId": { - // "description": "Required. DataAttribute identifier. * Must contain only lowercase letters, numbers and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the DataTaxonomy.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the parent data taxonomy projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}", + // "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/[^/]+/dataTaxonomies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", // "required": true, // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+parent}/attributes", + // "path": "v1/{+resource}:testIamPermissions", // "request": { - // "$ref": "GoogleCloudDataplexV1DataAttribute" + // "$ref": "GoogleIamV1TestIamPermissionsRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13891,39 +19183,52 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googlea } -// method id "dataplex.projects.locations.dataTaxonomies.attributes.delete": +// method id "dataplex.projects.locations.entryGroups.entries.create": -type ProjectsLocationsDataTaxonomiesAttributesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesCreateCall struct { + s *Service + parent string + googleclouddataplexv1entry *GoogleCloudDataplexV1Entry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Data Attribute resource. +// Create: Creates an Entry. // -// - name: The resource name of the DataAttribute: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da -// taTaxonomy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Delete(name string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { - c := &ProjectsLocationsDataTaxonomiesAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the parent Entry Group: +// projects/{project}/locations/{location}/entryGroups/{entry_group}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Create(parent string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesCreateCall { + c := &ProjectsLocationsEntryGroupsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1entry = googleclouddataplexv1entry return c } -// Etag sets the optional parameter "etag": If the client provided etag -// value does not match the current etag value, the DeleteDataAttribute -// method returns an ABORTED error response. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { - c.urlParams_.Set("etag", etag) +// EntryId sets the optional parameter "entryId": Required. Entry +// identifier. It has to be unique within an Entry Group.Entries +// corresponding to Google Cloud resources use Entry ID format based on +// Full Resource Names +// (https://cloud.google.com/apis/design/resource_names#full_resource_name). +// The format is a Full Resource Name of the resource without the prefix +// double slashes in the API Service Name part of Full Resource Name. +// This allows retrieval of entries using their associated resource +// name.For example if the Full Resource Name of a resource is +// //library.googleapis.com/shelves/shelf1/books/book2, then the +// suggested entry_id is +// library.googleapis.com/shelves/shelf1/books/book2.It is also +// suggested to follow the same convention for entries corresponding to +// resources from other providers or systems than Google Cloud.The +// maximum size of the field is 4000 characters. +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) EntryId(entryId string) *ProjectsLocationsEntryGroupsEntriesCreateCall { + c.urlParams_.Set("entryId", entryId) 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 *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13931,21 +19236,21 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Fields(s ...google // 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 *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesCreateCall { 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 *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) 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_ { @@ -13953,29 +19258,34 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entry) + 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Do executes the "dataplex.projects.locations.entryGroups.entries.create" call. +// Exactly one of *GoogleCloudDataplexV1Entry 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 +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13994,7 +19304,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14006,30 +19316,33 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googlea } return ret, nil // { - // "description": "Deletes a Data Attribute resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}", - // "httpMethod": "DELETE", - // "id": "dataplex.projects.locations.dataTaxonomies.attributes.delete", + // "description": "Creates an Entry.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.entryGroups.entries.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "etag": { - // "description": "Optional. If the client provided etag value does not match the current etag value, the DeleteDataAttribute method returns an ABORTED error response.", + // "entryId": { + // "description": "Required. Entry identifier. It has to be unique within an Entry Group.Entries corresponding to Google Cloud resources use Entry ID format based on Full Resource Names (https://cloud.google.com/apis/design/resource_names#full_resource_name). The format is a Full Resource Name of the resource without the prefix double slashes in the API Service Name part of Full Resource Name. This allows retrieval of entries using their associated resource name.For example if the Full Resource Name of a resource is //library.googleapis.com/shelves/shelf1/books/book2, then the suggested entry_id is library.googleapis.com/shelves/shelf1/books/book2.It is also suggested to follow the same convention for entries corresponding to resources from other providers or systems than Google Cloud.The maximum size of the field is 4000 characters.", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "Required. The resource name of the DataAttribute: projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}", + // "parent": { + // "description": "Required. The resource name of the parent Entry Group: projects/{project}/locations/{location}/entryGroups/{entry_group}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/entries", + // "request": { + // "$ref": "GoogleCloudDataplexV1Entry" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDataplexV1Entry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14038,24 +19351,23 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googlea } -// method id "dataplex.projects.locations.dataTaxonomies.attributes.get": +// method id "dataplex.projects.locations.entryGroups.entries.delete": -type ProjectsLocationsDataTaxonomiesAttributesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a Data Attribute resource. +// Delete: Deletes an Entry. // -// - name: The resource name of the dataAttribute: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da -// taTaxonomy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { - c := &ProjectsLocationsDataTaxonomiesAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/en +// tries/{entry}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesDeleteCall { + c := &ProjectsLocationsEntryGroupsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14063,54 +19375,41 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetCall { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { - 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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetCall { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) 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) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -14121,15 +19420,14 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.get" call. -// Exactly one of *GoogleCloudDataplexV1DataAttribute or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudDataplexV1DataAttribute.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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttribute, error) { +// Do executes the "dataplex.projects.locations.entryGroups.entries.delete" call. +// Exactly one of *GoogleCloudDataplexV1Entry or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14148,7 +19446,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataAttribute{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14160,25 +19458,25 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Retrieves a Data Attribute resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataTaxonomies.attributes.get", + // "description": "Deletes an Entry.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.entryGroups.entries.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the dataAttribute: projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}", + // "description": "Required. The resource name of the Entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/.*$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudDataplexV1DataAttribute" + // "$ref": "GoogleCloudDataplexV1Entry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14187,53 +19485,72 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi. } -// method id "dataplex.projects.locations.dataTaxonomies.attributes.getIamPolicy": +// method id "dataplex.projects.locations.entryGroups.entries.get": -type ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsEntriesGetCall struct { s *Service - resource string + name 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 a single entry. // -// - 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 *ProjectsLocationsDataTaxonomiesAttributesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The resource name of the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/en +// tries/{entry}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Get(name string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c := &ProjectsLocationsEntryGroupsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// AspectTypes sets the optional parameter "aspectTypes": Limits the +// aspects returned to the provided aspect types. Only works if the +// CUSTOM view is selected. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) + return c +} + +// Paths sets the optional parameter "paths": Limits the aspects +// returned to those associated with the provided paths within the +// Entry. Only works if the CUSTOM view is selected. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Paths(paths ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// View sets the optional parameter "view": View for controlling which +// parts of an entry are to be returned. +// +// Possible values: +// +// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. +// "BASIC" - Returns entry only, without aspects. +// "FULL" - Returns all required aspects as well as the keys of all +// +// non-required aspects. +// +// "CUSTOM" - Returns aspects matching custom fields in +// +// GetEntryRequest. If the number of aspects would exceed 100, the first +// 100 will be returned. +// +// "ALL" - Returns all aspects. If the number of aspects would exceed +// +// 100, the first 100 will be returned. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) View(view string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.Set("view", view) 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14243,7 +19560,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ... // 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -14251,21 +19568,21 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) IfNoneMatch( // 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetCall { 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) 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_ { @@ -14278,7 +19595,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(al 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 { @@ -14286,19 +19603,19 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(al } 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 "dataplex.projects.locations.dataTaxonomies.attributes.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 +// Do executes the "dataplex.projects.locations.entryGroups.entries.get" call. +// Exactly one of *GoogleCloudDataplexV1Entry or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14317,7 +19634,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14329,31 +19646,56 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...g } 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}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}:getIamPolicy", + // "description": "Gets a single entry.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataTaxonomies.attributes.getIamPolicy", + // "id": "dataplex.projects.locations.entryGroups.entries.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", + // "aspectTypes": { + // "description": "Optional. Limits the aspects returned to the provided aspect types. Only works if the CUSTOM view is selected.", // "location": "query", - // "type": "integer" + // "repeated": true, + // "type": "string" // }, - // "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": "Required. The resource name of the Entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/.*$", // "required": true, // "type": "string" + // }, + // "paths": { + // "description": "Optional. Limits the aspects returned to those associated with the provided paths within the Entry. Only works if the CUSTOM view is selected.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. View for controlling which parts of an entry are to be returned.", + // "enum": [ + // "ENTRY_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL", + // "CUSTOM", + // "ALL" + // ], + // "enumDescriptions": [ + // "Unspecified EntryView. Defaults to FULL.", + // "Returns entry only, without aspects.", + // "Returns all required aspects as well as the keys of all non-required aspects.", + // "Returns aspects matching custom fields in GetEntryRequest. If the number of aspects would exceed 100, the first 100 will be returned.", + // "Returns all aspects. If the number of aspects would exceed 100, the first 100 will be returned." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudDataplexV1Entry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14362,9 +19704,9 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...g } -// method id "dataplex.projects.locations.dataTaxonomies.attributes.list": +// method id "dataplex.projects.locations.entryGroups.entries.list": -type ProjectsLocationsDataTaxonomiesAttributesListCall struct { +type ProjectsLocationsEntryGroupsEntriesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -14373,45 +19715,40 @@ type ProjectsLocationsDataTaxonomiesAttributesListCall struct { header_ http.Header } -// List: Lists Data Attribute resources in a DataTaxonomy. +// List: Lists entries within an entry group. // -// - parent: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da -// ta_taxonomy_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) List(parent string) *ProjectsLocationsDataTaxonomiesAttributesListCall { - c := &ProjectsLocationsDataTaxonomiesAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent Entry Group: +// projects/{project}/locations/{location}/entryGroups/{entry_group}. +func (r *ProjectsLocationsEntryGroupsEntriesService) List(parent string) *ProjectsLocationsEntryGroupsEntriesListCall { + c := &ProjectsLocationsEntryGroupsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +// Filter sets the optional parameter "filter": A filter on the entries +// to return. Filters are case-sensitive. The request can be filtered by +// the following fields: entry_type, display_name. The comparison +// operators are =, !=, <, >, <=, >= (strings are compared according to +// lexical order) The logical operators AND, OR, NOT can be used in the +// filter. Example filter expressions: +// "display_name=AnExampleDisplayName" +// "entry_type=projects/example-project/locations/global/entryTypes/examp +// le-entry_type" "entry_type=projects/a* OR "entry_type=projects/k*" +// "NOT display_name=AnotherExampleDisplayName" +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Filter(filter string) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Order by fields for -// the result. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesAttributesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataAttributes to return. The service may return fewer than this -// value. If unspecified, at most 10 dataAttributes will be returned. -// The maximum value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesAttributesListCall { +// PageSize sets the optional parameter "pageSize": +func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token -// received from a previous ListDataAttributes call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to ListDataAttributes must match the call that provided the -// page token. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +// PageToken sets the optional parameter "pageToken": The pagination +// token returned by a previous request. +func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -14419,7 +19756,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14429,7 +19766,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleap // 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 *ProjectsLocationsDataTaxonomiesAttributesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesListCall { c.ifNoneMatch_ = entityTag return c } @@ -14437,21 +19774,21 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) IfNoneMatch(entityTa // 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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesListCall { 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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) 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_ { @@ -14464,7 +19801,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14477,18 +19814,16 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.list" call. -// Exactly one of *GoogleCloudDataplexV1ListDataAttributesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "dataplex.projects.locations.entryGroups.entries.list" call. +// Exactly one of *GoogleCloudDataplexV1ListEntriesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDataplexV1ListDataAttributesResponse.ServerResponse.Header -// -// or (if a response was returned at all) in -// +// *GoogleCloudDataplexV1ListEntriesResponse.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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributesResponse, error) { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14507,7 +19842,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataAttributesResponse{ + ret := &GoogleCloudDataplexV1ListEntriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14519,46 +19854,40 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lists Data Attribute resources in a DataTaxonomy.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes", + // "description": "Lists entries within an entry group.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries", // "httpMethod": "GET", - // "id": "dataplex.projects.locations.dataTaxonomies.attributes.list", + // "id": "dataplex.projects.locations.entryGroups.entries.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "filter": { - // "description": "Optional. Filter request.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Order by fields for the result.", + // "description": "Optional. A filter on the entries to return. Filters are case-sensitive. The request can be filtered by the following fields: entry_type, display_name. The comparison operators are =, !=, \u003c, \u003e, \u003c=, \u003e= (strings are compared according to lexical order) The logical operators AND, OR, NOT can be used in the filter. Example filter expressions: \"display_name=AnExampleDisplayName\" \"entry_type=projects/example-project/locations/global/entryTypes/example-entry_type\" \"entry_type=projects/a* OR \"entry_type=projects/k*\" \"NOT display_name=AnotherExampleDisplayName\"", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Optional. Maximum number of DataAttributes to return. The service may return fewer than this value. If unspecified, at most 10 dataAttributes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. Page token received from a previous ListDataAttributes call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDataAttributes must match the call that provided the page token.", + // "description": "Optional. The pagination token returned by a previous request.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the DataTaxonomy: projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}", + // "description": "Required. The resource name of the parent Entry Group: projects/{project}/locations/{location}/entryGroups/{entry_group}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/attributes", + // "path": "v1/{+parent}/entries", // "response": { - // "$ref": "GoogleCloudDataplexV1ListDataAttributesResponse" + // "$ref": "GoogleCloudDataplexV1ListEntriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14570,7 +19899,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi // 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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributesResponse) error) error { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntriesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -14588,49 +19917,73 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Co } } -// method id "dataplex.projects.locations.dataTaxonomies.attributes.patch": +// method id "dataplex.projects.locations.entryGroups.entries.patch": -type ProjectsLocationsDataTaxonomiesAttributesPatchCall struct { - s *Service - name string - googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesPatchCall struct { + s *Service + name string + googleclouddataplexv1entry *GoogleCloudDataplexV1Entry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataAttribute resource. +// Patch: Updates an Entry. // -// - name: Output only. The relative resource name of the dataAttribute, -// of the form: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{da -// taTaxonomy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Patch(name string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { - c := &ProjectsLocationsDataTaxonomiesAttributesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. The relative resource name of the Entry, of the +// form: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/en +// tries/{entry}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Patch(name string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c := &ProjectsLocationsEntryGroupsEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute + c.googleclouddataplexv1entry = googleclouddataplexv1entry return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// AllowMissing sets the optional parameter "allowMissing": If set to +// true and the entry does not exist, it will be created. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// ValidateOnly sets the optional parameter "validateOnly": Only -// validate the request, but do not perform mutations. The default is -// false. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// AspectKeys sets the optional parameter "aspectKeys": The map keys of +// the Aspects which should be modified. Supports the following +// syntaxes: * - matches aspect on given type and empty path * @path - +// matches aspect on given type and specified path * * - matches aspects +// on given type for all paths * *@path - matches aspects of all types +// on the given pathExisting aspects matching the syntax will not be +// removed unless delete_missing_aspects is set to true.If this field is +// left empty, it will be treated as specifying exactly those Aspects +// present in the request. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AspectKeys(aspectKeys ...string) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.SetMulti("aspectKeys", append([]string{}, aspectKeys...)) + return c +} + +// DeleteMissingAspects sets the optional parameter +// "deleteMissingAspects": If set to true and the aspect_keys specify +// aspect ranges, any existing aspects from that range not provided in +// the request will be deleted. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) DeleteMissingAspects(deleteMissingAspects bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.Set("deleteMissingAspects", fmt.Sprint(deleteMissingAspects)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Mask of fields +// to update. To update Aspects, the update_mask must contain the value +// "aspects".If the update_mask is empty, all modifiable fields present +// in the request will be updated. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesPatchCall { + 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 *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14638,21 +19991,21 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Fields(s ...googlea // 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 *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesPatchCall { 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 *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) 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_ { @@ -14660,7 +20013,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entry) if err != nil { return nil, err } @@ -14680,14 +20033,14 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Do executes the "dataplex.projects.locations.entryGroups.entries.patch" call. +// Exactly one of *GoogleCloudDataplexV1Entry 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 +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14706,7 +20059,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14718,39 +20071,50 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleap } return ret, nil // { - // "description": "Updates a DataAttribute resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}", + // "description": "Updates an Entry.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryGroups/{entryGroupsId}/entries/{entriesId}", // "httpMethod": "PATCH", - // "id": "dataplex.projects.locations.dataTaxonomies.attributes.patch", + // "id": "dataplex.projects.locations.entryGroups.entries.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to true and the entry does not exist, it will be created.", + // "location": "query", + // "type": "boolean" + // }, + // "aspectKeys": { + // "description": "Optional. The map keys of the Aspects which should be modified. Supports the following syntaxes: * - matches aspect on given type and empty path * @path - matches aspect on given type and specified path * * - matches aspects on given type for all paths * *@path - matches aspects of all types on the given pathExisting aspects matching the syntax will not be removed unless delete_missing_aspects is set to true.If this field is left empty, it will be treated as specifying exactly those Aspects present in the request.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "deleteMissingAspects": { + // "description": "Optional. If set to true and the aspect_keys specify aspect ranges, any existing aspects from that range not provided in the request will be deleted.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "Output only. The relative resource name of the dataAttribute, of the form: projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.", + // "description": "Identifier. The relative resource name of the Entry, of the form: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/.*$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Required. Mask of fields to update.", + // "description": "Optional. Mask of fields to update. To update Aspects, the update_mask must contain the value \"aspects\".If the update_mask is empty, all modifiable fields present in the request will be updated.", // "format": "google-fieldmask", // "location": "query", // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudDataplexV1DataAttribute" + // "$ref": "GoogleCloudDataplexV1Entry" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDataplexV1Entry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14759,36 +20123,48 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleap } -// method id "dataplex.projects.locations.dataTaxonomies.attributes.setIamPolicy": +// method id "dataplex.projects.locations.entryTypes.create": -type ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall struct { +type ProjectsLocationsEntryTypesCreateCall struct { s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + parent string + googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType 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. +// Create: Creates an EntryType // -// - 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 *ProjectsLocationsDataTaxonomiesAttributesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - parent: The resource name of the EntryType, of the form: +// projects/{project_number}/locations/{location_id} where location_id +// refers to a GCP region. +func (r *ProjectsLocationsEntryTypesService) Create(parent string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesCreateCall { + c := &ProjectsLocationsEntryTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1entrytype = googleclouddataplexv1entrytype + return c +} + +// EntryTypeId sets the optional parameter "entryTypeId": Required. +// EntryType identifier. +func (c *ProjectsLocationsEntryTypesCreateCall) EntryTypeId(entryTypeId string) *ProjectsLocationsEntryTypesCreateCall { + c.urlParams_.Set("entryTypeId", entryTypeId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsEntryTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesCreateCall { + 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 *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14796,21 +20172,21 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Fields(s ... // 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 *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesCreateCall { 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 *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesCreateCall) 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_ { @@ -14818,14 +20194,14 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) 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/{+parent}/entryTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14833,19 +20209,19 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) doRequest(al } 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 "dataplex.projects.locations.dataTaxonomies.attributes.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 +// Do executes the "dataplex.projects.locations.entryTypes.create" 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 *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14864,7 +20240,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14876,28 +20252,38 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...g } 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}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}:setIamPolicy", + // "description": "Creates an EntryType", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes", // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataTaxonomies.attributes.setIamPolicy", + // "id": "dataplex.projects.locations.entryTypes.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "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.", + // "entryTypeId": { + // "description": "Required. EntryType identifier.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the EntryType, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+resource}:setIamPolicy", + // "path": "v1/{+parent}/entryTypes", // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" + // "$ref": "GoogleCloudDataplexV1EntryType" // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14906,39 +20292,39 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...g } -// method id "dataplex.projects.locations.dataTaxonomies.attributes.testIamPermissions": - -type ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +// method id "dataplex.projects.locations.entryTypes.delete": -// 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 *ProjectsLocationsDataTaxonomiesAttributesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { - c := &ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +type ProjectsLocationsEntryTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a EntryType resource. +// +// - name: The resource name of the EntryType: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_ +// type_id}. +func (r *ProjectsLocationsEntryTypesService) Delete(name string) *ProjectsLocationsEntryTypesDeleteCall { + c := &ProjectsLocationsEntryTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If the client provided etag +// value does not match the current etag value, the +// DeleteEntryTypeRequest method returns an ABORTED error response +func (c *ProjectsLocationsEntryTypesDeleteCall) Etag(etag string) *ProjectsLocationsEntryTypesDeleteCall { + c.urlParams_.Set("etag", etag) 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 *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { +func (c *ProjectsLocationsEntryTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14946,21 +20332,21 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Fields // 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 *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { +func (c *ProjectsLocationsEntryTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesDeleteCall { 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 *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesDeleteCall) 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_ { @@ -14968,35 +20354,29 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) doRequ } 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, "v1/{+resource}:testIamPermissions") + 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 "dataplex.projects.locations.dataTaxonomies.attributes.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 +// Do executes the "dataplex.projects.locations.entryTypes.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 *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15015,7 +20395,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15027,28 +20407,30 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opt } 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}/dataTaxonomies/{dataTaxonomiesId}/attributes/{attributesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.dataTaxonomies.attributes.testIamPermissions", + // "description": "Deletes a EntryType resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes/{entryTypesId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.entryTypes.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "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.", + // "etag": { + // "description": "Optional. If the client provided etag value does not match the current etag value, the DeleteEntryTypeRequest method returns an ABORTED error response", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the EntryType: projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15057,53 +20439,32 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opt } -// method id "dataplex.projects.locations.entryGroups.getIamPolicy": +// method id "dataplex.projects.locations.entryTypes.get": -type ProjectsLocationsEntryGroupsGetIamPolicyCall struct { +type ProjectsLocationsEntryTypesGetCall struct { s *Service - resource string + name 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: Retrieves a EntryType resource. // -// - 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 *ProjectsLocationsEntryGroupsService) GetIamPolicy(resource string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { - c := &ProjectsLocationsEntryGroupsGetIamPolicyCall{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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryGroupsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The resource name of the EntryType: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_ +// type_id}. +func (r *ProjectsLocationsEntryTypesService) Get(name string) *ProjectsLocationsEntryTypesGetCall { + c := &ProjectsLocationsEntryTypesGetCall{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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15113,7 +20474,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Fie // 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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -15121,21 +20482,21 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) IfNoneMatch(entityTag str // 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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetCall { 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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesGetCall) 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_ { @@ -15148,7 +20509,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*h 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 { @@ -15156,19 +20517,19 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*h } 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 "dataplex.projects.locations.entryGroups.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 +// Do executes the "dataplex.projects.locations.entryTypes.get" call. +// Exactly one of *GoogleCloudDataplexV1EntryType or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudDataplexV1EntryType.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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15187,7 +20548,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1EntryType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15199,31 +20560,25 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.Call } 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}/entryGroups/{entryGroupsId}:getIamPolicy", + // "description": "Retrieves a EntryType resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes/{entryTypesId}", // "httpMethod": "GET", - // "id": "dataplex.projects.locations.entryGroups.getIamPolicy", + // "id": "dataplex.projects.locations.entryTypes.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": "Required. The resource name of the EntryType: projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudDataplexV1EntryType" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15232,75 +20587,100 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.Call } -// method id "dataplex.projects.locations.entryGroups.setIamPolicy": +// method id "dataplex.projects.locations.entryTypes.getIamPolicy": -type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesGetIamPolicyCall struct { + s *Service + resource 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. +// 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 -// specified. See Resource names +// requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryGroupsSetIamPolicyCall { - c := &ProjectsLocationsEntryGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c := &ProjectsLocationsEntryTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryTypesGetIamPolicyCall { + 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 *ProjectsLocationsEntryGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsSetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetIamPolicyCall { 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetIamPolicyCall { + 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 *ProjectsLocationsEntryGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsSetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetIamPolicyCall { 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 *ProjectsLocationsEntryGroupsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) 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 + 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/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -15311,14 +20691,14 @@ func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryTypes.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 *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15349,26 +20729,29 @@ func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.Call } 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}/entryGroups/{entryGroupsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.entryGroups.setIamPolicy", + // "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}/entryTypes/{entryTypesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.entryTypes.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 specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "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/[^/]+/entryGroups/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, + // "path": "v1/{+resource}:getIamPolicy", // "response": { // "$ref": "GoogleIamV1Policy" // }, @@ -15379,97 +20762,135 @@ func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.Call } -// method id "dataplex.projects.locations.entryGroups.testIamPermissions": +// method id "dataplex.projects.locations.entryTypes.list": + +type ProjectsLocationsEntryTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists EntryType resources in a project and location. +// +// - parent: The resource name of the EntryType location, of the form: +// projects/{project_number}/locations/{location_id} where location_id +// refers to a GCP region. +func (r *ProjectsLocationsEntryTypesService) List(parent string) *ProjectsLocationsEntryTypesListCall { + c := &ProjectsLocationsEntryTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. Filters +// are case-sensitive. The following formats are supported:labels.key1 = +// "value1" labels:key1 name = "value" These restrictions can be +// coinjoined with AND, OR and NOT conjunctions. +func (c *ProjectsLocationsEntryTypesListCall) Filter(filter string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields (name +// or create_time) for the result. If not specified, the ordering is +// undefined. +func (c *ProjectsLocationsEntryTypesListCall) OrderBy(orderBy string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} -type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": Maximum number of +// EntryTypes to return. The service may return fewer than this value. +// If unspecified, at most 10 EntryTypes will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsEntryTypesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// 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 *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { - c := &ProjectsLocationsEntryGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// PageToken sets the optional parameter "pageToken": Page token +// received from a previous ListEntryTypes call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to ListEntryTypes must match the call that provided the page +// token. +func (c *ProjectsLocationsEntryTypesListCall) PageToken(pageToken string) *ProjectsLocationsEntryTypesListCall { + 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 *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { +func (c *ProjectsLocationsEntryTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesListCall { 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 *ProjectsLocationsEntryTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesListCall { + 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 *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { +func (c *ProjectsLocationsEntryTypesListCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesListCall { 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 *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesListCall) 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 + 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}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.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 *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// Do executes the "dataplex.projects.locations.entryTypes.list" call. +// Exactly one of *GoogleCloudDataplexV1ListEntryTypesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDataplexV1ListEntryTypesResponse.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 *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryTypesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15488,7 +20909,7 @@ func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudDataplexV1ListEntryTypesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15500,28 +20921,46 @@ func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleap } 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}/entryGroups/{entryGroupsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "dataplex.projects.locations.entryGroups.testIamPermissions", + // "description": "Lists EntryType resources in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.entryTypes.list", // "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.", + // "filter": { + // "description": "Optional. Filter request. Filters are case-sensitive. The following formats are supported:labels.key1 = \"value1\" labels:key1 name = \"value\" These restrictions can be coinjoined with AND, OR and NOT conjunctions.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields (name or create_time) for the result. If not specified, the ordering is undefined.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of EntryTypes to return. The service may return fewer than this value. If unspecified, at most 10 EntryTypes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token received from a previous ListEntryTypes call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListEntryTypes must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the EntryType location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1/{+parent}/entryTypes", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleCloudDataplexV1ListEntryTypesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15530,118 +20969,127 @@ func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleap } -// method id "dataplex.projects.locations.entryTypes.getIamPolicy": +// 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 *ProjectsLocationsEntryTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryTypesResponse) 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 ProjectsLocationsEntryTypesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "dataplex.projects.locations.entryTypes.patch": + +type ProjectsLocationsEntryTypesPatchCall struct { + s *Service + name string + googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType + 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. +// Patch: Updates a EntryType resource. // -// - 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 *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryTypesGetIamPolicyCall { - c := &ProjectsLocationsEntryTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: Output only. The relative resource name of the EntryType, of +// the form: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_ +// type_id}. +func (r *ProjectsLocationsEntryTypesService) Patch(name string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesPatchCall { + c := &ProjectsLocationsEntryTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1entrytype = googleclouddataplexv1entrytype 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryTypesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. +func (c *ProjectsLocationsEntryTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryTypesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only +// validate the request, but do not perform mutations. The default is +// false. +func (c *ProjectsLocationsEntryTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesPatchCall { + 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesPatchCall { 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetIamPolicyCall { - 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsEntryTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesPatchCall { 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesPatchCall) 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.googleclouddataplexv1entrytype) + 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}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", 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 "dataplex.projects.locations.entryTypes.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 +// Do executes the "dataplex.projects.locations.entryTypes.patch" 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15660,7 +21108,7 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15672,31 +21120,39 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallO } 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}/entryTypes/{entryTypesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "dataplex.projects.locations.entryTypes.getIamPolicy", + // "description": "Updates a EntryType resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryTypes/{entryTypesId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.entryTypes.patch", // "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": "Output only. The relative resource name of the EntryType, of the form: projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1EntryType" + // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/memcache/v1/memcache-api.json b/memcache/v1/memcache-api.json index c2f8e37838b..6d52b8ebca0 100644 --- a/memcache/v1/memcache-api.json +++ b/memcache/v1/memcache-api.json @@ -584,7 +584,7 @@ } } }, - "revision": "20240104", + "revision": "20240307", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1333,7 +1333,7 @@ "type": "object" }, "MaintenancePolicy": { - "description": "LINT.IfChange Defines policies to service maintenance events.", + "description": "Defines policies to service maintenance events.", "id": "MaintenancePolicy", "properties": { "createTime": { diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index c0ca039aefb..244b16d42ef 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -1389,8 +1389,7 @@ func (s *LocationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MaintenancePolicy: LINT.IfChange Defines policies to service -// maintenance events. +// MaintenancePolicy: 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/memcache/v1beta2/memcache-api.json b/memcache/v1beta2/memcache-api.json index fea12ef7f18..3363b676ecb 100644 --- a/memcache/v1beta2/memcache-api.json +++ b/memcache/v1beta2/memcache-api.json @@ -612,7 +612,7 @@ } } }, - "revision": "20240104", + "revision": "20240307", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1384,7 +1384,7 @@ "type": "object" }, "MaintenancePolicy": { - "description": "LINT.IfChange Defines policies to service maintenance events.", + "description": "Defines policies to service maintenance events.", "id": "MaintenancePolicy", "properties": { "createTime": { diff --git a/memcache/v1beta2/memcache-gen.go b/memcache/v1beta2/memcache-gen.go index 11e5850eaff..163b566c4dd 100644 --- a/memcache/v1beta2/memcache-gen.go +++ b/memcache/v1beta2/memcache-gen.go @@ -1426,8 +1426,7 @@ func (s *LocationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MaintenancePolicy: LINT.IfChange Defines policies to service -// maintenance events. +// MaintenancePolicy: 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/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index 8c95c76279b..c3a63d3a436 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -1359,40 +1359,6 @@ ] } } - }, - "migrationExecutions": { - "methods": { - "delete": { - "description": "Deletes a single migration execution.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", - "httpMethod": "DELETE", - "id": "metastore.projects.locations.services.migrationExecutions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } } @@ -1401,7 +1367,7 @@ } } }, - "revision": "20240228", + "revision": "20240312", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index 3637b6694d4..62913c73443 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -207,7 +207,6 @@ func NewProjectsLocationsServicesService(s *APIService) *ProjectsLocationsServic rs := &ProjectsLocationsServicesService{s: s} rs.Backups = NewProjectsLocationsServicesBackupsService(s) rs.MetadataImports = NewProjectsLocationsServicesMetadataImportsService(s) - rs.MigrationExecutions = NewProjectsLocationsServicesMigrationExecutionsService(s) return rs } @@ -217,8 +216,6 @@ type ProjectsLocationsServicesService struct { Backups *ProjectsLocationsServicesBackupsService MetadataImports *ProjectsLocationsServicesMetadataImportsService - - MigrationExecutions *ProjectsLocationsServicesMigrationExecutionsService } func NewProjectsLocationsServicesBackupsService(s *APIService) *ProjectsLocationsServicesBackupsService { @@ -239,15 +236,6 @@ type ProjectsLocationsServicesMetadataImportsService struct { s *APIService } -func NewProjectsLocationsServicesMigrationExecutionsService(s *APIService) *ProjectsLocationsServicesMigrationExecutionsService { - rs := &ProjectsLocationsServicesMigrationExecutionsService{s: s} - return rs -} - -type ProjectsLocationsServicesMigrationExecutionsService struct { - s *APIService -} - // AlterMetadataResourceLocationRequest: Request message for // DataprocMetastore.AlterMetadataResourceLocation. type AlterMetadataResourceLocationRequest struct { @@ -9196,158 +9184,3 @@ func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Do(opts ...googleapi // } } - -// method id "metastore.projects.locations.services.migrationExecutions.delete": - -type ProjectsLocationsServicesMigrationExecutionsDeleteCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single migration execution. -// -// - name: The relative resource name of the migrationExecution to -// delete, in the following -// form:projects/{project_number}/locations/{location_id}/services/{ser -// vice_id}/migrationExecutions/{migration_execution_id}. -func (r *ProjectsLocationsServicesMigrationExecutionsService) Delete(name string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { - c := &ProjectsLocationsServicesMigrationExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": A request ID. -// Specify a unique request ID to allow the server to ignore the request -// if it has completed. The server will ignore subsequent requests that -// provide a duplicate request ID for at least 60 minutes after the -// first request.For example, if an initial request times out, followed -// by another request with the same request ID, the server ignores the -// second request to prevent the creation of duplicate commitments.The -// request ID must be a valid UUID -// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) -// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. -func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { - 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { - 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { - 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) 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 "metastore.projects.locations.services.migrationExecutions.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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) 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 a single migration execution.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", - // "httpMethod": "DELETE", - // "id": "metastore.projects.locations.services.migrationExecutions.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index 3bbaaf954b8..6f22944b151 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1599,40 +1599,6 @@ ] } } - }, - "migrationExecutions": { - "methods": { - "delete": { - "description": "Deletes a single migration execution.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", - "httpMethod": "DELETE", - "id": "metastore.projects.locations.services.migrationExecutions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } } @@ -1641,7 +1607,7 @@ } } }, - "revision": "20240228", + "revision": "20240312", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index 8b198cb96d2..4c5ce29b252 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -208,7 +208,6 @@ func NewProjectsLocationsServicesService(s *APIService) *ProjectsLocationsServic rs.Backups = NewProjectsLocationsServicesBackupsService(s) rs.Databases = NewProjectsLocationsServicesDatabasesService(s) rs.MetadataImports = NewProjectsLocationsServicesMetadataImportsService(s) - rs.MigrationExecutions = NewProjectsLocationsServicesMigrationExecutionsService(s) return rs } @@ -220,8 +219,6 @@ type ProjectsLocationsServicesService struct { Databases *ProjectsLocationsServicesDatabasesService MetadataImports *ProjectsLocationsServicesMetadataImportsService - - MigrationExecutions *ProjectsLocationsServicesMigrationExecutionsService } func NewProjectsLocationsServicesBackupsService(s *APIService) *ProjectsLocationsServicesBackupsService { @@ -263,15 +260,6 @@ type ProjectsLocationsServicesMetadataImportsService struct { s *APIService } -func NewProjectsLocationsServicesMigrationExecutionsService(s *APIService) *ProjectsLocationsServicesMigrationExecutionsService { - rs := &ProjectsLocationsServicesMigrationExecutionsService{s: s} - return rs -} - -type ProjectsLocationsServicesMigrationExecutionsService struct { - s *APIService -} - // AlterMetadataResourceLocationRequest: Request message for // DataprocMetastore.AlterMetadataResourceLocation. type AlterMetadataResourceLocationRequest struct { @@ -10592,158 +10580,3 @@ func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Do(opts ...googleapi // } } - -// method id "metastore.projects.locations.services.migrationExecutions.delete": - -type ProjectsLocationsServicesMigrationExecutionsDeleteCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single migration execution. -// -// - name: The relative resource name of the migrationExecution to -// delete, in the following -// form:projects/{project_number}/locations/{location_id}/services/{ser -// vice_id}/migrationExecutions/{migration_execution_id}. -func (r *ProjectsLocationsServicesMigrationExecutionsService) Delete(name string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { - c := &ProjectsLocationsServicesMigrationExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": A request ID. -// Specify a unique request ID to allow the server to ignore the request -// if it has completed. The server will ignore subsequent requests that -// provide a duplicate request ID for at least 60 minutes after the -// first request.For example, if an initial request times out, followed -// by another request with the same request ID, the server ignores the -// second request to prevent the creation of duplicate commitments.The -// request ID must be a valid UUID -// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) -// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. -func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { - 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { - 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { - 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) 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 "metastore.projects.locations.services.migrationExecutions.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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) 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 a single migration execution.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", - // "httpMethod": "DELETE", - // "id": "metastore.projects.locations.services.migrationExecutions.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index f3d4a3f6445..56d8f0151ff 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240221", + "revision": "20240306", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -630,7 +630,9 @@ "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", "SOURCE_FORWARDING_RULE_UNSUPPORTED", - "NON_ROUTABLE_IP_ADDRESS" + "NON_ROUTABLE_IP_ADDRESS", + "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT", + "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG" ], "enumDeprecated": [ false, @@ -662,6 +664,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -694,7 +698,9 @@ "Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", "Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", "Aborted because tests with a forwarding rule as a source are not supported.", - "Aborted because one of the endpoints is a non-routable IP address (loopback, link-local, etc)." + "Aborted because one of the endpoints is a non-routable IP address (loopback, link-local, etc).", + "Aborted due to an unknown issue in the Google-managed project.", + "Aborted due to an unsupported configuration of the Google-managed project." ], "type": "string" }, @@ -930,6 +936,10 @@ "description": "A Connectivity Test for a network reachability analysis.", "id": "ConnectivityTest", "properties": { + "bypassFirewallChecks": { + "description": "Whether the test should skip firewall checking. If not provided, we assume false.", + "type": "boolean" + }, "createTime": { "description": "Output only. The time the test was created.", "format": "google-datetime", @@ -1105,13 +1115,15 @@ "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK", "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS", "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS", + "CLOUD_SQL_PSC_NEG_UNSUPPORTED", "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT", "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED", "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED", "CLOUD_RUN_REVISION_NOT_READY", "DROPPED_INSIDE_PSC_SERVICE_PRODUCER", "LOAD_BALANCER_HAS_NO_PROXY_SUBNET", - "CLOUD_NAT_NO_ADDRESSES" + "CLOUD_NAT_NO_ADDRESSES", + "ROUTING_LOOP" ], "enumDescriptions": [ "Cause is unspecified.", @@ -1165,13 +1177,15 @@ "The packet is sent to the Private Service Connect endpoint over the peering, but [it's not supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises).", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule does not have global access enabled.", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule has multiple ports specified.", + "The packet is sent to the Private Service Connect backend (network endpoint group) targeting a Cloud SQL service attachment, but this configuration is not supported.", "No NAT subnets are defined for the PSC service attachment.", "The packet sent from the hybrid NEG proxy matches a non-dynamic route, but such a configuration is not supported.", "The packet sent from the hybrid NEG proxy matches a dynamic route with a next hop in a different region, but such a configuration is not supported.", "Packet sent from a Cloud Run revision that is not ready.", "Packet was dropped inside Private Service Connect service producer.", "Packet sent to a load balancer, which requires a proxy-only subnet and the subnet is not found.", - "Packet sent to Cloud Nat without active NAT IPs." + "Packet sent to Cloud Nat without active NAT IPs.", + "Packet is stuck in a routing loop." ], "type": "string" }, diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 52f954db9cf..69ee27251c4 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -290,6 +290,10 @@ type AbortInfo struct { // forwarding rule as a source are not supported. // "NON_ROUTABLE_IP_ADDRESS" - Aborted because one of the endpoints is // a non-routable IP address (loopback, link-local, etc). + // "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT" - Aborted due to an + // unknown issue in the Google-managed project. + // "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG" - Aborted due to an + // unsupported configuration of the Google-managed project. Cause string `json:"cause,omitempty"` // IpAddress: IP address that caused the abort. @@ -791,6 +795,10 @@ func (s *CloudSQLInstanceInfo) MarshalJSON() ([]byte, error) { // ConnectivityTest: A Connectivity Test for a network reachability // analysis. type ConnectivityTest struct { + // BypassFirewallChecks: Whether the test should skip firewall checking. + // If not provided, we assume false. + BypassFirewallChecks bool `json:"bypassFirewallChecks,omitempty"` + // CreateTime: Output only. The time the test was created. CreateTime string `json:"createTime,omitempty"` @@ -868,20 +876,22 @@ type ConnectivityTest struct { // 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 is a list of field names (e.g. + // "BypassFirewallChecks") 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 is a list of field names (e.g. "BypassFirewallChecks") 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:"-"` } @@ -1096,6 +1106,9 @@ type DropInfo struct { // "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS" - The packet is // sent to the Private Service Connect backend (network endpoint group), // but the producer PSC forwarding rule has multiple ports specified. + // "CLOUD_SQL_PSC_NEG_UNSUPPORTED" - The packet is sent to the Private + // Service Connect backend (network endpoint group) targeting a Cloud + // SQL service attachment, but this configuration is not supported. // "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT" - No NAT subnets are // defined for the PSC service attachment. // "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED" - The packet sent from the @@ -1113,6 +1126,7 @@ type DropInfo struct { // found. // "CLOUD_NAT_NO_ADDRESSES" - Packet sent to Cloud Nat without active // NAT IPs. + // "ROUTING_LOOP" - Packet is stuck in a routing loop. Cause string `json:"cause,omitempty"` // DestinationIp: Destination IP address of the dropped packet (if diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 8f3c31aadfb..8c79185fbf7 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240221", + "revision": "20240306", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -630,7 +630,9 @@ "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", "SOURCE_FORWARDING_RULE_UNSUPPORTED", - "NON_ROUTABLE_IP_ADDRESS" + "NON_ROUTABLE_IP_ADDRESS", + "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT", + "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG" ], "enumDeprecated": [ false, @@ -662,6 +664,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -694,7 +698,9 @@ "Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", "Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", "Aborted because tests with a forwarding rule as a source are not supported.", - "Aborted because one of the endpoints is a non-routable IP address (loopback, link-local, etc)." + "Aborted because one of the endpoints is a non-routable IP address (loopback, link-local, etc).", + "Aborted due to an unknown issue in the Google-managed project.", + "Aborted due to an unsupported configuration of the Google-managed project." ], "type": "string" }, @@ -935,6 +941,10 @@ "description": "A Connectivity Test for a network reachability analysis.", "id": "ConnectivityTest", "properties": { + "bypassFirewallChecks": { + "description": "Whether the test should skip firewall checking. If not provided, we assume false.", + "type": "boolean" + }, "createTime": { "description": "Output only. The time the test was created.", "format": "google-datetime", @@ -1110,13 +1120,15 @@ "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK", "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS", "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS", + "CLOUD_SQL_PSC_NEG_UNSUPPORTED", "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT", "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED", "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED", "CLOUD_RUN_REVISION_NOT_READY", "DROPPED_INSIDE_PSC_SERVICE_PRODUCER", "LOAD_BALANCER_HAS_NO_PROXY_SUBNET", - "CLOUD_NAT_NO_ADDRESSES" + "CLOUD_NAT_NO_ADDRESSES", + "ROUTING_LOOP" ], "enumDescriptions": [ "Cause is unspecified.", @@ -1170,13 +1182,15 @@ "The packet is sent to the Private Service Connect endpoint over the peering, but [it's not supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises).", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule does not have global access enabled.", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule has multiple ports specified.", + "The packet is sent to the Private Service Connect backend (network endpoint group) targeting a Cloud SQL service attachment, but this configuration is not supported.", "No NAT subnets are defined for the PSC service attachment.", "The packet sent from the hybrid NEG proxy matches a non-dynamic route, but such a configuration is not supported.", "The packet sent from the hybrid NEG proxy matches a dynamic route with a next hop in a different region, but such a configuration is not supported.", "Packet sent from a Cloud Run revision that is not ready.", "Packet was dropped inside Private Service Connect service producer.", "Packet sent to a load balancer, which requires a proxy-only subnet and the subnet is not found.", - "Packet sent to Cloud Nat without active NAT IPs." + "Packet sent to Cloud Nat without active NAT IPs.", + "Packet is stuck in a routing loop." ], "type": "string" }, diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 03d0edf2ccc..f339fdb2da0 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -290,6 +290,10 @@ type AbortInfo struct { // forwarding rule as a source are not supported. // "NON_ROUTABLE_IP_ADDRESS" - Aborted because one of the endpoints is // a non-routable IP address (loopback, link-local, etc). + // "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT" - Aborted due to an + // unknown issue in the Google-managed project. + // "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG" - Aborted due to an + // unsupported configuration of the Google-managed project. Cause string `json:"cause,omitempty"` // IpAddress: IP address that caused the abort. @@ -794,6 +798,10 @@ func (s *CloudSQLInstanceInfo) MarshalJSON() ([]byte, error) { // ConnectivityTest: A Connectivity Test for a network reachability // analysis. type ConnectivityTest struct { + // BypassFirewallChecks: Whether the test should skip firewall checking. + // If not provided, we assume false. + BypassFirewallChecks bool `json:"bypassFirewallChecks,omitempty"` + // CreateTime: Output only. The time the test was created. CreateTime string `json:"createTime,omitempty"` @@ -871,20 +879,22 @@ type ConnectivityTest struct { // 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 is a list of field names (e.g. + // "BypassFirewallChecks") 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 is a list of field names (e.g. "BypassFirewallChecks") 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:"-"` } @@ -1099,6 +1109,9 @@ type DropInfo struct { // "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS" - The packet is // sent to the Private Service Connect backend (network endpoint group), // but the producer PSC forwarding rule has multiple ports specified. + // "CLOUD_SQL_PSC_NEG_UNSUPPORTED" - The packet is sent to the Private + // Service Connect backend (network endpoint group) targeting a Cloud + // SQL service attachment, but this configuration is not supported. // "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT" - No NAT subnets are // defined for the PSC service attachment. // "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED" - The packet sent from the @@ -1116,6 +1129,7 @@ type DropInfo struct { // found. // "CLOUD_NAT_NO_ADDRESSES" - Packet sent to Cloud Nat without active // NAT IPs. + // "ROUTING_LOOP" - Packet is stuck in a routing loop. Cause string `json:"cause,omitempty"` // DestinationIp: Destination IP address of the dropped packet (if diff --git a/notebooks/v1/notebooks-api.json b/notebooks/v1/notebooks-api.json index f3b44a01dc9..5aa05e311e7 100644 --- a/notebooks/v1/notebooks-api.json +++ b/notebooks/v1/notebooks-api.json @@ -2008,7 +2008,7 @@ } } }, - "revision": "20240118", + "revision": "20240307", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2707,7 +2707,7 @@ "additionalProperties": { "type": "string" }, - "description": "Custom metadata to apply to this instance. For example, to specify a Cloud Storage bucket for automatic backup, you can use the `gcs-data-bucket` metadata tag. Format: `\"--metadata=gcs-data-bucket=``BUCKET''\"`.", + "description": "Custom metadata to apply to this instance. For example, to specify a Cloud Storage bucket for automatic backup, you can use the `gcs-data-bucket` metadata tag. Format: `\"--metadata=gcs-data-bucket=BUCKET\"`.", "type": "object" }, "migrated": { diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index 87810cfa754..6d1a33c8701 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -1318,7 +1318,7 @@ type Instance struct { // Metadata: Custom metadata to apply to this instance. For example, to // specify a Cloud Storage bucket for automatic backup, you can use the // `gcs-data-bucket` metadata tag. Format: - // "--metadata=gcs-data-bucket=``BUCKET''". + // "--metadata=gcs-data-bucket=BUCKET". Metadata map[string]string `json:"metadata,omitempty"` // Migrated: Output only. Bool indicating whether this notebook has been diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 0fac5168e29..893252463d7 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -2411,7 +2411,219 @@ } } }, + "instancePartitionOperations": { + "methods": { + "list": { + "description": "Lists instance partition long-running operations in the given instance. An instance partition operation has a name of the form `projects//instances//instancePartitions//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.start_time` in descending order starting from the most recently started operation. Authorization requires `spanner.instancePartitionOperations.list` permission on the resource parent.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitionOperations", + "httpMethod": "GET", + "id": "spanner.projects.instances.instancePartitionOperations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateInstancePartitionMetadata is `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=` \\ `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) AND` \\ `(metadata.instance_partition.name:custom-instance-partition) AND` \\ `(metadata.start_time \u003c \\\"2021-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstancePartitionMetadata. * The instance partition name contains \"custom-instance-partition\". * The operation started before 2021-03-28T14:50:00Z. * The operation resulted in an error.", + "location": "query", + "type": "string" + }, + "instancePartitionDeadline": { + "description": "Optional. Deadline used while retrieving metadata for instance partition operations. Instance partitions whose operation metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionOperationsResponse.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionOperationsResponse to the same `parent` and with the same `filter`.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent instance of the instance partition operations. Values are of the form `projects//instances/`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/instancePartitionOperations", + "response": { + "$ref": "ListInstancePartitionOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + } + } + }, "instancePartitions": { + "methods": { + "create": { + "description": "Creates an instance partition and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is `CREATING`. Until completion of the returned operation: * Cancelling the operation renders the instance partition immediately unreadable via the API. * The instance partition can be deleted. * All other attempts to modify the instance partition are rejected. Upon completion of the returned operation: * Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can start using this instance partition. * The instance partition's allocated resource levels are readable via the API. * The instance partition's state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance partition. The metadata field type is CreateInstancePartitionMetadata. The response field type is InstancePartition, if successful.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions", + "httpMethod": "POST", + "id": "spanner.projects.instances.instancePartitions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the instance in which to create the instance partition. Values are of the form `projects//instances/`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/instancePartitions", + "request": { + "$ref": "CreateInstancePartitionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, + "delete": { + "description": "Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance. Authorization requires `spanner.instancePartitions.delete` permission on the resource name.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", + "httpMethod": "DELETE", + "id": "spanner.projects.instances.instancePartitions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If not empty, the API only deletes the instance partition when the etag provided matches the current status of the requested instance partition. Otherwise, deletes the instance partition without checking the current status of the requested instance partition.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the instance partition to be deleted. Values are of the form `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, + "get": { + "description": "Gets information about a particular instance partition.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", + "httpMethod": "GET", + "id": "spanner.projects.instances.instancePartitions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the requested instance partition. Values are of the form `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "InstancePartition" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, + "list": { + "description": "Lists all instance partitions for the given instance.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions", + "httpMethod": "GET", + "id": "spanner.projects.instances.instancePartitions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instancePartitionDeadline": { + "description": "Optional. Deadline used while retrieving metadata for instance partitions. Instance partitions whose metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionsResponse.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Number of instance partitions to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionsResponse.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/instancePartitions", + "response": { + "$ref": "ListInstancePartitionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, + "patch": { + "description": "Updates an instance partition, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance partition are rejected. * Reading the instance partition via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance partition's tables. * The instance partition's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance partition modification. The metadata field type is UpdateInstancePartitionMetadata. The response field type is InstancePartition, if successful. Authorization requires `spanner.instancePartitions.update` permission on the resource name.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", + "httpMethod": "PATCH", + "id": "spanner.projects.instances.instancePartitions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "UpdateInstancePartitionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + } + }, "resources": { "operations": { "methods": { @@ -2729,7 +2941,7 @@ } } }, - "revision": "20240307", + "revision": "20240315", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "AutoscalingConfig": { @@ -3375,6 +3587,47 @@ }, "type": "object" }, + "CreateInstancePartitionMetadata": { + "description": "Metadata type for the operation returned by CreateInstancePartition.", + "id": "CreateInstancePartitionMetadata", + "properties": { + "cancelTime": { + "description": "The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time at which this operation failed or was completed successfully.", + "format": "google-datetime", + "type": "string" + }, + "instancePartition": { + "$ref": "InstancePartition", + "description": "The instance partition being created." + }, + "startTime": { + "description": "The time at which the CreateInstancePartition request was received.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "CreateInstancePartitionRequest": { + "description": "The request for CreateInstancePartition.", + "id": "CreateInstancePartitionRequest", + "properties": { + "instancePartition": { + "$ref": "InstancePartition", + "description": "Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be `/instancePartitions/`." + }, + "instancePartitionId": { + "description": "Required. The ID of the instance partition to create. Valid identifiers are of the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in length.", + "type": "string" + } + }, + "type": "object" + }, "CreateInstanceRequest": { "description": "The request for CreateInstance.", "id": "CreateInstanceRequest", @@ -4200,6 +4453,82 @@ }, "type": "object" }, + "InstancePartition": { + "description": "An isolated set of Cloud Spanner resources that databases can define placements on.", + "id": "InstancePartition", + "properties": { + "config": { + "description": "Required. The name of the instance partition's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time at which the instance partition was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The descriptive name for this instance partition as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.", + "type": "string" + }, + "etag": { + "description": "Used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance partition from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform instance partition updates in order to avoid race conditions: An etag is returned in the response which contains instance partitions, and systems are expected to put that etag in the request to update instance partitions to ensure that their change will be applied to the same version of the instance partition. If no etag is provided in the call to update instance partition, then the existing instance partition is overwritten blindly.", + "type": "string" + }, + "name": { + "description": "Required. A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.", + "type": "string" + }, + "nodeCount": { + "description": "The number of nodes allocated to this instance partition. Users can set the node_count field to specify the target number of nodes allocated to the instance partition. This may be zero in API responses for instance partitions that are not yet in state `READY`.", + "format": "int32", + "type": "integer" + }, + "processingUnits": { + "description": "The number of processing units allocated to this instance partition. Users can set the processing_units field to specify the target number of processing units allocated to the instance partition. This may be zero in API responses for instance partitions that are not yet in state `READY`.", + "format": "int32", + "type": "integer" + }, + "referencingBackups": { + "description": "Output only. The names of the backups that reference this instance partition. Referencing backups should share the parent instance. The existence of any referencing backup prevents the instance partition from being deleted.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "referencingDatabases": { + "description": "Output only. The names of the databases that reference this instance partition. Referencing databases should share the parent instance. The existence of any referencing database prevents the instance partition from being deleted.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "state": { + "description": "Output only. The current instance partition state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY" + ], + "enumDescriptions": [ + "Not specified.", + "The instance partition is still being created. Resources may not be available yet, and operations such as creating placements using this instance partition may not work.", + "The instance partition is fully created and ready to do work such as creating placements and using in databases." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time at which the instance partition was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "KeyRange": { "description": "KeyRange represents a range of rows in a table or index. A range has a start key and an end key. These keys can be open or closed, indicating if the range includes rows with that key. Keys are represented by lists, where the ith value in the list corresponds to the ith component of the table or index primary key. Individual values are encoded as described here. For example, consider the following table definition: CREATE TABLE UserEvents ( UserName STRING(MAX), EventDate STRING(10) ) PRIMARY KEY(UserName, EventDate); The following keys name rows in this table: \"Bob\", \"2014-09-23\" Since the `UserEvents` table's `PRIMARY KEY` clause names two columns, each `UserEvents` key has two elements; the first is the `UserName`, and the second is the `EventDate`. Key ranges with multiple components are interpreted lexicographically by component using the table or index key's declared sort order. For example, the following range returns all events for user `\"Bob\"` that occurred in the year 2015: \"start_closed\": [\"Bob\", \"2015-01-01\"] \"end_closed\": [\"Bob\", \"2015-12-31\"] Start and end keys can omit trailing key components. This affects the inclusion and exclusion of rows that exactly match the provided key components: if the key is closed, then rows that exactly match the provided components are included; if the key is open, then rows that exactly match are not included. For example, the following range includes all events for `\"Bob\"` that occurred during and after the year 2000: \"start_closed\": [\"Bob\", \"2000-01-01\"] \"end_closed\": [\"Bob\"] The next example retrieves all events for `\"Bob\"`: \"start_closed\": [\"Bob\"] \"end_closed\": [\"Bob\"] To retrieve events before the year 2000: \"start_closed\": [\"Bob\"] \"end_open\": [\"Bob\", \"2000-01-01\"] The following range includes all rows in the table: \"start_closed\": [] \"end_closed\": [] This range returns all users whose `UserName` begins with any character from A to C: \"start_closed\": [\"A\"] \"end_open\": [\"D\"] This range returns all users whose `UserName` begins with B: \"start_closed\": [\"B\"] \"end_open\": [\"C\"] Key ranges honor column sort order. For example, suppose a table is defined as follows: CREATE TABLE DescendingSortedTable { Key INT64, ... ) PRIMARY KEY(Key DESC); The following range retrieves all rows with key values between 1 and 100 inclusive: \"start_closed\": [\"100\"] \"end_closed\": [\"1\"] Note that 100 is passed as the start, and 1 is passed as the end, because `Key` is a descending column in the schema.", "id": "KeyRange", @@ -4459,6 +4788,56 @@ }, "type": "object" }, + "ListInstancePartitionOperationsResponse": { + "description": "The response for ListInstancePartitionOperations.", + "id": "ListInstancePartitionOperationsResponse", + "properties": { + "nextPageToken": { + "description": "`next_page_token` can be sent in a subsequent ListInstancePartitionOperations call to fetch more of the matching metadata.", + "type": "string" + }, + "operations": { + "description": "The list of matching instance partition long-running operations. Each operation's name will be prefixed by the instance partition's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata.", + "items": { + "$ref": "Operation" + }, + "type": "array" + }, + "unreachableInstancePartitions": { + "description": "The list of unreachable instance partitions. It includes the names of instance partitions whose operation metadata could not be retrieved within instance_partition_deadline.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListInstancePartitionsResponse": { + "description": "The response for ListInstancePartitions.", + "id": "ListInstancePartitionsResponse", + "properties": { + "instancePartitions": { + "description": "The list of requested instancePartitions.", + "items": { + "$ref": "InstancePartition" + }, + "type": "array" + }, + "nextPageToken": { + "description": "`next_page_token` can be sent in a subsequent ListInstancePartitions call to fetch more of the matching instance partitions.", + "type": "string" + }, + "unreachable": { + "description": "The list of unreachable instance partitions. It includes the names of instance partitions whose metadata could not be retrieved within instance_partition_deadline.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListInstancesResponse": { "description": "The response for ListInstances.", "id": "ListInstancesResponse", @@ -6011,6 +6390,48 @@ }, "type": "object" }, + "UpdateInstancePartitionMetadata": { + "description": "Metadata type for the operation returned by UpdateInstancePartition.", + "id": "UpdateInstancePartitionMetadata", + "properties": { + "cancelTime": { + "description": "The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time at which this operation failed or was completed successfully.", + "format": "google-datetime", + "type": "string" + }, + "instancePartition": { + "$ref": "InstancePartition", + "description": "The desired end state of the update." + }, + "startTime": { + "description": "The time at which UpdateInstancePartition request was received.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "UpdateInstancePartitionRequest": { + "description": "The request for UpdateInstancePartition.", + "id": "UpdateInstancePartitionRequest", + "properties": { + "fieldMask": { + "description": "Required. A mask specifying which fields in InstancePartition should be updated. The field mask must always be specified; this prevents any future fields in InstancePartition from being erased accidentally by clients that do not know about them.", + "format": "google-fieldmask", + "type": "string" + }, + "instancePartition": { + "$ref": "InstancePartition", + "description": "Required. The instance partition to update, which must always include the instance partition name. Otherwise, only fields mentioned in field_mask need be included." + } + }, + "type": "object" + }, "UpdateInstanceRequest": { "description": "The request for UpdateInstance.", "id": "UpdateInstanceRequest", diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 87c77f1b416..69fe6419755 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -251,6 +251,7 @@ func NewProjectsInstancesService(s *Service) *ProjectsInstancesService { rs.Backups = NewProjectsInstancesBackupsService(s) rs.DatabaseOperations = NewProjectsInstancesDatabaseOperationsService(s) rs.Databases = NewProjectsInstancesDatabasesService(s) + rs.InstancePartitionOperations = NewProjectsInstancesInstancePartitionOperationsService(s) rs.InstancePartitions = NewProjectsInstancesInstancePartitionsService(s) rs.Operations = NewProjectsInstancesOperationsService(s) return rs @@ -267,6 +268,8 @@ type ProjectsInstancesService struct { Databases *ProjectsInstancesDatabasesService + InstancePartitionOperations *ProjectsInstancesInstancePartitionOperationsService + InstancePartitions *ProjectsInstancesInstancePartitionsService Operations *ProjectsInstancesOperationsService @@ -356,6 +359,15 @@ type ProjectsInstancesDatabasesSessionsService struct { s *Service } +func NewProjectsInstancesInstancePartitionOperationsService(s *Service) *ProjectsInstancesInstancePartitionOperationsService { + rs := &ProjectsInstancesInstancePartitionOperationsService{s: s} + return rs +} + +type ProjectsInstancesInstancePartitionOperationsService struct { + s *Service +} + func NewProjectsInstancesInstancePartitionsService(s *Service) *ProjectsInstancesInstancePartitionsService { rs := &ProjectsInstancesInstancePartitionsService{s: s} rs.Operations = NewProjectsInstancesInstancePartitionsOperationsService(s) @@ -1629,6 +1641,85 @@ func (s *CreateInstanceMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CreateInstancePartitionMetadata: Metadata type for the operation +// returned by CreateInstancePartition. +type CreateInstancePartitionMetadata struct { + // CancelTime: The time at which this operation was cancelled. If set, + // this operation is in the process of undoing itself (which is + // guaranteed to succeed) and cannot be cancelled again. + CancelTime string `json:"cancelTime,omitempty"` + + // EndTime: The time at which this operation failed or was completed + // successfully. + EndTime string `json:"endTime,omitempty"` + + // InstancePartition: The instance partition being created. + InstancePartition *InstancePartition `json:"instancePartition,omitempty"` + + // StartTime: The time at which the CreateInstancePartition request was + // received. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CancelTime") 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. "CancelTime") 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 *CreateInstancePartitionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CreateInstancePartitionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateInstancePartitionRequest: The request for +// CreateInstancePartition. +type CreateInstancePartitionRequest struct { + // InstancePartition: Required. The instance partition to create. The + // instance_partition.name may be omitted, but if specified must be + // `/instancePartitions/`. + InstancePartition *InstancePartition `json:"instancePartition,omitempty"` + + // InstancePartitionId: Required. The ID of the instance partition to + // create. Valid identifiers are of the form `a-z*[a-z0-9]` and must be + // between 2 and 64 characters in length. + InstancePartitionId string `json:"instancePartitionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InstancePartition") + // 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. "InstancePartition") 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 *CreateInstancePartitionRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreateInstancePartitionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateInstanceRequest: The request for CreateInstance. type CreateInstanceRequest struct { // Instance: Required. The instance to create. The name may be omitted, @@ -3098,6 +3189,111 @@ func (s *InstanceOperationProgress) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstancePartition: An isolated set of Cloud Spanner resources that +// databases can define placements on. +type InstancePartition struct { + // Config: Required. The name of the instance partition's configuration. + // Values are of the form `projects//instanceConfigs/`. See also + // InstanceConfig and ListInstanceConfigs. + Config string `json:"config,omitempty"` + + // CreateTime: Output only. The time at which the instance partition was + // created. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: Required. The descriptive name for this instance + // partition as it appears in UIs. Must be unique per project and + // between 4 and 30 characters in length. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Used for optimistic concurrency control as a way to help + // prevent simultaneous updates of a instance partition from overwriting + // each other. It is strongly suggested that systems make use of the + // etag in the read-modify-write cycle to perform instance partition + // updates in order to avoid race conditions: An etag is returned in the + // response which contains instance partitions, and systems are expected + // to put that etag in the request to update instance partitions to + // ensure that their change will be applied to the same version of the + // instance partition. If no etag is provided in the call to update + // instance partition, then the existing instance partition is + // overwritten blindly. + Etag string `json:"etag,omitempty"` + + // Name: Required. A unique identifier for the instance partition. + // Values are of the form + // `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final + // segment of the name must be between 2 and 64 characters in length. An + // instance partition's name cannot be changed after the instance + // partition is created. + Name string `json:"name,omitempty"` + + // NodeCount: The number of nodes allocated to this instance partition. + // Users can set the node_count field to specify the target number of + // nodes allocated to the instance partition. This may be zero in API + // responses for instance partitions that are not yet in state `READY`. + NodeCount int64 `json:"nodeCount,omitempty"` + + // ProcessingUnits: The number of processing units allocated to this + // instance partition. Users can set the processing_units field to + // specify the target number of processing units allocated to the + // instance partition. This may be zero in API responses for instance + // partitions that are not yet in state `READY`. + ProcessingUnits int64 `json:"processingUnits,omitempty"` + + // ReferencingBackups: Output only. The names of the backups that + // reference this instance partition. Referencing backups should share + // the parent instance. The existence of any referencing backup prevents + // the instance partition from being deleted. + ReferencingBackups []string `json:"referencingBackups,omitempty"` + + // ReferencingDatabases: Output only. The names of the databases that + // reference this instance partition. Referencing databases should share + // the parent instance. The existence of any referencing database + // prevents the instance partition from being deleted. + ReferencingDatabases []string `json:"referencingDatabases,omitempty"` + + // State: Output only. The current instance partition state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not specified. + // "CREATING" - The instance partition is still being created. + // Resources may not be available yet, and operations such as creating + // placements using this instance partition may not work. + // "READY" - The instance partition is fully created and ready to do + // work such as creating placements and using in databases. + State string `json:"state,omitempty"` + + // UpdateTime: Output only. The time at which the instance partition 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. "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 *InstancePartition) MarshalJSON() ([]byte, error) { + type NoMethod InstancePartition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // KeyRange: KeyRange represents a range of rows in a table or index. A // range has a start key and an end key. These keys can be open or // closed, indicating if the range includes rows with that key. Keys are @@ -3598,6 +3794,97 @@ func (s *ListInstanceConfigsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListInstancePartitionOperationsResponse: The response for +// ListInstancePartitionOperations. +type ListInstancePartitionOperationsResponse struct { + // NextPageToken: `next_page_token` can be sent in a subsequent + // ListInstancePartitionOperations call to fetch more of the matching + // metadata. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: The list of matching instance partition long-running + // operations. Each operation's name will be prefixed by the instance + // partition's name. The operation's metadata field type + // `metadata.type_url` describes the type of the metadata. + Operations []*Operation `json:"operations,omitempty"` + + // UnreachableInstancePartitions: The list of unreachable instance + // partitions. It includes the names of instance partitions whose + // operation metadata could not be retrieved within + // instance_partition_deadline. + UnreachableInstancePartitions []string `json:"unreachableInstancePartitions,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 *ListInstancePartitionOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInstancePartitionOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListInstancePartitionsResponse: The response for +// ListInstancePartitions. +type ListInstancePartitionsResponse struct { + // InstancePartitions: The list of requested instancePartitions. + InstancePartitions []*InstancePartition `json:"instancePartitions,omitempty"` + + // NextPageToken: `next_page_token` can be sent in a subsequent + // ListInstancePartitions call to fetch more of the matching instance + // partitions. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: The list of unreachable instance partitions. It includes + // the names of instance partitions whose metadata could not be + // retrieved within instance_partition_deadline. + 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. "InstancePartitions") + // 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. "InstancePartitions") 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 *ListInstancePartitionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInstancePartitionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListInstancesResponse: The response for ListInstances. type ListInstancesResponse struct { // Instances: The list of requested instances. @@ -6758,6 +7045,85 @@ func (s *UpdateInstanceMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpdateInstancePartitionMetadata: Metadata type for the operation +// returned by UpdateInstancePartition. +type UpdateInstancePartitionMetadata struct { + // CancelTime: The time at which this operation was cancelled. If set, + // this operation is in the process of undoing itself (which is + // guaranteed to succeed) and cannot be cancelled again. + CancelTime string `json:"cancelTime,omitempty"` + + // EndTime: The time at which this operation failed or was completed + // successfully. + EndTime string `json:"endTime,omitempty"` + + // InstancePartition: The desired end state of the update. + InstancePartition *InstancePartition `json:"instancePartition,omitempty"` + + // StartTime: The time at which UpdateInstancePartition request was + // received. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CancelTime") 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. "CancelTime") 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 *UpdateInstancePartitionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod UpdateInstancePartitionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UpdateInstancePartitionRequest: The request for +// UpdateInstancePartition. +type UpdateInstancePartitionRequest struct { + // FieldMask: Required. A mask specifying which fields in + // InstancePartition should be updated. The field mask must always be + // specified; this prevents any future fields in InstancePartition from + // being erased accidentally by clients that do not know about them. + FieldMask string `json:"fieldMask,omitempty"` + + // InstancePartition: Required. The instance partition to update, which + // must always include the instance partition name. Otherwise, only + // fields mentioned in field_mask need be included. + InstancePartition *InstancePartition `json:"instancePartition,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldMask") 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. "FieldMask") 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 *UpdateInstancePartitionRequest) MarshalJSON() ([]byte, error) { + type NoMethod UpdateInstancePartitionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UpdateInstanceRequest: The request for UpdateInstance. type UpdateInstanceRequest struct { // FieldMask: Required. A mask specifying which fields in Instance @@ -18585,6 +18951,1120 @@ func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Do(opts ...googlea } +// method id "spanner.projects.instances.instancePartitionOperations.list": + +type ProjectsInstancesInstancePartitionOperationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists instance partition long-running operations in the given +// instance. An instance partition operation has a name of the form +// `projects//instances//instancePartitions//operations/`. The +// long-running operation metadata field type `metadata.type_url` +// describes the type of the metadata. Operations returned include those +// that have completed/failed/canceled within the last 7 days, and +// pending operations. Operations returned are ordered by +// `operation.metadata.value.start_time` in descending order starting +// from the most recently started operation. Authorization requires +// `spanner.instancePartitionOperations.list` permission on the resource +// parent. +// +// - parent: The parent instance of the instance partition operations. +// Values are of the form `projects//instances/`. +func (r *ProjectsInstancesInstancePartitionOperationsService) List(parent string) *ProjectsInstancesInstancePartitionOperationsListCall { + c := &ProjectsInstancesInstancePartitionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression that +// filters the list of returned operations. A filter expression consists +// of a field name, a comparison operator, and a value for filtering. +// The value must be a string, a number, or a boolean. The comparison +// operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. +// Colon `:` is the contains operator. Filter rules are not case +// sensitive. The following fields in the Operation are eligible for +// filtering: * `name` - The name of the long-running operation * `done` +// - False if the operation is in progress, else true. * +// `metadata.@type` - the type of metadata. For example, the type string +// for CreateInstancePartitionMetadata is +// `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePa +// rtitionMetadata`. * `metadata.` - any field in metadata.value. +// `metadata.@type` must be specified first, if filtering on metadata +// fields. * `error` - Error associated with the long-running operation. +// * `response.@type` - the type of response. * `response.` - any field +// in response.value. You can combine multiple expressions by enclosing +// each expression in parentheses. By default, expressions are combined +// with AND logic. However, you can specify AND, OR, and NOT logic +// explicitly. Here are a few examples: * `done:true` - The operation is +// complete. * `(metadata.@type=` \ +// `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePa +// rtitionMetadata) AND` \ +// `(metadata.instance_partition.name:custom-instance-partition) AND` \ +// `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ `(error:*)` +// - Return operations where: * The operation's metadata type is +// CreateInstancePartitionMetadata. * The instance partition name +// contains "custom-instance-partition". * The operation started before +// 2021-03-28T14:50:00Z. * The operation resulted in an error. +func (c *ProjectsInstancesInstancePartitionOperationsListCall) Filter(filter string) *ProjectsInstancesInstancePartitionOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// InstancePartitionDeadline sets the optional parameter +// "instancePartitionDeadline": Deadline used while retrieving metadata +// for instance partition operations. Instance partitions whose +// operation metadata cannot be retrieved within this deadline will be +// added to unreachable in ListInstancePartitionOperationsResponse. +func (c *ProjectsInstancesInstancePartitionOperationsListCall) InstancePartitionDeadline(instancePartitionDeadline string) *ProjectsInstancesInstancePartitionOperationsListCall { + c.urlParams_.Set("instancePartitionDeadline", instancePartitionDeadline) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of operations +// to be returned in the response. If 0 or less, defaults to the +// server's maximum allowed page size. +func (c *ProjectsInstancesInstancePartitionOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesInstancePartitionOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If non-empty, +// `page_token` should contain a next_page_token from a previous +// ListInstancePartitionOperationsResponse to the same `parent` and with +// the same `filter`. +func (c *ProjectsInstancesInstancePartitionOperationsListCall) PageToken(pageToken string) *ProjectsInstancesInstancePartitionOperationsListCall { + 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 *ProjectsInstancesInstancePartitionOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionOperationsListCall { + 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 *ProjectsInstancesInstancePartitionOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionOperationsListCall { + 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 *ProjectsInstancesInstancePartitionOperationsListCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionOperationsListCall { + 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 *ProjectsInstancesInstancePartitionOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesInstancePartitionOperationsListCall) 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}/instancePartitionOperations") + 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 "spanner.projects.instances.instancePartitionOperations.list" call. +// Exactly one of *ListInstancePartitionOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ListInstancePartitionOperationsResponse.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 *ProjectsInstancesInstancePartitionOperationsListCall) Do(opts ...googleapi.CallOption) (*ListInstancePartitionOperationsResponse, 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 := &ListInstancePartitionOperationsResponse{ + 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 instance partition long-running operations in the given instance. An instance partition operation has a name of the form `projects//instances//instancePartitions//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.start_time` in descending order starting from the most recently started operation. Authorization requires `spanner.instancePartitionOperations.list` permission on the resource parent.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitionOperations", + // "httpMethod": "GET", + // "id": "spanner.projects.instances.instancePartitionOperations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateInstancePartitionMetadata is `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=` \\ `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) AND` \\ `(metadata.instance_partition.name:custom-instance-partition) AND` \\ `(metadata.start_time \u003c \\\"2021-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstancePartitionMetadata. * The instance partition name contains \"custom-instance-partition\". * The operation started before 2021-03-28T14:50:00Z. * The operation resulted in an error.", + // "location": "query", + // "type": "string" + // }, + // "instancePartitionDeadline": { + // "description": "Optional. Deadline used while retrieving metadata for instance partition operations. Instance partitions whose operation metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionOperationsResponse.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionOperationsResponse to the same `parent` and with the same `filter`.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent instance of the instance partition operations. Values are of the form `projects//instances/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/instancePartitionOperations", + // "response": { + // "$ref": "ListInstancePartitionOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + +// 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 *ProjectsInstancesInstancePartitionOperationsListCall) Pages(ctx context.Context, f func(*ListInstancePartitionOperationsResponse) 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 "spanner.projects.instances.instancePartitions.create": + +type ProjectsInstancesInstancePartitionsCreateCall struct { + s *Service + parent string + createinstancepartitionrequest *CreateInstancePartitionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an instance partition and begins preparing it to be +// used. The returned long-running operation can be used to track the +// progress of preparing the new instance partition. The instance +// partition name is assigned by the caller. If the named instance +// partition already exists, `CreateInstancePartition` returns +// `ALREADY_EXISTS`. Immediately upon completion of this request: * The +// instance partition is readable via the API, with all requested +// attributes but no allocated resources. Its state is `CREATING`. Until +// completion of the returned operation: * Cancelling the operation +// renders the instance partition immediately unreadable via the API. * +// The instance partition can be deleted. * All other attempts to modify +// the instance partition are rejected. Upon completion of the returned +// operation: * Billing for all successfully-allocated resources begins +// (some types may have lower than the requested levels). * Databases +// can start using this instance partition. * The instance partition's +// allocated resource levels are readable via the API. * The instance +// partition's state becomes `READY`. The returned long-running +// operation will have a name of the format `/operations/` and can be +// used to track creation of the instance partition. The metadata field +// type is CreateInstancePartitionMetadata. The response field type is +// InstancePartition, if successful. +// +// - parent: The name of the instance in which to create the instance +// partition. Values are of the form `projects//instances/`. +func (r *ProjectsInstancesInstancePartitionsService) Create(parent string, createinstancepartitionrequest *CreateInstancePartitionRequest) *ProjectsInstancesInstancePartitionsCreateCall { + c := &ProjectsInstancesInstancePartitionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.createinstancepartitionrequest = createinstancepartitionrequest + 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 *ProjectsInstancesInstancePartitionsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsCreateCall { + 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 *ProjectsInstancesInstancePartitionsCreateCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsCreateCall { + 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 *ProjectsInstancesInstancePartitionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesInstancePartitionsCreateCall) 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.createinstancepartitionrequest) + 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}/instancePartitions") + 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 "spanner.projects.instances.instancePartitions.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 *ProjectsInstancesInstancePartitionsCreateCall) 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 an instance partition and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is `CREATING`. Until completion of the returned operation: * Cancelling the operation renders the instance partition immediately unreadable via the API. * The instance partition can be deleted. * All other attempts to modify the instance partition are rejected. Upon completion of the returned operation: * Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can start using this instance partition. * The instance partition's allocated resource levels are readable via the API. * The instance partition's state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance partition. The metadata field type is CreateInstancePartitionMetadata. The response field type is InstancePartition, if successful.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions", + // "httpMethod": "POST", + // "id": "spanner.projects.instances.instancePartitions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the instance in which to create the instance partition. Values are of the form `projects//instances/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/instancePartitions", + // "request": { + // "$ref": "CreateInstancePartitionRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + +// method id "spanner.projects.instances.instancePartitions.delete": + +type ProjectsInstancesInstancePartitionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an existing instance partition. Requires that the +// instance partition is not used by any database or backup and is not +// the default instance partition of an instance. Authorization requires +// `spanner.instancePartitions.delete` permission on the resource name. +// +// - name: The name of the instance partition to be deleted. Values are +// of the form +// `projects/{project}/instances/{instance}/instancePartitions/{instanc +// e_partition}`. +func (r *ProjectsInstancesInstancePartitionsService) Delete(name string) *ProjectsInstancesInstancePartitionsDeleteCall { + c := &ProjectsInstancesInstancePartitionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If not empty, the API only +// deletes the instance partition when the etag provided matches the +// current status of the requested instance partition. Otherwise, +// deletes the instance partition without checking the current status of +// the requested instance partition. +func (c *ProjectsInstancesInstancePartitionsDeleteCall) Etag(etag string) *ProjectsInstancesInstancePartitionsDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *ProjectsInstancesInstancePartitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsDeleteCall { + 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 *ProjectsInstancesInstancePartitionsDeleteCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsDeleteCall { + 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 *ProjectsInstancesInstancePartitionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesInstancePartitionsDeleteCall) 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 "spanner.projects.instances.instancePartitions.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 *ProjectsInstancesInstancePartitionsDeleteCall) 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 an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance. Authorization requires `spanner.instancePartitions.delete` permission on the resource name.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", + // "httpMethod": "DELETE", + // "id": "spanner.projects.instances.instancePartitions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. If not empty, the API only deletes the instance partition when the etag provided matches the current status of the requested instance partition. Otherwise, deletes the instance partition without checking the current status of the requested instance partition.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The name of the instance partition to be deleted. Values are of the form `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + +// method id "spanner.projects.instances.instancePartitions.get": + +type ProjectsInstancesInstancePartitionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a particular instance partition. +// +// - name: The name of the requested instance partition. Values are of +// the form +// `projects/{project}/instances/{instance}/instancePartitions/{instanc +// e_partition}`. +func (r *ProjectsInstancesInstancePartitionsService) Get(name string) *ProjectsInstancesInstancePartitionsGetCall { + c := &ProjectsInstancesInstancePartitionsGetCall{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 *ProjectsInstancesInstancePartitionsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsGetCall { + 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 *ProjectsInstancesInstancePartitionsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsGetCall { + 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 *ProjectsInstancesInstancePartitionsGetCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsGetCall { + 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 *ProjectsInstancesInstancePartitionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesInstancePartitionsGetCall) 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 "spanner.projects.instances.instancePartitions.get" call. +// Exactly one of *InstancePartition or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstancePartition.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 *ProjectsInstancesInstancePartitionsGetCall) Do(opts ...googleapi.CallOption) (*InstancePartition, 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 := &InstancePartition{ + 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 particular instance partition.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", + // "httpMethod": "GET", + // "id": "spanner.projects.instances.instancePartitions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the requested instance partition. Values are of the form `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "InstancePartition" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + +// method id "spanner.projects.instances.instancePartitions.list": + +type ProjectsInstancesInstancePartitionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all instance partitions for the given instance. +// +// - parent: The instance whose instance partitions should be listed. +// Values are of the form `projects//instances/`. +func (r *ProjectsInstancesInstancePartitionsService) List(parent string) *ProjectsInstancesInstancePartitionsListCall { + c := &ProjectsInstancesInstancePartitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// InstancePartitionDeadline sets the optional parameter +// "instancePartitionDeadline": Deadline used while retrieving metadata +// for instance partitions. Instance partitions whose metadata cannot be +// retrieved within this deadline will be added to unreachable in +// ListInstancePartitionsResponse. +func (c *ProjectsInstancesInstancePartitionsListCall) InstancePartitionDeadline(instancePartitionDeadline string) *ProjectsInstancesInstancePartitionsListCall { + c.urlParams_.Set("instancePartitionDeadline", instancePartitionDeadline) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of instance +// partitions to be returned in the response. If 0 or less, defaults to +// the server's maximum allowed page size. +func (c *ProjectsInstancesInstancePartitionsListCall) PageSize(pageSize int64) *ProjectsInstancesInstancePartitionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If non-empty, +// `page_token` should contain a next_page_token from a previous +// ListInstancePartitionsResponse. +func (c *ProjectsInstancesInstancePartitionsListCall) PageToken(pageToken string) *ProjectsInstancesInstancePartitionsListCall { + 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 *ProjectsInstancesInstancePartitionsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsListCall { + 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 *ProjectsInstancesInstancePartitionsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsListCall { + 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 *ProjectsInstancesInstancePartitionsListCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsListCall { + 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 *ProjectsInstancesInstancePartitionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesInstancePartitionsListCall) 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}/instancePartitions") + 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 "spanner.projects.instances.instancePartitions.list" call. +// Exactly one of *ListInstancePartitionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListInstancePartitionsResponse.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 *ProjectsInstancesInstancePartitionsListCall) Do(opts ...googleapi.CallOption) (*ListInstancePartitionsResponse, 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 := &ListInstancePartitionsResponse{ + 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 all instance partitions for the given instance.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions", + // "httpMethod": "GET", + // "id": "spanner.projects.instances.instancePartitions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "instancePartitionDeadline": { + // "description": "Optional. Deadline used while retrieving metadata for instance partitions. Instance partitions whose metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionsResponse.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Number of instance partitions to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionsResponse.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/instancePartitions", + // "response": { + // "$ref": "ListInstancePartitionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + +// 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 *ProjectsInstancesInstancePartitionsListCall) Pages(ctx context.Context, f func(*ListInstancePartitionsResponse) 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 "spanner.projects.instances.instancePartitions.patch": + +type ProjectsInstancesInstancePartitionsPatchCall struct { + s *Service + nameid string + updateinstancepartitionrequest *UpdateInstancePartitionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an instance partition, and begins allocating or +// releasing resources as requested. The returned long-running operation +// can be used to track the progress of updating the instance partition. +// If the named instance partition does not exist, returns `NOT_FOUND`. +// Immediately upon completion of this request: * For resource types for +// which a decrease in the instance partition's allocation has been +// requested, billing is based on the newly-requested level. Until +// completion of the returned operation: * Cancelling the operation sets +// its metadata's cancel_time, and begins restoring resources to their +// pre-request values. The operation is guaranteed to succeed at undoing +// all resource changes, after which point it terminates with a +// `CANCELLED` status. * All other attempts to modify the instance +// partition are rejected. * Reading the instance partition via the API +// continues to give the pre-request resource levels. Upon completion of +// the returned operation: * Billing begins for all +// successfully-allocated resources (some types may have lower than the +// requested levels). * All newly-reserved resources are available for +// serving the instance partition's tables. * The instance partition's +// new resource levels are readable via the API. The returned +// long-running operation will have a name of the format `/operations/` +// and can be used to track the instance partition modification. The +// metadata field type is UpdateInstancePartitionMetadata. The response +// field type is InstancePartition, if successful. Authorization +// requires `spanner.instancePartitions.update` permission on the +// resource name. +// +// - name: A unique identifier for the instance partition. Values are of +// the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. +// The final segment of the name must be between 2 and 64 characters +// in length. An instance partition's name cannot be changed after the +// instance partition is created. +func (r *ProjectsInstancesInstancePartitionsService) Patch(nameid string, updateinstancepartitionrequest *UpdateInstancePartitionRequest) *ProjectsInstancesInstancePartitionsPatchCall { + c := &ProjectsInstancesInstancePartitionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.updateinstancepartitionrequest = updateinstancepartitionrequest + 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 *ProjectsInstancesInstancePartitionsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsPatchCall { + 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 *ProjectsInstancesInstancePartitionsPatchCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsPatchCall { + 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 *ProjectsInstancesInstancePartitionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesInstancePartitionsPatchCall) 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.updateinstancepartitionrequest) + 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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "spanner.projects.instances.instancePartitions.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 *ProjectsInstancesInstancePartitionsPatchCall) 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 instance partition, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance partition are rejected. * Reading the instance partition via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance partition's tables. * The instance partition's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance partition modification. The metadata field type is UpdateInstancePartitionMetadata. The response field type is InstancePartition, if successful. Authorization requires `spanner.instancePartitions.update` permission on the resource name.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", + // "httpMethod": "PATCH", + // "id": "spanner.projects.instances.instancePartitions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "UpdateInstancePartitionRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + // method id "spanner.projects.instances.instancePartitions.operations.cancel": type ProjectsInstancesInstancePartitionsOperationsCancelCall struct { diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json index deb0f38165b..8372371a2c4 100644 --- a/workloadmanager/v1/workloadmanager-api.json +++ b/workloadmanager/v1/workloadmanager-api.json @@ -761,179 +761,15 @@ ] } } - }, - "workloadProfiles": { - "methods": { - "get": { - "description": "Gets details of a single workload.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadProfiles/{workloadProfilesId}", - "httpMethod": "GET", - "id": "workloadmanager.projects.locations.workloadProfiles.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the resource", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workloadProfiles/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkloadProfile" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "deprecated": true, - "description": "List workloads", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadProfiles", - "httpMethod": "GET", - "id": "workloadmanager.projects.locations.workloadProfiles.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. 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": "Optional. A token identifying a page of results the server should return.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Parent value for ListWorkloadRequest", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/workloadProfiles", - "response": { - "$ref": "ListWorkloadProfilesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } } } } }, - "revision": "20240228", + "revision": "20240306", "rootUrl": "https://workloadmanager.googleapis.com/", "schemas": { - "APILayerServer": { - "description": "The API layer server", - "id": "APILayerServer", - "properties": { - "name": { - "description": "Output only. The api layer name", - "readOnly": true, - "type": "string" - }, - "osVersion": { - "description": "Output only. OS information", - "readOnly": true, - "type": "string" - }, - "resources": { - "description": "Output only. resources in the component", - "items": { - "$ref": "CloudResource" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "AvailabilityGroup": { - "description": "The availability groups for sqlserver", - "id": "AvailabilityGroup", - "properties": { - "databases": { - "description": "Output only. The databases", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "name": { - "description": "Output only. The availability group name", - "readOnly": true, - "type": "string" - }, - "primaryServer": { - "description": "Output only. The primary server", - "readOnly": true, - "type": "string" - }, - "secondaryServers": { - "description": "Output only. The secondary servers", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "BackendServer": { - "description": "The backend server", - "id": "BackendServer", - "properties": { - "backupFile": { - "description": "Output only. The backup file", - "readOnly": true, - "type": "string" - }, - "backupSchedule": { - "description": "Output only. The backup schedule", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. The backend name", - "readOnly": true, - "type": "string" - }, - "osVersion": { - "description": "Output only. OS information", - "readOnly": true, - "type": "string" - }, - "resources": { - "description": "Output only. resources in the component", - "items": { - "$ref": "CloudResource" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, "BigQueryDestination": { "description": "Message describing big query destination", "id": "BigQueryDestination", @@ -955,98 +791,6 @@ "properties": {}, "type": "object" }, - "CloudResource": { - "description": "The resource on GCP", - "id": "CloudResource", - "properties": { - "kind": { - "description": "Output only. ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc.", - "enum": [ - "RESOURCE_KIND_UNSPECIFIED", - "RESOURCE_KIND_INSTANCE", - "RESOURCE_KIND_DISK", - "RESOURCE_KIND_ADDRESS", - "RESOURCE_KIND_FILESTORE", - "RESOURCE_KIND_HEALTH_CHECK", - "RESOURCE_KIND_FORWARDING_RULE", - "RESOURCE_KIND_BACKEND_SERVICE", - "RESOURCE_KIND_SUBNETWORK", - "RESOURCE_KIND_NETWORK", - "RESOURCE_KIND_PUBLIC_ADDRESS", - "RESOURCE_KIND_INSTANCE_GROUP" - ], - "enumDescriptions": [ - "Unspecified resource kind.", - "This is a compute instance.", - "This is a compute disk.", - "This is a compute address.", - "This is a filestore instance.", - "This is a compute health check.", - "This is a compute forwarding rule.", - "This is a compute backend service.", - "This is a compute subnetwork.", - "This is a compute network.", - "This is a public accessible IP Address.", - "This is a compute instance group." - ], - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. resource name", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Cluster": { - "description": "The cluster for sqlserver", - "id": "Cluster", - "properties": { - "nodes": { - "description": "Output only. The nodes", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "witnessServer": { - "description": "Output only. The witness server", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Database": { - "description": "The database for sqlserver", - "id": "Database", - "properties": { - "backupFile": { - "description": "Output only. The backup file", - "readOnly": true, - "type": "string" - }, - "backupSchedule": { - "description": "Output only. The backup schedule", - "readOnly": true, - "type": "string" - }, - "hostVm": { - "description": "Output only. The host VM", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. The database name", - "readOnly": true, - "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", @@ -1226,31 +970,6 @@ }, "type": "object" }, - "FrontEndServer": { - "description": "The front end server", - "id": "FrontEndServer", - "properties": { - "name": { - "description": "Output only. The frontend name", - "readOnly": true, - "type": "string" - }, - "osVersion": { - "description": "Output only. OS information", - "readOnly": true, - "type": "string" - }, - "resources": { - "description": "Output only. resources in the component", - "items": { - "$ref": "CloudResource" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, "GceInstanceFilter": { "description": "Message describing compute engine instance filter", "id": "GceInstanceFilter", @@ -1294,81 +1013,6 @@ }, "type": "object" }, - "Instance": { - "description": "a vm instance", - "id": "Instance", - "properties": { - "name": { - "description": "Output only. name of the VM", - "readOnly": true, - "type": "string" - }, - "region": { - "description": "Output only. The location of the VM", - "readOnly": true, - "type": "string" - }, - "status": { - "description": "Output only. The state of the VM", - "enum": [ - "INSTANCESTATE_UNSPECIFIED", - "PROVISIONING", - "STAGING", - "RUNNING", - "STOPPING", - "STOPPED", - "TERMINATED", - "SUSPENDING", - "SUSPENDED", - "REPAIRING", - "DEPROVISIONING" - ], - "enumDescriptions": [ - "The Status of the VM is unspecified", - "Resources are being allocated for the instance.", - "All required resources have been allocated and the instance is being started.", - "The instance is running.", - "The instance is currently stopping (either being deleted or killed).", - "The instance has stopped due to various reasons (user request, VM preemption, project freezing, etc.).", - "The instance has failed in some way.", - "The instance is suspending.", - "The instance is suspended.", - "The instance is in repair.", - "The instance is in de-provisioning state." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Layer": { - "description": "The database layer", - "id": "Layer", - "properties": { - "applicationType": { - "description": "the application layer", - "type": "string" - }, - "databaseType": { - "description": "Optional. the database layer", - "type": "string" - }, - "instances": { - "description": "Optional. instances in a layer", - "items": { - "$ref": "Instance" - }, - "type": "array" - }, - "sid": { - "description": "Output only. system identification of a layer", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "ListEvaluationsResponse": { "description": "Message for response to listing Evaluations", "id": "ListEvaluationsResponse", @@ -1509,50 +1153,6 @@ }, "type": "object" }, - "ListWorkloadProfilesResponse": { - "description": "List workloadResponse returns a response with the list of workload overview", - "id": "ListWorkloadProfilesResponse", - "properties": { - "nextPageToken": { - "description": "Output only. A token identifying a page of results the server should return", - "readOnly": true, - "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - }, - "workloadOverviews": { - "description": "Output only. The list of Workload Overview", - "items": { - "$ref": "WorkloadProfileOverview" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "LoadBalancerServer": { - "description": "The load balancer for sqlserver", - "id": "LoadBalancerServer", - "properties": { - "ip": { - "description": "Output only. The IP address", - "readOnly": true, - "type": "string" - }, - "vm": { - "description": "Output only. The VM name", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "Location": { "description": "A resource that represents a Google Cloud location.", "id": "Location", @@ -1822,47 +1422,6 @@ }, "type": "object" }, - "SapComponent": { - "description": "The component of sap workload", - "id": "SapComponent", - "properties": { - "haHosts": { - "description": "A list of host URIs that are part of the HA configuration if present. An empty list indicates the component is not configured for HA.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resources": { - "description": "Output only. resources in the component", - "items": { - "$ref": "CloudResource" - }, - "readOnly": true, - "type": "array" - }, - "sid": { - "description": "Output only. sid is the sap component identificator", - "readOnly": true, - "type": "string" - }, - "topologyType": { - "description": "The detected topology of the component.", - "enum": [ - "TOPOLOGY_TYPE_UNSPECIFIED", - "TOPOLOGY_SCALE_UP", - "TOPOLOGY_SCALE_OUT" - ], - "enumDescriptions": [ - "Unspecified topology.", - "A scale-up single node system.", - "A scale-out multi-node system." - ], - "type": "string" - } - }, - "type": "object" - }, "SapDiscovery": { "description": "The schema of SAP system discovery data.", "id": "SapDiscovery", @@ -1975,6 +1534,10 @@ "description": "Optional. Resource URI of the recognized ASCS host of the application.", "type": "string" }, + "instanceNumber": { + "description": "Optional. Instance number of the SAP instance.", + "type": "string" + }, "kernelVersion": { "description": "Optional. Kernel version for Netweaver running in the system.", "type": "string" @@ -2010,6 +1573,10 @@ "description": "Optional. The version of the database software running in the system.", "type": "string" }, + "instanceNumber": { + "description": "Optional. Instance number of the SAP instance.", + "type": "string" + }, "primaryInstanceUri": { "description": "Required. URI of the recognized primary instance of the database.", "type": "string" @@ -2260,53 +1827,6 @@ }, "type": "object" }, - "SapWorkload": { - "description": "The body of sap workload", - "id": "SapWorkload", - "properties": { - "application": { - "$ref": "SapComponent", - "description": "Output only. the acsc componment", - "readOnly": true - }, - "database": { - "$ref": "SapComponent", - "description": "Output only. the database componment", - "readOnly": true - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Output only. The metadata for SAP workload.", - "readOnly": true, - "type": "object" - } - }, - "type": "object" - }, - "SapWorkloadOverview": { - "description": "The overview of sap workload", - "id": "SapWorkloadOverview", - "properties": { - "appSid": { - "description": "Output only. The application SID", - "readOnly": true, - "type": "string" - }, - "dbSid": { - "description": "Output only. The database SID", - "readOnly": true, - "type": "string" - }, - "sapSystemId": { - "description": "Output only. The UUID for a SAP workload", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "ScannedResource": { "description": "Message of scanned resource", "id": "ScannedResource", @@ -2410,59 +1930,6 @@ }, "type": "object" }, - "SqlserverWorkload": { - "description": "The body of sqlserver workload", - "id": "SqlserverWorkload", - "properties": { - "ags": { - "description": "Output only. The availability groups for sqlserver", - "items": { - "$ref": "AvailabilityGroup" - }, - "readOnly": true, - "type": "array" - }, - "cluster": { - "$ref": "Cluster", - "description": "Output only. The cluster for sqlserver", - "readOnly": true - }, - "databases": { - "description": "Output only. The databases for sqlserver", - "items": { - "$ref": "Database" - }, - "readOnly": true, - "type": "array" - }, - "loadBalancerServer": { - "$ref": "LoadBalancerServer", - "description": "Output only. The load balancer for sqlserver", - "readOnly": true - } - }, - "type": "object" - }, - "SqlserverWorkloadOverview": { - "description": "The overview of sqlserver workload", - "id": "SqlserverWorkloadOverview", - "properties": { - "availabilityGroup": { - "description": "Output only. The availability groups", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "sqlserverSystemId": { - "description": "Output only. The UUID for a Sqlserver workload", - "readOnly": true, - "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", @@ -2490,45 +1957,6 @@ }, "type": "object" }, - "ThreeTierWorkload": { - "description": "The body of three tier workload", - "id": "ThreeTierWorkload", - "properties": { - "apiLayer": { - "$ref": "APILayerServer", - "description": "Output only. The API layer for three tier workload", - "readOnly": true - }, - "backend": { - "$ref": "BackendServer", - "description": "Output only. The backend for three tier workload", - "readOnly": true - }, - "endpoint": { - "description": "Output only. the workload endpoint", - "readOnly": true, - "type": "string" - }, - "frontend": { - "$ref": "FrontEndServer", - "description": "Output only. The frontend for three tier workload", - "readOnly": true - } - }, - "type": "object" - }, - "ThreeTierWorkloadOverview": { - "description": "The overview of three tier workload", - "id": "ThreeTierWorkloadOverview", - "properties": { - "threeTierSystemId": { - "description": "Output only. The UUID for a three tier workload", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "ViolationDetails": { "description": "Message describing the violdation in execution result", "id": "ViolationDetails", @@ -2551,115 +1979,14 @@ }, "type": "object" }, - "WorkloadProfile": { - "description": "workload resource", - "id": "WorkloadProfile", - "properties": { - "application": { - "$ref": "Layer", - "deprecated": true, - "description": "Optional. The application layer" - }, - "ascs": { - "$ref": "Layer", - "deprecated": true, - "description": "Optional. The ascs layer" - }, - "database": { - "$ref": "Layer", - "deprecated": true, - "description": "Optional. The database layer" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. such as name, description, version. More example can be found in deployment", - "type": "object" - }, - "name": { - "description": "Identifier. name of resource names have the form 'projects/{project_id}/workloads/{workload_id}'", - "type": "string" - }, - "refreshedTime": { - "description": "Required. time when the workload data was refreshed", - "format": "google-datetime", - "type": "string" - }, - "sapWorkload": { - "$ref": "SapWorkload", - "description": "The sap workload content" - }, - "sqlserverWorkload": { - "$ref": "SqlserverWorkload", - "description": "The sqlserver workload content" - }, - "state": { - "deprecated": true, - "description": "Output only. [output only] the current state if a a workload", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "DEPLOYING", - "DESTROYING", - "MAINTENANCE" - ], - "enumDescriptions": [ - "unspecified", - "ACTIVE state", - "workload is in Deploying state", - "The workload is in Destroying state", - "The Workload is undermaintance" - ], - "readOnly": true, - "type": "string" - }, - "threeTierWorkload": { - "$ref": "ThreeTierWorkload", - "description": "The 3 tier web app workload content" - }, - "workloadType": { - "description": "Required. The type of the workload", - "enum": [ - "WORKLOAD_TYPE_UNSPECIFIED", - "S4_HANA", - "SQL_SERVER", - "THREE_TIER_WEB_APP" - ], - "enumDescriptions": [ - "unspecified workload type", - "running sap workload s4/hana", - "running sqlserver workload", - "running 3 tier web app workload" - ], - "type": "string" - } - }, - "type": "object" - }, - "WorkloadProfileOverview": { - "description": "a workload profile overview", - "id": "WorkloadProfileOverview", - "properties": { - "sapWorkloadOverview": { - "$ref": "SapWorkloadOverview", - "description": "The sap workload overview" - }, - "sqlserverWorkloadOverview": { - "$ref": "SqlserverWorkloadOverview", - "description": "The sqlserver workload overview" - }, - "threeTierWorkloadOverview": { - "$ref": "ThreeTierWorkloadOverview", - "description": "The three tier workload overview" - } - }, - "type": "object" - }, "WriteInsightRequest": { "description": "Request for sending the data insights.", "id": "WriteInsightRequest", "properties": { + "agentVersion": { + "description": "Optional. The agent version collected this data point.", + "type": "string" + }, "insight": { "$ref": "Insight", "description": "Required. The metrics data details." diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index e7a623edebc..a7d7adfd13a 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -173,7 +173,6 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Insights = NewProjectsLocationsInsightsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.Rules = NewProjectsLocationsRulesService(s) - rs.WorkloadProfiles = NewProjectsLocationsWorkloadProfilesService(s) return rs } @@ -187,8 +186,6 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService Rules *ProjectsLocationsRulesService - - WorkloadProfiles *ProjectsLocationsWorkloadProfilesService } func NewProjectsLocationsEvaluationsService(s *Service) *ProjectsLocationsEvaluationsService { @@ -263,126 +260,6 @@ type ProjectsLocationsRulesService struct { s *Service } -func NewProjectsLocationsWorkloadProfilesService(s *Service) *ProjectsLocationsWorkloadProfilesService { - rs := &ProjectsLocationsWorkloadProfilesService{s: s} - return rs -} - -type ProjectsLocationsWorkloadProfilesService struct { - s *Service -} - -// APILayerServer: The API layer server -type APILayerServer struct { - // Name: Output only. The api layer name - Name string `json:"name,omitempty"` - - // OsVersion: Output only. OS information - OsVersion string `json:"osVersion,omitempty"` - - // Resources: Output only. resources in the component - Resources []*CloudResource `json:"resources,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 *APILayerServer) MarshalJSON() ([]byte, error) { - type NoMethod APILayerServer - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AvailabilityGroup: The availability groups for sqlserver -type AvailabilityGroup struct { - // Databases: Output only. The databases - Databases []string `json:"databases,omitempty"` - - // Name: Output only. The availability group name - Name string `json:"name,omitempty"` - - // PrimaryServer: Output only. The primary server - PrimaryServer string `json:"primaryServer,omitempty"` - - // SecondaryServers: Output only. The secondary servers - SecondaryServers []string `json:"secondaryServers,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Databases") 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. "Databases") 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 *AvailabilityGroup) MarshalJSON() ([]byte, error) { - type NoMethod AvailabilityGroup - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServer: The backend server -type BackendServer struct { - // BackupFile: Output only. The backup file - BackupFile string `json:"backupFile,omitempty"` - - // BackupSchedule: Output only. The backup schedule - BackupSchedule string `json:"backupSchedule,omitempty"` - - // Name: Output only. The backend name - Name string `json:"name,omitempty"` - - // OsVersion: Output only. OS information - OsVersion string `json:"osVersion,omitempty"` - - // Resources: Output only. resources in the component - Resources []*CloudResource `json:"resources,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BackupFile") 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. "BackupFile") 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 *BackendServer) MarshalJSON() ([]byte, error) { - type NoMethod BackendServer - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // BigQueryDestination: Message describing big query destination type BigQueryDestination struct { // CreateNewResultsTable: Optional. determine if results will be saved @@ -423,123 +300,6 @@ func (s *BigQueryDestination) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } -// CloudResource: The resource on GCP -type CloudResource struct { - // Kind: Output only. ComputeInstance, ComputeDisk, VPC, Bare Metal - // server, etc. - // - // Possible values: - // "RESOURCE_KIND_UNSPECIFIED" - Unspecified resource kind. - // "RESOURCE_KIND_INSTANCE" - This is a compute instance. - // "RESOURCE_KIND_DISK" - This is a compute disk. - // "RESOURCE_KIND_ADDRESS" - This is a compute address. - // "RESOURCE_KIND_FILESTORE" - This is a filestore instance. - // "RESOURCE_KIND_HEALTH_CHECK" - This is a compute health check. - // "RESOURCE_KIND_FORWARDING_RULE" - This is a compute forwarding - // rule. - // "RESOURCE_KIND_BACKEND_SERVICE" - This is a compute backend - // service. - // "RESOURCE_KIND_SUBNETWORK" - This is a compute subnetwork. - // "RESOURCE_KIND_NETWORK" - This is a compute network. - // "RESOURCE_KIND_PUBLIC_ADDRESS" - This is a public accessible IP - // Address. - // "RESOURCE_KIND_INSTANCE_GROUP" - This is a compute instance group. - Kind string `json:"kind,omitempty"` - - // Name: Output only. resource name - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 *CloudResource) MarshalJSON() ([]byte, error) { - type NoMethod CloudResource - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Cluster: The cluster for sqlserver -type Cluster struct { - // Nodes: Output only. The nodes - Nodes []string `json:"nodes,omitempty"` - - // WitnessServer: Output only. The witness server - WitnessServer string `json:"witnessServer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Nodes") 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. "Nodes") 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 *Cluster) MarshalJSON() ([]byte, error) { - type NoMethod Cluster - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Database: The database for sqlserver -type Database struct { - // BackupFile: Output only. The backup file - BackupFile string `json:"backupFile,omitempty"` - - // BackupSchedule: Output only. The backup schedule - BackupSchedule string `json:"backupSchedule,omitempty"` - - // HostVm: Output only. The host VM - HostVm string `json:"hostVm,omitempty"` - - // Name: Output only. The database name - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BackupFile") 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. "BackupFile") 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 *Database) MarshalJSON() ([]byte, error) { - type NoMethod Database - 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 @@ -734,40 +494,6 @@ func (s *ExecutionResult) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FrontEndServer: The front end server -type FrontEndServer struct { - // Name: Output only. The frontend name - Name string `json:"name,omitempty"` - - // OsVersion: Output only. OS information - OsVersion string `json:"osVersion,omitempty"` - - // Resources: Output only. resources in the component - Resources []*CloudResource `json:"resources,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 *FrontEndServer) MarshalJSON() ([]byte, error) { - type NoMethod FrontEndServer - 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 @@ -842,94 +568,6 @@ func (s *Insight) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Instance: a vm instance -type Instance struct { - // Name: Output only. name of the VM - Name string `json:"name,omitempty"` - - // Region: Output only. The location of the VM - Region string `json:"region,omitempty"` - - // Status: Output only. The state of the VM - // - // Possible values: - // "INSTANCESTATE_UNSPECIFIED" - The Status of the VM is unspecified - // "PROVISIONING" - Resources are being allocated for the instance. - // "STAGING" - All required resources have been allocated and the - // instance is being started. - // "RUNNING" - The instance is running. - // "STOPPING" - The instance is currently stopping (either being - // deleted or killed). - // "STOPPED" - The instance has stopped due to various reasons (user - // request, VM preemption, project freezing, etc.). - // "TERMINATED" - The instance has failed in some way. - // "SUSPENDING" - The instance is suspending. - // "SUSPENDED" - The instance is suspended. - // "REPAIRING" - The instance is in repair. - // "DEPROVISIONING" - The instance is in de-provisioning state. - Status string `json:"status,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 *Instance) MarshalJSON() ([]byte, error) { - type NoMethod Instance - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Layer: The database layer -type Layer struct { - // ApplicationType: the application layer - ApplicationType string `json:"applicationType,omitempty"` - - // DatabaseType: Optional. the database layer - DatabaseType string `json:"databaseType,omitempty"` - - // Instances: Optional. instances in a layer - Instances []*Instance `json:"instances,omitempty"` - - // Sid: Output only. system identification of a layer - Sid string `json:"sid,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ApplicationType") 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. "ApplicationType") 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 *Layer) MarshalJSON() ([]byte, error) { - type NoMethod Layer - 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 @@ -1195,86 +833,15 @@ func (s *ListScannedResourcesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListWorkloadProfilesResponse: List workloadResponse returns a -// response with the list of workload overview -type ListWorkloadProfilesResponse struct { - // NextPageToken: Output only. A token identifying a page of results the - // server should return - NextPageToken string `json:"nextPageToken,omitempty"` +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` - // Unreachable: Locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` - - // WorkloadOverviews: Output only. The list of Workload Overview - WorkloadOverviews []*WorkloadProfileOverview `json:"workloadOverviews,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 *ListWorkloadProfilesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkloadProfilesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LoadBalancerServer: The load balancer for sqlserver -type LoadBalancerServer struct { - // Ip: Output only. The IP address - Ip string `json:"ip,omitempty"` - - // Vm: Output only. The VM name - Vm string `json:"vm,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Ip") 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. "Ip") 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 *LoadBalancerServer) MarshalJSON() ([]byte, error) { - type NoMethod LoadBalancerServer - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Location: A resource that represents a Google Cloud 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"` + // 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". @@ -1648,50 +1215,6 @@ func (s *RunEvaluationRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SapComponent: The component of sap workload -type SapComponent struct { - // HaHosts: A list of host URIs that are part of the HA configuration if - // present. An empty list indicates the component is not configured for - // HA. - HaHosts []string `json:"haHosts,omitempty"` - - // Resources: Output only. resources in the component - Resources []*CloudResource `json:"resources,omitempty"` - - // Sid: Output only. sid is the sap component identificator - Sid string `json:"sid,omitempty"` - - // TopologyType: The detected topology of the component. - // - // Possible values: - // "TOPOLOGY_TYPE_UNSPECIFIED" - Unspecified topology. - // "TOPOLOGY_SCALE_UP" - A scale-up single node system. - // "TOPOLOGY_SCALE_OUT" - A scale-out multi-node system. - TopologyType string `json:"topologyType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HaHosts") 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. "HaHosts") 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 *SapComponent) MarshalJSON() ([]byte, error) { - type NoMethod SapComponent - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // SapDiscovery: The schema of SAP system discovery data. type SapDiscovery struct { // ApplicationLayer: Optional. An SAP system may run without an @@ -1819,6 +1342,9 @@ type SapDiscoveryComponentApplicationProperties struct { // application. AscsUri string `json:"ascsUri,omitempty"` + // InstanceNumber: Optional. Instance number of the SAP instance. + InstanceNumber string `json:"instanceNumber,omitempty"` + // KernelVersion: Optional. Kernel version for Netweaver running in the // system. KernelVersion string `json:"kernelVersion,omitempty"` @@ -1867,6 +1393,9 @@ type SapDiscoveryComponentDatabaseProperties struct { // running in the system. DatabaseVersion string `json:"databaseVersion,omitempty"` + // InstanceNumber: Optional. Instance number of the SAP instance. + InstanceNumber string `json:"instanceNumber,omitempty"` + // PrimaryInstanceUri: Required. URI of the recognized primary instance // of the database. PrimaryInstanceUri string `json:"primaryInstanceUri,omitempty"` @@ -2249,74 +1778,6 @@ func (s *SapValidationValidationDetail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SapWorkload: The body of sap workload -type SapWorkload struct { - // Application: Output only. the acsc componment - Application *SapComponent `json:"application,omitempty"` - - // Database: Output only. the database componment - Database *SapComponent `json:"database,omitempty"` - - // Metadata: Output only. The metadata for SAP workload. - Metadata map[string]string `json:"metadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Application") 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. "Application") 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 *SapWorkload) MarshalJSON() ([]byte, error) { - type NoMethod SapWorkload - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SapWorkloadOverview: The overview of sap workload -type SapWorkloadOverview struct { - // AppSid: Output only. The application SID - AppSid string `json:"appSid,omitempty"` - - // DbSid: Output only. The database SID - DbSid string `json:"dbSid,omitempty"` - - // SapSystemId: Output only. The UUID for a SAP workload - SapSystemId string `json:"sapSystemId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AppSid") 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. "AppSid") 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 *SapWorkloadOverview) MarshalJSON() ([]byte, error) { - type NoMethod SapWorkloadOverview - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ScannedResource: Message of scanned resource type ScannedResource struct { // Resource: resource name @@ -2470,75 +1931,6 @@ func (s *SqlserverValidationValidationDetail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SqlserverWorkload: The body of sqlserver workload -type SqlserverWorkload struct { - // Ags: Output only. The availability groups for sqlserver - Ags []*AvailabilityGroup `json:"ags,omitempty"` - - // Cluster: Output only. The cluster for sqlserver - Cluster *Cluster `json:"cluster,omitempty"` - - // Databases: Output only. The databases for sqlserver - Databases []*Database `json:"databases,omitempty"` - - // LoadBalancerServer: Output only. The load balancer for sqlserver - LoadBalancerServer *LoadBalancerServer `json:"loadBalancerServer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Ags") 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. "Ags") 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 *SqlserverWorkload) MarshalJSON() ([]byte, error) { - type NoMethod SqlserverWorkload - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SqlserverWorkloadOverview: The overview of sqlserver workload -type SqlserverWorkloadOverview struct { - // AvailabilityGroup: Output only. The availability groups - AvailabilityGroup []string `json:"availabilityGroup,omitempty"` - - // SqlserverSystemId: Output only. The UUID for a Sqlserver workload - SqlserverSystemId string `json:"sqlserverSystemId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AvailabilityGroup") - // 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. "AvailabilityGroup") 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 *SqlserverWorkloadOverview) MarshalJSON() ([]byte, error) { - type NoMethod SqlserverWorkloadOverview - 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 @@ -2583,72 +1975,6 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ThreeTierWorkload: The body of three tier workload -type ThreeTierWorkload struct { - // ApiLayer: Output only. The API layer for three tier workload - ApiLayer *APILayerServer `json:"apiLayer,omitempty"` - - // Backend: Output only. The backend for three tier workload - Backend *BackendServer `json:"backend,omitempty"` - - // Endpoint: Output only. the workload endpoint - Endpoint string `json:"endpoint,omitempty"` - - // Frontend: Output only. The frontend for three tier workload - Frontend *FrontEndServer `json:"frontend,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ApiLayer") 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. "ApiLayer") 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 *ThreeTierWorkload) MarshalJSON() ([]byte, error) { - type NoMethod ThreeTierWorkload - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ThreeTierWorkloadOverview: The overview of three tier workload -type ThreeTierWorkloadOverview struct { - // ThreeTierSystemId: Output only. The UUID for a three tier workload - ThreeTierSystemId string `json:"threeTierSystemId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ThreeTierSystemId") - // 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. "ThreeTierSystemId") 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 *ThreeTierWorkloadOverview) MarshalJSON() ([]byte, error) { - type NoMethod ThreeTierWorkloadOverview - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ViolationDetails: Message describing the violdation in execution // result type ViolationDetails struct { @@ -2684,69 +2010,37 @@ func (s *ViolationDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// WorkloadProfile: workload resource -type WorkloadProfile struct { - // Application: Optional. The application layer - Application *Layer `json:"application,omitempty"` - - // Ascs: Optional. The ascs layer - Ascs *Layer `json:"ascs,omitempty"` - - // Database: Optional. The database layer - Database *Layer `json:"database,omitempty"` - - // Labels: Optional. such as name, description, version. More example - // can be found in deployment - Labels map[string]string `json:"labels,omitempty"` - - // Name: Identifier. name of resource names have the form - // 'projects/{project_id}/workloads/{workload_id}' - Name string `json:"name,omitempty"` +// WriteInsightRequest: Request for sending the data insights. +type WriteInsightRequest struct { + // AgentVersion: Optional. The agent version collected this data point. + AgentVersion string `json:"agentVersion,omitempty"` - // RefreshedTime: Required. time when the workload data was refreshed - RefreshedTime string `json:"refreshedTime,omitempty"` + // Insight: Required. The metrics data details. + Insight *Insight `json:"insight,omitempty"` - // SapWorkload: The sap workload content - SapWorkload *SapWorkload `json:"sapWorkload,omitempty"` + // RequestId: 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 the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` - // SqlserverWorkload: The sqlserver workload content - SqlserverWorkload *SqlserverWorkload `json:"sqlserverWorkload,omitempty"` + // ForceSendFields is a list of field names (e.g. "AgentVersion") 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:"-"` - // State: Output only. [output only] the current state if a a workload - // - // Possible values: - // "STATE_UNSPECIFIED" - unspecified - // "ACTIVE" - ACTIVE state - // "DEPLOYING" - workload is in Deploying state - // "DESTROYING" - The workload is in Destroying state - // "MAINTENANCE" - The Workload is undermaintance - State string `json:"state,omitempty"` - - // ThreeTierWorkload: The 3 tier web app workload content - ThreeTierWorkload *ThreeTierWorkload `json:"threeTierWorkload,omitempty"` - - // WorkloadType: Required. The type of the workload - // - // Possible values: - // "WORKLOAD_TYPE_UNSPECIFIED" - unspecified workload type - // "S4_HANA" - running sap workload s4/hana - // "SQL_SERVER" - running sqlserver workload - // "THREE_TIER_WEB_APP" - running 3 tier web app workload - WorkloadType string `json:"workloadType,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Application") 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. "Application") to include + // NullFields is a list of field names (e.g. "AgentVersion") 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 @@ -2755,83 +2049,6 @@ type WorkloadProfile struct { NullFields []string `json:"-"` } -func (s *WorkloadProfile) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadProfile - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// WorkloadProfileOverview: a workload profile overview -type WorkloadProfileOverview struct { - // SapWorkloadOverview: The sap workload overview - SapWorkloadOverview *SapWorkloadOverview `json:"sapWorkloadOverview,omitempty"` - - // SqlserverWorkloadOverview: The sqlserver workload overview - SqlserverWorkloadOverview *SqlserverWorkloadOverview `json:"sqlserverWorkloadOverview,omitempty"` - - // ThreeTierWorkloadOverview: The three tier workload overview - ThreeTierWorkloadOverview *ThreeTierWorkloadOverview `json:"threeTierWorkloadOverview,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SapWorkloadOverview") - // 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. "SapWorkloadOverview") 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 *WorkloadProfileOverview) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadProfileOverview - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// WriteInsightRequest: Request for sending the data insights. -type WriteInsightRequest struct { - // Insight: Required. The metrics data details. - Insight *Insight `json:"insight,omitempty"` - - // RequestId: 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 the request times out. If you make the - // request again with the same request ID, the server can check if - // original operation with the same request ID was received, and if so, - // will ignore the second request. This prevents clients from - // accidentally creating duplicate commitments. The request ID must be a - // valid UUID with the exception that zero UUID is not supported - // (00000000-0000-0000-0000-000000000000). - RequestId string `json:"requestId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Insight") 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. "Insight") 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 *WriteInsightRequest) MarshalJSON() ([]byte, error) { type NoMethod WriteInsightRequest raw := NoMethod(*s) @@ -5992,354 +5209,3 @@ func (c *ProjectsLocationsRulesListCall) Pages(ctx context.Context, f func(*List c.PageToken(x.NextPageToken) } } - -// method id "workloadmanager.projects.locations.workloadProfiles.get": - -type ProjectsLocationsWorkloadProfilesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single workload. -// -// - name: Name of the resource. -func (r *ProjectsLocationsWorkloadProfilesService) Get(name string) *ProjectsLocationsWorkloadProfilesGetCall { - c := &ProjectsLocationsWorkloadProfilesGetCall{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 *ProjectsLocationsWorkloadProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadProfilesGetCall { - 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 *ProjectsLocationsWorkloadProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadProfilesGetCall { - 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 *ProjectsLocationsWorkloadProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadProfilesGetCall { - 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 *ProjectsLocationsWorkloadProfilesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadProfilesGetCall) 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.workloadProfiles.get" call. -// Exactly one of *WorkloadProfile or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *WorkloadProfile.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 *ProjectsLocationsWorkloadProfilesGetCall) Do(opts ...googleapi.CallOption) (*WorkloadProfile, 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 := &WorkloadProfile{ - 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 workload.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadProfiles/{workloadProfilesId}", - // "httpMethod": "GET", - // "id": "workloadmanager.projects.locations.workloadProfiles.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the resource", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/workloadProfiles/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "WorkloadProfile" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "workloadmanager.projects.locations.workloadProfiles.list": - -type ProjectsLocationsWorkloadProfilesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List workloads -// -// - parent: Parent value for ListWorkloadRequest. -func (r *ProjectsLocationsWorkloadProfilesService) List(parent string) *ProjectsLocationsWorkloadProfilesListCall { - c := &ProjectsLocationsWorkloadProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsWorkloadProfilesListCall) Filter(filter string) *ProjectsLocationsWorkloadProfilesListCall { - c.urlParams_.Set("filter", filter) - 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 *ProjectsLocationsWorkloadProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadProfilesListCall { - 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 *ProjectsLocationsWorkloadProfilesListCall) PageToken(pageToken string) *ProjectsLocationsWorkloadProfilesListCall { - 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 *ProjectsLocationsWorkloadProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadProfilesListCall { - 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 *ProjectsLocationsWorkloadProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadProfilesListCall { - 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 *ProjectsLocationsWorkloadProfilesListCall) Context(ctx context.Context) *ProjectsLocationsWorkloadProfilesListCall { - 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 *ProjectsLocationsWorkloadProfilesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWorkloadProfilesListCall) 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}/workloadProfiles") - 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.workloadProfiles.list" call. -// Exactly one of *ListWorkloadProfilesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListWorkloadProfilesResponse.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 *ProjectsLocationsWorkloadProfilesListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadProfilesResponse, 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 := &ListWorkloadProfilesResponse{ - 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 - // { - // "deprecated": true, - // "description": "List workloads", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadProfiles", - // "httpMethod": "GET", - // "id": "workloadmanager.projects.locations.workloadProfiles.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filtering results", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. 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": "Optional. A token identifying a page of results the server should return.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent value for ListWorkloadRequest", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/workloadProfiles", - // "response": { - // "$ref": "ListWorkloadProfilesResponse" - // }, - // "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 *ProjectsLocationsWorkloadProfilesListCall) Pages(ctx context.Context, f func(*ListWorkloadProfilesResponse) 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) - } -}