From a8b0821bdcc9a5e76db236bfce38823ab36002de Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 27 Jul 2024 00:20:18 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2700) --- bigtableadmin/v2/bigtableadmin-api.json | 14 +- bigtableadmin/v2/bigtableadmin-gen.go | 25 +- .../v1/contactcenterinsights-api.json | 185 +- .../v1/contactcenterinsights-gen.go | 414 + datamigration/v1/datamigration-api.json | 8 +- datamigration/v1/datamigration-gen.go | 4 + dataplex/v1/dataplex-api.json | 685 +- dataplex/v1/dataplex-gen.go | 9027 ++++++++++------- dlp/v2/dlp-api.json | 67 +- dlp/v2/dlp-gen.go | 183 +- .../v1/networkconnectivity-api.json | 4 +- .../v1/networkconnectivity-gen.go | 5 +- .../v1/networkmanagement-api.json | 6 +- networkmanagement/v1/networkmanagement-gen.go | 3 + .../v1beta1/networkmanagement-api.json | 6 +- .../v1beta1/networkmanagement-gen.go | 3 + playintegrity/v1/playintegrity-api.json | 43 +- playintegrity/v1/playintegrity-gen.go | 67 +- run/v1/run-api.json | 4 +- run/v1/run-gen.go | 7 + workspaceevents/v1/workspaceevents-api.json | 12 +- workspaceevents/v1/workspaceevents-gen.go | 15 +- 22 files changed, 6991 insertions(+), 3796 deletions(-) diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index b475349b9ca..e2107c9aa05 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -2194,7 +2194,7 @@ } } }, - "revision": "20240703", + "revision": "20240720", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -3325,6 +3325,10 @@ "utf8Bytes": { "$ref": "GoogleBigtableAdminV2TypeStringEncodingUtf8Bytes", "description": "Use `Utf8Bytes` encoding." + }, + "utf8Raw": { + "$ref": "GoogleBigtableAdminV2TypeStringEncodingUtf8Raw", + "description": "Deprecated: if set, converts to an empty `utf8_bytes`." } }, "type": "object" @@ -3335,6 +3339,12 @@ "properties": {}, "type": "object" }, + "GoogleBigtableAdminV2TypeStringEncodingUtf8Raw": { + "description": "Deprecated: prefer the equivalent `Utf8Bytes`.", + "id": "GoogleBigtableAdminV2TypeStringEncodingUtf8Raw", + "properties": {}, + "type": "object" + }, "GoogleBigtableAdminV2TypeStruct": { "description": "A structured data value, consisting of fields which map to dynamically typed values. Values of type `Struct` are stored in `Value.array_value` where entries are in the same order and number as `field_types`.", "id": "GoogleBigtableAdminV2TypeStruct", @@ -4246,7 +4256,7 @@ "type": "object" }, "Type": { - "description": "`Type` represents the type of data that is written to, read from, or stored in Bigtable. It is heavily based on the GoogleSQL standard to help maintain familiarity and consistency across products and features. For compatibility with Bigtable's existing untyped APIs, each `Type` includes an `Encoding` which describes how to convert to/from the underlying data. Each encoding also defines the following properties: * Order-preserving: Does the encoded value sort consistently with the original typed value? Note that Bigtable will always sort data based on the raw encoded value, *not* the decoded type. - Example: BYTES values sort in the same order as their raw encodings. - Counterexample: Encoding INT64 as a fixed-width decimal string does *not* preserve sort order when dealing with negative numbers. INT64(1) \u003e INT64(-1), but STRING(\"-00001\") \u003e STRING(\"00001). * Self-delimiting: If we concatenate two encoded values, can we always tell where the first one ends and the second one begins? - Example: If we encode INT64s to fixed-width STRINGs, the first value will always contain exactly N digits, possibly preceded by a sign. - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have no way to tell where the first one ends. * Compatibility: Which other systems have matching encoding schemes? For example, does this encoding have a GoogleSQL equivalent? HBase? Java?", + "description": "`Type` represents the type of data that is written to, read from, or stored in Bigtable. It is heavily based on the GoogleSQL standard to help maintain familiarity and consistency across products and features. For compatibility with Bigtable's existing untyped APIs, each `Type` includes an `Encoding` which describes how to convert to/from the underlying data. Each encoding also defines the following properties: * Order-preserving: Does the encoded value sort consistently with the original typed value? Note that Bigtable will always sort data based on the raw encoded value, *not* the decoded type. - Example: BYTES values sort in the same order as their raw encodings. - Counterexample: Encoding INT64 as a fixed-width decimal string does *not* preserve sort order when dealing with negative numbers. `INT64(1) \u003e INT64(-1)`, but `STRING(\"-00001\") \u003e STRING(\"00001)`. * Self-delimiting: If we concatenate two encoded values, can we always tell where the first one ends and the second one begins? - Example: If we encode INT64s to fixed-width STRINGs, the first value will always contain exactly N digits, possibly preceded by a sign. - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have no way to tell where the first one ends. * Compatibility: Which other systems have matching encoding schemes? For example, does this encoding have a GoogleSQL equivalent? HBase? Java?", "id": "Type", "properties": { "aggregateType": { diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index d9aff7b08f8..ef60a791e61 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -2109,6 +2109,8 @@ func (s GoogleBigtableAdminV2TypeString) MarshalJSON() ([]byte, error) { type GoogleBigtableAdminV2TypeStringEncoding struct { // Utf8Bytes: Use `Utf8Bytes` encoding. Utf8Bytes *GoogleBigtableAdminV2TypeStringEncodingUtf8Bytes `json:"utf8Bytes,omitempty"` + // Utf8Raw: Deprecated: if set, converts to an empty `utf8_bytes`. + Utf8Raw *GoogleBigtableAdminV2TypeStringEncodingUtf8Raw `json:"utf8Raw,omitempty"` // ForceSendFields is a list of field names (e.g. "Utf8Bytes") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2134,6 +2136,11 @@ func (s GoogleBigtableAdminV2TypeStringEncoding) MarshalJSON() ([]byte, error) { type GoogleBigtableAdminV2TypeStringEncodingUtf8Bytes struct { } +// GoogleBigtableAdminV2TypeStringEncodingUtf8Raw: Deprecated: prefer the +// equivalent `Utf8Bytes`. +type GoogleBigtableAdminV2TypeStringEncodingUtf8Raw struct { +} + // GoogleBigtableAdminV2TypeStruct: A structured data value, consisting of // fields which map to dynamically typed values. Values of type `Struct` are // stored in `Value.array_value` where entries are in the same order and number @@ -3495,15 +3502,15 @@ func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { // Bigtable will always sort data based on the raw encoded value, *not* the // decoded type. - Example: BYTES values sort in the same order as their raw // encodings. - Counterexample: Encoding INT64 as a fixed-width decimal string -// does *not* preserve sort order when dealing with negative numbers. INT64(1) -// > INT64(-1), but STRING("-00001") > STRING("00001). * Self-delimiting: If we -// concatenate two encoded values, can we always tell where the first one ends -// and the second one begins? - Example: If we encode INT64s to fixed-width -// STRINGs, the first value will always contain exactly N digits, possibly -// preceded by a sign. - Counterexample: If we concatenate two UTF-8 encoded -// STRINGs, we have no way to tell where the first one ends. * Compatibility: -// Which other systems have matching encoding schemes? For example, does this -// encoding have a GoogleSQL equivalent? HBase? Java? +// does *not* preserve sort order when dealing with negative numbers. `INT64(1) +// > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. * Self-delimiting: If +// we concatenate two encoded values, can we always tell where the first one +// ends and the second one begins? - Example: If we encode INT64s to +// fixed-width STRINGs, the first value will always contain exactly N digits, +// possibly preceded by a sign. - Counterexample: If we concatenate two UTF-8 +// encoded STRINGs, we have no way to tell where the first one ends. * +// Compatibility: Which other systems have matching encoding schemes? For +// example, does this encoding have a GoogleSQL equivalent? HBase? Java? type Type struct { // AggregateType: Aggregate AggregateType *GoogleBigtableAdminV2TypeAggregate `json:"aggregateType,omitempty"` diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 822b2718050..7de83e9e1aa 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -109,6 +109,31 @@ "resources": { "locations": { "methods": { + "getEncryptionSpec": { + "description": "Gets location-level encryption key specification.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/encryptionSpec", + "httpMethod": "GET", + "id": "contactcenterinsights.projects.locations.getEncryptionSpec", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the encryption spec resource to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/encryptionSpec$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudContactcenterinsightsV1EncryptionSpec" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getSettings": { "description": "Gets project-level settings.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", @@ -640,6 +665,38 @@ } } }, + "encryptionSpec": { + "methods": { + "initialize": { + "description": "Initializes a location-level encryption key specification. An error will be thrown if the location has resources already created before the initialization. Once the encryption specification is initialized at a location, it is immutable and all newly created resources under the location will be encrypted with the existing specification.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/encryptionSpec:initialize", + "httpMethod": "POST", + "id": "contactcenterinsights.projects.locations.encryptionSpec.initialize", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the encryption key specification resource. Format: projects/{project}/locations/{location}/encryptionSpec", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/encryptionSpec$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:initialize", + "request": { + "$ref": "GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "insightsdata": { "methods": { "export": { @@ -1474,7 +1531,7 @@ } } }, - "revision": "20240701", + "revision": "20240723", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -2646,6 +2703,21 @@ }, "type": "object" }, + "GoogleCloudContactcenterinsightsV1EncryptionSpec": { + "description": "A customer-managed encryption key specification that can be applied to all created resources (e.g. Conversation).", + "id": "GoogleCloudContactcenterinsightsV1EncryptionSpec", + "properties": { + "kmsKey": { + "description": "Required. The name of customer-managed encryption key that is used to secure a resource and its sub-resources. If empty, the resource is secured by the default Google encryption key. Only the key in the same location as this resource is allowed to be used for encryption. Format: `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}`", + "type": "string" + }, + "name": { + "description": "Immutable. The resource name of the encryption key specification resource. Format: projects/{project}/locations/{location}/encryptionSpec", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudContactcenterinsightsV1Entity": { "description": "The data for an entity annotation. Represents a phrase in the conversation that is a known entity, such as a person, an organization, or location.", "id": "GoogleCloudContactcenterinsightsV1Entity", @@ -3193,6 +3265,54 @@ "properties": {}, "type": "object" }, + "GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecMetadata": { + "description": "Metadata for initializing a location-level encryption specification.", + "id": "GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecMetadata", + "properties": { + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "partialErrors": { + "description": "Partial errors during initialising operation that might cause the operation output to be incomplete.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "request": { + "$ref": "GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest", + "description": "Output only. The original request for initialization.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest": { + "description": "The request to initialize a location-level encryption specification.", + "id": "GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest", + "properties": { + "encryptionSpec": { + "$ref": "GoogleCloudContactcenterinsightsV1EncryptionSpec", + "description": "Required. The encryption spec used for CMEK encryption. It is required that the kms key is in the same region as the endpoint. The same key will be used for all provisioned resources, if encryption is available. If the kms_key_name is left empty, no encryption will be enforced." + } + }, + "type": "object" + }, + "GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecResponse": { + "description": "The response to initialize a location-level encryption specification.", + "id": "GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudContactcenterinsightsV1Intent": { "description": "The data for an intent. Represents a detected intent in the conversation, for example MAKES_PROMISE.", "id": "GoogleCloudContactcenterinsightsV1Intent", @@ -5180,6 +5300,21 @@ }, "type": "object" }, + "GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec": { + "description": "A customer-managed encryption key specification that can be applied to all created resources (e.g. Conversation).", + "id": "GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec", + "properties": { + "kmsKey": { + "description": "Required. The name of customer-managed encryption key that is used to secure a resource and its sub-resources. If empty, the resource is secured by the default Google encryption key. Only the key in the same location as this resource is allowed to be used for encryption. Format: `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}`", + "type": "string" + }, + "name": { + "description": "Immutable. The resource name of the encryption key specification resource. Format: projects/{project}/locations/{location}/encryptionSpec", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudContactcenterinsightsV1alpha1Entity": { "description": "The data for an entity annotation. Represents a phrase in the conversation that is a known entity, such as a person, an organization, or location.", "id": "GoogleCloudContactcenterinsightsV1alpha1Entity", @@ -5716,6 +5851,54 @@ "properties": {}, "type": "object" }, + "GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecMetadata": { + "description": "Metadata for initializing a location-level encryption specification.", + "id": "GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecMetadata", + "properties": { + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "partialErrors": { + "description": "Partial errors during initialising operation that might cause the operation output to be incomplete.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "request": { + "$ref": "GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest", + "description": "Output only. The original request for initialization.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest": { + "description": "The request to initialize a location-level encryption specification.", + "id": "GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest", + "properties": { + "encryptionSpec": { + "$ref": "GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec", + "description": "Required. The encryption spec used for CMEK encryption. It is required that the kms key is in the same region as the endpoint. The same key will be used for all provisioned resources, if encryption is available. If the kms_key_name is left empty, no encryption will be enforced." + } + }, + "type": "object" + }, + "GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecResponse": { + "description": "The response to initialize a location-level encryption specification.", + "id": "GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudContactcenterinsightsV1alpha1Intent": { "description": "The data for an intent. Represents a detected intent in the conversation, for example MAKES_PROMISE.", "id": "GoogleCloudContactcenterinsightsV1alpha1Intent", diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index e161b98546e..eb32c45af91 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -169,6 +169,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Conversations = NewProjectsLocationsConversationsService(s) + rs.EncryptionSpec = NewProjectsLocationsEncryptionSpecService(s) rs.Insightsdata = NewProjectsLocationsInsightsdataService(s) rs.IssueModels = NewProjectsLocationsIssueModelsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -182,6 +183,8 @@ type ProjectsLocationsService struct { Conversations *ProjectsLocationsConversationsService + EncryptionSpec *ProjectsLocationsEncryptionSpecService + Insightsdata *ProjectsLocationsInsightsdataService IssueModels *ProjectsLocationsIssueModelsService @@ -214,6 +217,15 @@ type ProjectsLocationsConversationsAnalysesService struct { s *Service } +func NewProjectsLocationsEncryptionSpecService(s *Service) *ProjectsLocationsEncryptionSpecService { + rs := &ProjectsLocationsEncryptionSpecService{s: s} + return rs +} + +type ProjectsLocationsEncryptionSpecService struct { + s *Service +} + func NewProjectsLocationsInsightsdataService(s *Service) *ProjectsLocationsInsightsdataService { rs := &ProjectsLocationsInsightsdataService{s: s} return rs @@ -1716,6 +1728,40 @@ func (s GoogleCloudContactcenterinsightsV1DialogflowSource) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudContactcenterinsightsV1EncryptionSpec: A customer-managed +// encryption key specification that can be applied to all created resources +// (e.g. Conversation). +type GoogleCloudContactcenterinsightsV1EncryptionSpec struct { + // KmsKey: Required. The name of customer-managed encryption key that is used + // to secure a resource and its sub-resources. If empty, the resource is + // secured by the default Google encryption key. Only the key in the same + // location as this resource is allowed to be used for encryption. Format: + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}` + KmsKey string `json:"kmsKey,omitempty"` + // Name: Immutable. The resource name of the encryption key specification + // resource. Format: projects/{project}/locations/{location}/encryptionSpec + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "KmsKey") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "KmsKey") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudContactcenterinsightsV1EncryptionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1EncryptionSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudContactcenterinsightsV1Entity: The data for an entity annotation. // Represents a phrase in the conversation that is a known entity, such as a // person, an organization, or location. @@ -2439,6 +2485,67 @@ func (s GoogleCloudContactcenterinsightsV1IngestConversationsRequestTranscriptOb type GoogleCloudContactcenterinsightsV1IngestConversationsResponse struct { } +// GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecMetadata: Metadata +// for initializing a location-level encryption specification. +type GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecMetadata struct { + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // PartialErrors: Partial errors during initialising operation that might cause + // the operation output to be incomplete. + PartialErrors []*GoogleRpcStatus `json:"partialErrors,omitempty"` + // Request: Output only. The original request for initialization. + Request *GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest `json:"request,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest: The +// request to initialize a location-level encryption specification. +type GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest struct { + // EncryptionSpec: Required. The encryption spec used for CMEK encryption. It + // is required that the kms key is in the same region as the endpoint. The same + // key will be used for all provisioned resources, if encryption is available. + // If the kms_key_name is left empty, no encryption will be enforced. + EncryptionSpec *GoogleCloudContactcenterinsightsV1EncryptionSpec `json:"encryptionSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "EncryptionSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EncryptionSpec") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecResponse: The +// response to initialize a location-level encryption specification. +type GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecResponse struct { +} + // GoogleCloudContactcenterinsightsV1Intent: The data for an intent. Represents // a detected intent in the conversation, for example MAKES_PROMISE. type GoogleCloudContactcenterinsightsV1Intent struct { @@ -5012,6 +5119,37 @@ func (s GoogleCloudContactcenterinsightsV1alpha1DialogflowSource) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec: A customer-managed +// encryption key specification that can be applied to all created resources +// (e.g. Conversation). +type GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec struct { + // KmsKey: Required. The name of customer-managed encryption key that is used + // to secure a resource and its sub-resources. If empty, the resource is + // secured by the default Google encryption key. Only the key in the same + // location as this resource is allowed to be used for encryption. Format: + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}` + KmsKey string `json:"kmsKey,omitempty"` + // Name: Immutable. The resource name of the encryption key specification + // resource. Format: projects/{project}/locations/{location}/encryptionSpec + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "KmsKey") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "KmsKey") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudContactcenterinsightsV1alpha1Entity: The data for an entity // annotation. Represents a phrase in the conversation that is a known entity, // such as a person, an organization, or location. @@ -5712,6 +5850,67 @@ func (s GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequestTransc type GoogleCloudContactcenterinsightsV1alpha1IngestConversationsResponse struct { } +// GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecMetadata: +// Metadata for initializing a location-level encryption specification. +type GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecMetadata struct { + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // PartialErrors: Partial errors during initialising operation that might cause + // the operation output to be incomplete. + PartialErrors []*GoogleRpcStatus `json:"partialErrors,omitempty"` + // Request: Output only. The original request for initialization. + Request *GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest `json:"request,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest: The +// request to initialize a location-level encryption specification. +type GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest struct { + // EncryptionSpec: Required. The encryption spec used for CMEK encryption. It + // is required that the kms key is in the same region as the endpoint. The same + // key will be used for all provisioned resources, if encryption is available. + // If the kms_key_name is left empty, no encryption will be enforced. + EncryptionSpec *GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec `json:"encryptionSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "EncryptionSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EncryptionSpec") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecResponse: +// The response to initialize a location-level encryption specification. +type GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecResponse struct { +} + // GoogleCloudContactcenterinsightsV1alpha1Intent: The data for an intent. // Represents a detected intent in the conversation, for example MAKES_PROMISE. type GoogleCloudContactcenterinsightsV1alpha1Intent struct { @@ -6576,6 +6775,114 @@ func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ProjectsLocationsGetEncryptionSpecCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetEncryptionSpec: Gets location-level encryption key specification. +// +// - name: The name of the encryption spec resource to get. +func (r *ProjectsLocationsService) GetEncryptionSpec(name string) *ProjectsLocationsGetEncryptionSpecCall { + c := &ProjectsLocationsGetEncryptionSpecCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGetEncryptionSpecCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetEncryptionSpecCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGetEncryptionSpecCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetEncryptionSpecCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetEncryptionSpecCall) Context(ctx context.Context) *ProjectsLocationsGetEncryptionSpecCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetEncryptionSpecCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetEncryptionSpecCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "contactcenterinsights.projects.locations.getEncryptionSpec" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudContactcenterinsightsV1EncryptionSpec.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 *ProjectsLocationsGetEncryptionSpecCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContactcenterinsightsV1EncryptionSpec, 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 := &GoogleCloudContactcenterinsightsV1EncryptionSpec{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsGetSettingsCall struct { s *Service name string @@ -8427,6 +8734,113 @@ func (c *ProjectsLocationsConversationsAnalysesListCall) Pages(ctx context.Conte } } +type ProjectsLocationsEncryptionSpecInitializeCall struct { + s *Service + name string + googlecloudcontactcenterinsightsv1initializeencryptionspecrequest *GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Initialize: Initializes a location-level encryption key specification. An +// error will be thrown if the location has resources already created before +// the initialization. Once the encryption specification is initialized at a +// location, it is immutable and all newly created resources under the location +// will be encrypted with the existing specification. +// +// - name: Immutable. The resource name of the encryption key specification +// resource. Format: projects/{project}/locations/{location}/encryptionSpec. +func (r *ProjectsLocationsEncryptionSpecService) Initialize(name string, googlecloudcontactcenterinsightsv1initializeencryptionspecrequest *GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest) *ProjectsLocationsEncryptionSpecInitializeCall { + c := &ProjectsLocationsEncryptionSpecInitializeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudcontactcenterinsightsv1initializeencryptionspecrequest = googlecloudcontactcenterinsightsv1initializeencryptionspecrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEncryptionSpecInitializeCall) Fields(s ...googleapi.Field) *ProjectsLocationsEncryptionSpecInitializeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEncryptionSpecInitializeCall) Context(ctx context.Context) *ProjectsLocationsEncryptionSpecInitializeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEncryptionSpecInitializeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEncryptionSpecInitializeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontactcenterinsightsv1initializeencryptionspecrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:initialize") + 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 "contactcenterinsights.projects.locations.encryptionSpec.initialize" call. +// 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 *ProjectsLocationsEncryptionSpecInitializeCall) 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 +} + type ProjectsLocationsInsightsdataExportCall struct { s *Service parent string diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 59abdccae8c..29ebed027b3 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -2125,7 +2125,7 @@ } } }, - "revision": "20240628", + "revision": "20240721", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -2531,6 +2531,7 @@ "MYSQL_8_0_34", "MYSQL_8_0_35", "MYSQL_8_0_36", + "MYSQL_8_0_37", "POSTGRES_9_6", "POSTGRES_11", "POSTGRES_10", @@ -2556,6 +2557,7 @@ "The database major version is MySQL 8.0 and the minor version is 34.", "The database major version is MySQL 8.0 and the minor version is 35.", "The database major version is MySQL 8.0 and the minor version is 36.", + "The database major version is MySQL 8.0 and the minor version is 37.", "PostgreSQL 9.6.", "PostgreSQL 11.", "PostgreSQL 10.", @@ -5732,6 +5734,10 @@ }, "type": "array" }, + "promoteWhenReady": { + "description": "Optional. Promote databases when ready.", + "type": "boolean" + }, "useDiffBackup": { "description": "Optional. Enable differential backups.", "type": "boolean" diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index dce69d8491a..e7fc7e27f38 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -788,6 +788,8 @@ type CloudSqlSettings struct { // version is 35. // "MYSQL_8_0_36" - The database major version is MySQL 8.0 and the minor // version is 36. + // "MYSQL_8_0_37" - The database major version is MySQL 8.0 and the minor + // version is 37. // "POSTGRES_9_6" - PostgreSQL 9.6. // "POSTGRES_11" - PostgreSQL 11. // "POSTGRES_10" - PostgreSQL 10. @@ -4356,6 +4358,8 @@ type SqlServerHomogeneousMigrationJobConfig struct { BackupFilePattern string `json:"backupFilePattern,omitempty"` // DatabaseBackups: Required. Backup details per database in Cloud Storage. DatabaseBackups []*SqlServerDatabaseBackup `json:"databaseBackups,omitempty"` + // PromoteWhenReady: Optional. Promote databases when ready. + PromoteWhenReady bool `json:"promoteWhenReady,omitempty"` // UseDiffBackup: Optional. Enable differential backups. UseDiffBackup bool `json:"useDiffBackup,omitempty"` // ForceSendFields is a list of field names (e.g. "BackupFilePattern") to diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index cbc16f7f7c0..1cf7e4bef2a 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -105,6 +105,105 @@ }, "protocol": "rest", "resources": { + "organizations": { + "resources": { + "locations": { + "resources": { + "encryptionConfigs": { + "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/organizations/{organizationsId}/locations/{locationsId}/encryptionConfigs/{encryptionConfigsId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.organizations.locations.encryptionConfigs.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": "^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/encryptionConfigs/{encryptionConfigsId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.organizations.locations.encryptionConfigs.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": "^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/encryptionConfigs/{encryptionConfigsId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.organizations.locations.encryptionConfigs.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": "^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, "projects": { "resources": { "locations": { @@ -1999,7 +2098,7 @@ ], "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}.", + "description": "Output only. The relative resource name of the EntryGroup, in the format projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+$", "required": true, @@ -2269,7 +2368,7 @@ "type": "boolean" }, "name": { - "description": "Identifier. The relative resource name of the Entry, of the form: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}.", + "description": "Identifier. The relative resource name of the entry, in the format projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries/.*$", "required": true, @@ -2566,6 +2665,97 @@ } } }, + "glossaries": { + "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}/glossaries/{glossariesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.glossaries.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/[^/]+/glossaries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.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/[^/]+/glossaries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.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/[^/]+/glossaries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "governanceRules": { "methods": { "getIamPolicy": { @@ -5145,6 +5335,142 @@ } } }, + "metadataJobs": { + "methods": { + "cancel": { + "description": "Cancels a metadata job.If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/metadataJobs/{metadataJobsId}:cancel", + "httpMethod": "POST", + "id": "dataplex.projects.locations.metadataJobs.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the job, in the format projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/metadataJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleCloudDataplexV1CancelMetadataJobRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a metadata job. For example, use a metadata job to import Dataplex Catalog entries and aspects from a third-party system into Dataplex.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/metadataJobs", + "httpMethod": "POST", + "id": "dataplex.projects.locations.metadataJobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "metadataJobId": { + "description": "Optional. The metadata job ID. If not provided, a unique ID is generated with the prefix metadata-job-.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent location, in the format projects/{project_id_or_number}/locations/{location_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/metadataJobs", + "request": { + "$ref": "GoogleCloudDataplexV1MetadataJob" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a metadata job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/metadataJobs/{metadataJobsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.metadataJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the metadata job, in the format projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/metadataJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1MetadataJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists metadata jobs.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/metadataJobs", + "httpMethod": "GET", + "id": "dataplex.projects.locations.metadataJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request. Filters are case-sensitive. The service supports the following formats: labels.key1 = \"value1\" labels:key1 name = \"value\"You can combine filters with AND, OR, and NOT operators.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The field to sort the results by, either name or create_time. If not specified, the ordering is undefined.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of metadata jobs to return. The service might return fewer jobs than this value. If unspecified, at most 10 jobs are returned. The maximum value is 1,000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The page token received from a previous ListMetadataJobs call. Provide this token to retrieve the subsequent page of results. When paginating, all other parameters that are provided to the ListMetadataJobs request must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent location, in the format projects/{project_id_or_number}/locations/{location_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/metadataJobs", + "response": { + "$ref": "GoogleCloudDataplexV1ListMetadataJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -5273,7 +5599,7 @@ } } }, - "revision": "20240624", + "revision": "20240722", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -5496,7 +5822,8 @@ "id": "GoogleCloudDataplexV1Aspect", "properties": { "aspectSource": { - "$ref": "GoogleCloudDataplexV1AspectSource" + "$ref": "GoogleCloudDataplexV1AspectSource", + "description": "Optional. Information related to the source system of the aspect." }, "aspectType": { "description": "Output only. The resource name of the type used to create this Aspect.", @@ -5532,16 +5859,16 @@ "type": "object" }, "GoogleCloudDataplexV1AspectSource": { - "description": "AspectSource contains information related to the source system of the Aspect.", + "description": "Information related to the source system of the aspect.", "id": "GoogleCloudDataplexV1AspectSource", "properties": { "createTime": { - "description": "The create time of the aspect in the source system.", + "description": "The time the aspect was created in the source system.", "format": "google-datetime", "type": "string" }, "updateTime": { - "description": "The update time of the aspect in the source system.", + "description": "The time the aspect was last updated in the source system.", "format": "google-datetime", "type": "string" } @@ -6110,6 +6437,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDataplexV1CancelMetadataJobRequest": { + "description": "Cancel metadata job request.", + "id": "GoogleCloudDataplexV1CancelMetadataJobRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudDataplexV1Content": { "description": "Content represents a user-visible notebook or a sql script", "id": "GoogleCloudDataplexV1Content", @@ -6476,7 +6809,7 @@ "id": "GoogleCloudDataplexV1DataProfileResultProfileFieldProfileInfo", "properties": { "distinctRatio": { - "description": "Ratio of rows with distinct values against total scanned rows. Not available for complex non-groupable field type RECORD and fields with REPEATABLE mode.", + "description": "Ratio of rows with distinct values against total scanned rows. Not available for complex non-groupable field type, including RECORD, ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode.", "format": "double", "type": "number" }, @@ -6498,7 +6831,7 @@ "description": "String type field information." }, "topNValues": { - "description": "The list of top N non-null values, frequency and ratio with which they occur in the scanned data. N is 10 or equal to the number of distinct values in the field, whichever is smaller. Not available for complex non-groupable field type RECORD and fields with REPEATABLE mode.", + "description": "The list of top N non-null values, frequency and ratio with which they occur in the scanned data. N is 10 or equal to the number of distinct values in the field, whichever is smaller. Not available for complex non-groupable field type, including RECORD, ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode.", "items": { "$ref": "GoogleCloudDataplexV1DataProfileResultProfileFieldProfileInfoTopNValue" }, @@ -6881,6 +7214,10 @@ "$ref": "GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation", "description": "Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range." }, + "suspended": { + "description": "Optional. Whether the Rule is active or suspended. Default is false.", + "type": "boolean" + }, "tableConditionExpectation": { "$ref": "GoogleCloudDataplexV1DataQualityRuleTableConditionExpectation", "description": "Aggregate rule which evaluates whether the provided expression is true for a table." @@ -8161,36 +8498,36 @@ "type": "object" }, "GoogleCloudDataplexV1Entry": { - "description": "An entry is a representation of a data asset which can be described by various metadata.", + "description": "An entry is a representation of a data resource that can be described by various metadata.", "id": "GoogleCloudDataplexV1Entry", "properties": { "aspects": { "additionalProperties": { "$ref": "GoogleCloudDataplexV1Aspect" }, - "description": "Optional. The Aspects attached to the Entry. The format for the key can be one of the following: {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached directly to the entry) {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is attached to an entry's path)", + "description": "Optional. The aspects that are attached to the entry. Depending on how the aspect is attached to the entry, the format of the aspect key can be one of the following: If the aspect is attached directly to the entry: {project_id_or_number}.{location_id}.{aspect_type_id} If the aspect is attached to an entry's path: {project_id_or_number}.{location_id}.{aspect_type_id}@{path}", "type": "object" }, "createTime": { - "description": "Output only. The time when the Entry was created.", + "description": "Output only. The time when the entry was created in Dataplex.", "format": "google-datetime", "readOnly": true, "type": "string" }, "entrySource": { "$ref": "GoogleCloudDataplexV1EntrySource", - "description": "Optional. Information related to the source system for an entry." + "description": "Optional. Information related to the source system of the data resource that is represented by the entry." }, "entryType": { - "description": "Required. Immutable. The resource name of the EntryType used to create this Entry.", + "description": "Required. Immutable. The relative resource name of the entry type that was used to create this entry, in the format projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}.", "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.", + "description": "Optional. A name for the entry that can be referenced by 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}.", + "description": "Identifier. The relative resource name of the entry, in the format projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}.", "type": "string" }, "parentEntry": { @@ -8198,7 +8535,7 @@ "type": "string" }, "updateTime": { - "description": "Output only. The time when the Entry was last updated.", + "description": "Output only. The time when the entry was last updated in Dataplex.", "format": "google-datetime", "readOnly": true, "type": "string" @@ -8236,7 +8573,7 @@ "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}.", + "description": "Output only. The relative resource name of the EntryGroup, in the format projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}.", "readOnly": true, "type": "string" }, @@ -8255,27 +8592,27 @@ "type": "object" }, "GoogleCloudDataplexV1EntrySource": { - "description": "EntrySource contains information related to the source system of the Entry.", + "description": "Information related to the source system of the data resource that is represented by the entry.", "id": "GoogleCloudDataplexV1EntrySource", "properties": { "ancestors": { - "description": "Immutable. The ancestors of the Entry in the source system.", + "description": "Immutable. The entries representing the ancestors of the data resource in the source system.", "items": { "$ref": "GoogleCloudDataplexV1EntrySourceAncestor" }, "type": "array" }, "createTime": { - "description": "The create time of the resource in the source system.", + "description": "The time when the resource was created in the source system.", "format": "google-datetime", "type": "string" }, "description": { - "description": "Description of the Entry. The maximum size of the field is 2000 characters.", + "description": "A description of the data resource. Maximum length is 2,000 characters.", "type": "string" }, "displayName": { - "description": "User friendly display name. The maximum size of the field is 500 characters.", + "description": "A user-friendly display name. Maximum length is 500 characters.", "type": "string" }, "labels": { @@ -8286,24 +8623,24 @@ "type": "object" }, "location": { - "description": "Output only. Location of the resource in the source system. You can search the Entry by this location. By default, this should match the location of the EntryGroup containing this entry. A different value allows capturing the source location for data external to Google Cloud.", + "description": "Output only. Location of the resource in the source system. You can search the entry by this location. By default, this should match the location of the entry group containing this entry. A different value allows capturing the source location for data external to Google Cloud.", "readOnly": true, "type": "string" }, "platform": { - "description": "The platform containing the source system. The maximum size of the field is 64 characters.", + "description": "The platform containing the source system. Maximum length 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.", + "description": "The name of the resource in the source system. Maximum length is 4,000 characters.", "type": "string" }, "system": { - "description": "The name of the source system. The maximum size of the field is 64 characters.", + "description": "The name of the source system. Maximum length is 64 characters.", "type": "string" }, "updateTime": { - "description": "The update time of the resource in the source system.", + "description": "The time when the resource was last updated in the source system. If the entry exists in the system and its EntrySource has update_time populated, further updates to the EntrySource of the entry must provide incremental updates to its update_time.", "format": "google-datetime", "type": "string" } @@ -8311,7 +8648,7 @@ "type": "object" }, "GoogleCloudDataplexV1EntrySourceAncestor": { - "description": "Ancestor contains information about individual items in the hierarchy of an Entry.", + "description": "Information about individual items in the hierarchy that is associated with the data resource.", "id": "GoogleCloudDataplexV1EntrySourceAncestor", "properties": { "name": { @@ -8717,6 +9054,29 @@ }, "type": "object" }, + "GoogleCloudDataplexV1ImportItem": { + "description": "An object that describes the values that you want to set for an entry and its attached aspects when you import metadata. Used when you run a metadata import job. See CreateMetadataJob.You provide a collection of import items in a metadata import file. For more information about how to create a metadata import file, see Metadata import file (https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).", + "id": "GoogleCloudDataplexV1ImportItem", + "properties": { + "aspectKeys": { + "description": "The aspects to modify. Supports the following syntaxes: {aspect_type_reference}: matches aspects that belong to the specified aspect type and are attached directly to the entry. {aspect_type_reference}@{path}: matches aspects that belong to the specified aspect type and path. {aspect_type_reference}@*: matches aspects that belong to the specified aspect type for all paths.Replace {aspect_type_reference} with a reference to the aspect type, in the format {project_id_or_number}.{location_id}.{aspect_type_id}.If you leave this field empty, it is treated as specifying exactly those aspects that are present within the specified entry.In FULL entry sync mode, Dataplex implicitly adds the keys for all of the required aspects of an entry.", + "items": { + "type": "string" + }, + "type": "array" + }, + "entry": { + "$ref": "GoogleCloudDataplexV1Entry", + "description": "Information about an entry and its attached aspects." + }, + "updateMask": { + "description": "The fields to update, in paths that are relative to the Entry resource. Separate each field with a comma.In FULL entry sync mode, Dataplex includes the paths of all of the fields for an entry that can be modified, including aspects. This means that Dataplex replaces the existing entry with the entry in the metadata import file. All modifiable fields are updated, regardless of the fields that are listed in the update mask, and regardless of whether a field is present in the entry object.The update_mask field is ignored when an entry is created or re-created.Dataplex also determines which entries and aspects to modify by comparing the values and timestamps that you provide in the metadata import file with the values and timestamps that exist in your project. For more information, see Comparison logic (https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic).", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1Job": { "description": "A job represents an instance of a task.", "id": "GoogleCloudDataplexV1Job", @@ -9393,6 +9753,31 @@ }, "type": "object" }, + "GoogleCloudDataplexV1ListMetadataJobsResponse": { + "description": "List metadata jobs response.", + "id": "GoogleCloudDataplexV1ListMetadataJobsResponse", + "properties": { + "metadataJobs": { + "description": "Metadata jobs under the specified parent location.", + "items": { + "$ref": "GoogleCloudDataplexV1MetadataJob" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results. If there are no more results in the list, the value is empty.", + "type": "string" + }, + "unreachableLocations": { + "description": "Locations that the service couldn't reach.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1ListPartitionsResponse": { "description": "List metadata partitions response.", "id": "GoogleCloudDataplexV1ListPartitionsResponse", @@ -9472,6 +9857,248 @@ }, "type": "object" }, + "GoogleCloudDataplexV1MetadataJob": { + "description": "A metadata job resource.", + "id": "GoogleCloudDataplexV1MetadataJob", + "properties": { + "createTime": { + "description": "Output only. The time when the metadata job was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "importResult": { + "$ref": "GoogleCloudDataplexV1MetadataJobImportJobResult", + "description": "Output only. Import job result.", + "readOnly": true + }, + "importSpec": { + "$ref": "GoogleCloudDataplexV1MetadataJobImportJobSpec", + "description": "Import job specification." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-defined labels.", + "type": "object" + }, + "name": { + "description": "Output only. The name of the resource that the configuration is applied to, in the format projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}.", + "readOnly": true, + "type": "string" + }, + "status": { + "$ref": "GoogleCloudDataplexV1MetadataJobStatus", + "readOnly": true + }, + "type": { + "enum": [ + "TYPE_UNSPECIFIED", + "IMPORT" + ], + "enumDescriptions": [ + "Unspecified.", + "Import job." + ], + "type": "string" + }, + "uid": { + "description": "Output only. A system-generated, globally unique ID for the metadata job. If the metadata job is deleted and then re-created with the same name, this ID is different.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metadata job was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1MetadataJobImportJobResult": { + "description": "Results from a metadata import job.", + "id": "GoogleCloudDataplexV1MetadataJobImportJobResult", + "properties": { + "createdEntries": { + "description": "Output only. The total number of entries that were created.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "deletedEntries": { + "description": "Output only. The total number of entries that were deleted.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "recreatedEntries": { + "description": "Output only. The total number of entries that were recreated.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "unchangedEntries": { + "description": "Output only. The total number of entries that were unchanged.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the status was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updatedEntries": { + "description": "Output only. The total number of entries that were updated.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1MetadataJobImportJobSpec": { + "description": "Job specification for a metadata import job", + "id": "GoogleCloudDataplexV1MetadataJobImportJobSpec", + "properties": { + "aspectSyncMode": { + "description": "Required. The sync mode for aspects. Only INCREMENTAL mode is supported for aspects. An aspect is modified only if the metadata import file includes a reference to the aspect in the update_mask field and the aspect_keys field.", + "enum": [ + "SYNC_MODE_UNSPECIFIED", + "FULL", + "INCREMENTAL" + ], + "enumDescriptions": [ + "Sync mode unspecified.", + "All resources in the job's scope are modified. If a resource exists in Dataplex but isn't included in the metadata import file, the resource is deleted when you run the metadata job. Use this mode to perform a full sync of the set of entries in the job scope.", + "Only the entries and aspects that are explicitly included in the metadata import file are modified. Use this mode to modify a subset of resources while leaving unreferenced resources unchanged." + ], + "type": "string" + }, + "entrySyncMode": { + "description": "Required. The sync mode for entries. Only FULL mode is supported for entries. All entries in the job's scope are modified. If an entry exists in Dataplex but isn't included in the metadata import file, the entry is deleted when you run the metadata job.", + "enum": [ + "SYNC_MODE_UNSPECIFIED", + "FULL", + "INCREMENTAL" + ], + "enumDescriptions": [ + "Sync mode unspecified.", + "All resources in the job's scope are modified. If a resource exists in Dataplex but isn't included in the metadata import file, the resource is deleted when you run the metadata job. Use this mode to perform a full sync of the set of entries in the job scope.", + "Only the entries and aspects that are explicitly included in the metadata import file are modified. Use this mode to modify a subset of resources while leaving unreferenced resources unchanged." + ], + "type": "string" + }, + "logLevel": { + "description": "Optional. The level of logs to write to Cloud Logging for this job.Debug-level logs provide highly-detailed information for troubleshooting, but their increased verbosity could incur additional costs (https://cloud.google.com/stackdriver/pricing) that might not be merited for all jobs.If unspecified, defaults to INFO.", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "DEBUG", + "INFO" + ], + "enumDescriptions": [ + "Log level unspecified.", + "Debug-level logging. Captures detailed logs for each import item. Use debug-level logging to troubleshoot issues with specific import items. For example, use debug-level logging to identify resources that are missing from the job scope, entries or aspects that don't conform to the associated entry type or aspect type, or other misconfigurations with the metadata import file.Depending on the size of your metadata job and the number of logs that are generated, debug-level logging might incur additional costs (https://cloud.google.com/stackdriver/pricing).", + "Info-level logging. Captures logs at the overall job level. Includes aggregate logs about import items, but doesn't specify which import item has an error." + ], + "type": "string" + }, + "scope": { + "$ref": "GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope", + "description": "Required. A boundary on the scope of impact that the metadata import job can have." + }, + "sourceCreateTime": { + "description": "Optional. The time when the process that created the metadata import files began.", + "format": "google-datetime", + "type": "string" + }, + "sourceStorageUri": { + "description": "Optional. The URI of a Cloud Storage bucket or folder (beginning with gs:// and ending with /) that contains the metadata import files for this job.A metadata import file defines the values to set for each of the entries and aspects in a metadata job. For more information about how to create a metadata import file and the file requirements, see Metadata import file (https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).You can provide multiple metadata import files in the same metadata job. The bucket or folder must contain at least one metadata import file, in JSON Lines format (either .json or .jsonl file extension).In FULL entry sync mode, don't save the metadata import file in a folder named SOURCE_STORAGE_URI/deletions/.Caution: If the metadata import file contains no data, all entries and aspects that belong to the job's scope are deleted.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope": { + "description": "A boundary on the scope of impact that the metadata import job can have.", + "id": "GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope", + "properties": { + "aspectTypes": { + "description": "Optional. The aspect types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}. The job modifies only the aspects that belong to these aspect types.If the metadata import file attempts to modify an aspect whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an aspect type must either match the location of the job, or the aspect type must be global.", + "items": { + "type": "string" + }, + "type": "array" + }, + "entryGroups": { + "description": "Required. The entry group that is in scope for the import job, specified as a relative resource name in the format projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}. Only entries that belong to the specified entry group are affected by the job.Must contain exactly one element. The entry group and the job must be in the same location.", + "items": { + "type": "string" + }, + "type": "array" + }, + "entryTypes": { + "description": "Required. The entry types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}. The job modifies only the entries that belong to these entry types.If the metadata import file attempts to modify an entry whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an entry type must either match the location of the job, or the entry type must be global.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1MetadataJobStatus": { + "description": "Metadata job status.", + "id": "GoogleCloudDataplexV1MetadataJobStatus", + "properties": { + "completionPercent": { + "description": "Output only. Progress tracking.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "message": { + "description": "Output only. Message relating to the progression of a metadata job.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the metadata job.", + "enum": [ + "STATE_UNSPECIFIED", + "QUEUED", + "RUNNING", + "CANCELING", + "CANCELED", + "SUCCEEDED", + "FAILED", + "SUCCEEDED_WITH_ERRORS" + ], + "enumDescriptions": [ + "State unspecified.", + "The job is queued.", + "The job is running.", + "The job is being canceled.", + "The job is canceled.", + "The job succeeded.", + "The job failed.", + "The job completed with some errors." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the status was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDataplexV1OperationMetadata": { "description": "Represents the metadata of a long-running operation.", "id": "GoogleCloudDataplexV1OperationMetadata", diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index e08cd33d540..d87a4dec42f 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -135,6 +135,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Organizations = NewOrganizationsService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -144,6 +145,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Organizations *OrganizationsService + Projects *ProjectsService } @@ -154,6 +157,39 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + rs.Locations = NewOrganizationsLocationsService(s) + return rs +} + +type OrganizationsService struct { + s *Service + + Locations *OrganizationsLocationsService +} + +func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { + rs := &OrganizationsLocationsService{s: s} + rs.EncryptionConfigs = NewOrganizationsLocationsEncryptionConfigsService(s) + return rs +} + +type OrganizationsLocationsService struct { + s *Service + + EncryptionConfigs *OrganizationsLocationsEncryptionConfigsService +} + +func NewOrganizationsLocationsEncryptionConfigsService(s *Service) *OrganizationsLocationsEncryptionConfigsService { + rs := &OrganizationsLocationsEncryptionConfigsService{s: s} + return rs +} + +type OrganizationsLocationsEncryptionConfigsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -174,8 +210,10 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.DataTaxonomies = NewProjectsLocationsDataTaxonomiesService(s) rs.EntryGroups = NewProjectsLocationsEntryGroupsService(s) rs.EntryTypes = NewProjectsLocationsEntryTypesService(s) + rs.Glossaries = NewProjectsLocationsGlossariesService(s) rs.GovernanceRules = NewProjectsLocationsGovernanceRulesService(s) rs.Lakes = NewProjectsLocationsLakesService(s) + rs.MetadataJobs = NewProjectsLocationsMetadataJobsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) return rs } @@ -195,10 +233,14 @@ type ProjectsLocationsService struct { EntryTypes *ProjectsLocationsEntryTypesService + Glossaries *ProjectsLocationsGlossariesService + GovernanceRules *ProjectsLocationsGovernanceRulesService Lakes *ProjectsLocationsLakesService + MetadataJobs *ProjectsLocationsMetadataJobsService + Operations *ProjectsLocationsOperationsService } @@ -292,6 +334,15 @@ type ProjectsLocationsEntryTypesService struct { s *Service } +func NewProjectsLocationsGlossariesService(s *Service) *ProjectsLocationsGlossariesService { + rs := &ProjectsLocationsGlossariesService{s: s} + return rs +} + +type ProjectsLocationsGlossariesService struct { + s *Service +} + func NewProjectsLocationsGovernanceRulesService(s *Service) *ProjectsLocationsGovernanceRulesService { rs := &ProjectsLocationsGovernanceRulesService{s: s} return rs @@ -466,6 +517,15 @@ type ProjectsLocationsLakesZonesEntitiesPartitionsService struct { s *Service } +func NewProjectsLocationsMetadataJobsService(s *Service) *ProjectsLocationsMetadataJobsService { + rs := &ProjectsLocationsMetadataJobsService{s: s} + return rs +} + +type ProjectsLocationsMetadataJobsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -715,6 +775,8 @@ type GoogleCloudDataplexV1ActionUnauthorizedResource struct { // GoogleCloudDataplexV1Aspect: An aspect is a single piece of metadata // describing an entry. type GoogleCloudDataplexV1Aspect struct { + // AspectSource: Optional. Information related to the source system of the + // aspect. AspectSource *GoogleCloudDataplexV1AspectSource `json:"aspectSource,omitempty"` // AspectType: Output only. The resource name of the type used to create this // Aspect. @@ -746,12 +808,12 @@ func (s GoogleCloudDataplexV1Aspect) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1AspectSource: AspectSource contains information related -// to the source system of the Aspect. +// GoogleCloudDataplexV1AspectSource: Information related to the source system +// of the aspect. type GoogleCloudDataplexV1AspectSource struct { - // CreateTime: The create time of the aspect in the source system. + // CreateTime: The time the aspect was created in the source system. CreateTime string `json:"createTime,omitempty"` - // UpdateTime: The update time of the aspect in the source system. + // UpdateTime: The time the aspect was last updated 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 @@ -1395,6 +1457,10 @@ func (s GoogleCloudDataplexV1AssetStatus) MarshalJSON() ([]byte, error) { type GoogleCloudDataplexV1CancelJobRequest struct { } +// GoogleCloudDataplexV1CancelMetadataJobRequest: Cancel metadata job request. +type GoogleCloudDataplexV1CancelMetadataJobRequest struct { +} + // GoogleCloudDataplexV1Content: Content represents a user-visible notebook or // a sql script type GoogleCloudDataplexV1Content struct { @@ -1834,8 +1900,8 @@ func (s GoogleCloudDataplexV1DataProfileResultProfileField) MarshalJSON() ([]byt // information for each field type. type GoogleCloudDataplexV1DataProfileResultProfileFieldProfileInfo struct { // DistinctRatio: Ratio of rows with distinct values against total scanned - // rows. Not available for complex non-groupable field type RECORD and fields - // with REPEATABLE mode. + // rows. Not available for complex non-groupable field type, including RECORD, + // ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode. DistinctRatio float64 `json:"distinctRatio,omitempty"` // DoubleProfile: Double type field information. DoubleProfile *GoogleCloudDataplexV1DataProfileResultProfileFieldProfileInfoDoubleFieldInfo `json:"doubleProfile,omitempty"` @@ -1848,7 +1914,8 @@ type GoogleCloudDataplexV1DataProfileResultProfileFieldProfileInfo struct { // TopNValues: The list of top N non-null values, frequency and ratio with // which they occur in the scanned data. N is 10 or equal to the number of // distinct values in the field, whichever is smaller. Not available for - // complex non-groupable field type RECORD and fields with REPEATABLE mode. + // complex non-groupable field type, including RECORD, ARRAY, GEOGRAPHY, and + // JSON, as well as fields with REPEATABLE mode. TopNValues []*GoogleCloudDataplexV1DataProfileResultProfileFieldProfileInfoTopNValue `json:"topNValues,omitempty"` // ForceSendFields is a list of field names (e.g. "DistinctRatio") to // unconditionally include in API requests. By default, fields with empty or @@ -2491,6 +2558,9 @@ type GoogleCloudDataplexV1DataQualityRule struct { // StatisticRangeExpectation: Aggregate rule which evaluates whether the column // aggregate statistic lies between a specified range. StatisticRangeExpectation *GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation `json:"statisticRangeExpectation,omitempty"` + // Suspended: Optional. Whether the Rule is active or suspended. Default is + // false. + Suspended bool `json:"suspended,omitempty"` // TableConditionExpectation: Aggregate rule which evaluates whether the // provided expression is true for a table. TableConditionExpectation *GoogleCloudDataplexV1DataQualityRuleTableConditionExpectation `json:"tableConditionExpectation,omitempty"` @@ -4002,33 +4072,37 @@ func (s GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1Entry: An entry is a representation of a data asset -// which can be described by various metadata. +// GoogleCloudDataplexV1Entry: An entry is a representation of a data resource +// that can be described by various metadata. type GoogleCloudDataplexV1Entry struct { - // Aspects: Optional. The Aspects attached to the Entry. The format for the key - // can be one of the following: {projectId}.{locationId}.{aspectTypeId} (if the - // aspect is attached directly to the entry) - // {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is attached to - // an entry's path) + // Aspects: Optional. The aspects that are attached to the entry. Depending on + // how the aspect is attached to the entry, the format of the aspect key can be + // one of the following: If the aspect is attached directly to the entry: + // {project_id_or_number}.{location_id}.{aspect_type_id} If the aspect is + // attached to an entry's path: + // {project_id_or_number}.{location_id}.{aspect_type_id}@{path} Aspects map[string]GoogleCloudDataplexV1Aspect `json:"aspects,omitempty"` - // CreateTime: Output only. The time when the Entry was created. + // CreateTime: Output only. The time when the entry was created in Dataplex. CreateTime string `json:"createTime,omitempty"` - // EntrySource: Optional. Information related to the source system for an - // entry. + // EntrySource: Optional. Information related to the source system of the data + // resource that is represented by the entry. EntrySource *GoogleCloudDataplexV1EntrySource `json:"entrySource,omitempty"` - // EntryType: Required. Immutable. The resource name of the EntryType used to - // create this Entry. + // EntryType: Required. Immutable. The relative resource name of the entry type + // that was used to create this entry, in the format + // projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_typ + // e_id}. EntryType string `json:"entryType,omitempty"` - // FullyQualifiedName: Optional. A name for the entry that can reference it in + // FullyQualifiedName: Optional. A name for the entry that can be referenced by // 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}/entries/{en - // try}. + // Name: Identifier. The relative resource name of the entry, in the format + // projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_gr + // oup_id}/entries/{entry_id}. 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: Output only. The time when the entry was last updated in + // Dataplex. UpdateTime string `json:"updateTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -4066,10 +4140,10 @@ type GoogleCloudDataplexV1EntryGroup struct { Etag string `json:"etag,omitempty"` // Labels: Optional. User-defined labels for the EntryGroup. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. The relative resource name of the EntryGroup, of the - // form: - // projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id - // }. + // Name: Output only. The relative resource name of the EntryGroup, in the + // format + // projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_gr + // oup_id}. Name string `json:"name,omitempty"` // Uid: Output only. System generated globally unique ID for the EntryGroup. If // you delete and recreate the EntryGroup with the same name, this ID will be @@ -4098,37 +4172,39 @@ func (s GoogleCloudDataplexV1EntryGroup) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1EntrySource: EntrySource contains information related -// to the source system of the Entry. +// GoogleCloudDataplexV1EntrySource: Information related to the source system +// of the data resource that is represented by the entry. type GoogleCloudDataplexV1EntrySource struct { - // Ancestors: Immutable. The ancestors of the Entry in the source system. + // Ancestors: Immutable. The entries representing the ancestors of the data + // resource in the source system. Ancestors []*GoogleCloudDataplexV1EntrySourceAncestor `json:"ancestors,omitempty"` - // CreateTime: The create time of the resource in the source system. + // CreateTime: The time when the resource was created in the source system. CreateTime string `json:"createTime,omitempty"` - // Description: Description of the Entry. The maximum size of the field is 2000 + // Description: A description of the data resource. Maximum length is 2,000 // characters. Description string `json:"description,omitempty"` - // DisplayName: User friendly display name. The maximum size of the field is - // 500 characters. + // DisplayName: A user-friendly display name. Maximum length 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"` // Location: Output only. Location of the resource in the source system. You - // can search the Entry by this location. By default, this should match the - // location of the EntryGroup containing this entry. A different value allows + // can search the entry by this location. By default, this should match the + // location of the entry group containing this entry. A different value allows // capturing the source location for data external to Google Cloud. Location string `json:"location,omitempty"` - // Platform: The platform containing the source system. The maximum size of the - // field is 64 characters. + // Platform: The platform containing the source system. Maximum length 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: The name of the resource in the source system. Maximum length is + // 4,000 characters. Resource string `json:"resource,omitempty"` - // System: The name of the source system. The maximum size of the field is 64 - // characters. + // System: The name of the source system. Maximum length is 64 characters. System string `json:"system,omitempty"` - // UpdateTime: The update time of the resource in the source system. + // UpdateTime: The time when the resource was last updated in the source + // system. If the entry exists in the system and its EntrySource has + // update_time populated, further updates to the EntrySource of the entry must + // provide incremental updates to its update_time. 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 @@ -4148,8 +4224,8 @@ func (s GoogleCloudDataplexV1EntrySource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDataplexV1EntrySourceAncestor: Ancestor contains information -// about individual items in the hierarchy of an Entry. +// GoogleCloudDataplexV1EntrySourceAncestor: Information about individual items +// in the hierarchy that is associated with the data resource. type GoogleCloudDataplexV1EntrySourceAncestor struct { // Name: Optional. The name of the ancestor resource. Name string `json:"name,omitempty"` @@ -4624,6 +4700,59 @@ func (s GoogleCloudDataplexV1GovernanceEventEntity) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDataplexV1ImportItem: An object that describes the values that +// you want to set for an entry and its attached aspects when you import +// metadata. Used when you run a metadata import job. See CreateMetadataJob.You +// provide a collection of import items in a metadata import file. For more +// information about how to create a metadata import file, see Metadata import +// file +// (https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). +type GoogleCloudDataplexV1ImportItem struct { + // AspectKeys: The aspects to modify. Supports the following syntaxes: + // {aspect_type_reference}: matches aspects that belong to the specified aspect + // type and are attached directly to the entry. {aspect_type_reference}@{path}: + // matches aspects that belong to the specified aspect type and path. + // {aspect_type_reference}@*: matches aspects that belong to the specified + // aspect type for all paths.Replace {aspect_type_reference} with a reference + // to the aspect type, in the format + // {project_id_or_number}.{location_id}.{aspect_type_id}.If you leave this + // field empty, it is treated as specifying exactly those aspects that are + // present within the specified entry.In FULL entry sync mode, Dataplex + // implicitly adds the keys for all of the required aspects of an entry. + AspectKeys []string `json:"aspectKeys,omitempty"` + // Entry: Information about an entry and its attached aspects. + Entry *GoogleCloudDataplexV1Entry `json:"entry,omitempty"` + // UpdateMask: The fields to update, in paths that are relative to the Entry + // resource. Separate each field with a comma.In FULL entry sync mode, Dataplex + // includes the paths of all of the fields for an entry that can be modified, + // including aspects. This means that Dataplex replaces the existing entry with + // the entry in the metadata import file. All modifiable fields are updated, + // regardless of the fields that are listed in the update mask, and regardless + // of whether a field is present in the entry object.The update_mask field is + // ignored when an entry is created or re-created.Dataplex also determines + // which entries and aspects to modify by comparing the values and timestamps + // that you provide in the metadata import file with the values and timestamps + // that exist in your project. For more information, see Comparison logic + // (https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic). + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "AspectKeys") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AspectKeys") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDataplexV1ImportItem) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ImportItem + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1Job: A job represents an instance of a task. type GoogleCloudDataplexV1Job struct { // EndTime: Output only. The time when the job ended. @@ -5357,6 +5486,36 @@ func (s GoogleCloudDataplexV1ListLakesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDataplexV1ListMetadataJobsResponse: List metadata jobs response. +type GoogleCloudDataplexV1ListMetadataJobsResponse struct { + // MetadataJobs: Metadata jobs under the specified parent location. + MetadataJobs []*GoogleCloudDataplexV1MetadataJob `json:"metadataJobs,omitempty"` + // NextPageToken: A token to retrieve the next page of results. If there are no + // more results in the list, the value is empty. + NextPageToken string `json:"nextPageToken,omitempty"` + // UnreachableLocations: Locations that the service couldn't reach. + 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. "MetadataJobs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MetadataJobs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDataplexV1ListMetadataJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListMetadataJobsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1ListPartitionsResponse: List metadata partitions // response. type GoogleCloudDataplexV1ListPartitionsResponse struct { @@ -5472,6 +5631,263 @@ func (s GoogleCloudDataplexV1ListZonesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDataplexV1MetadataJob: A metadata job resource. +type GoogleCloudDataplexV1MetadataJob struct { + // CreateTime: Output only. The time when the metadata job was created. + CreateTime string `json:"createTime,omitempty"` + // ImportResult: Output only. Import job result. + ImportResult *GoogleCloudDataplexV1MetadataJobImportJobResult `json:"importResult,omitempty"` + // ImportSpec: Import job specification. + ImportSpec *GoogleCloudDataplexV1MetadataJobImportJobSpec `json:"importSpec,omitempty"` + // Labels: Optional. User-defined labels. + Labels map[string]string `json:"labels,omitempty"` + // Name: Output only. The name of the resource that the configuration is + // applied to, in the format + // projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_ + // id}. + Name string `json:"name,omitempty"` + Status *GoogleCloudDataplexV1MetadataJobStatus `json:"status,omitempty"` + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified. + // "IMPORT" - Import job. + Type string `json:"type,omitempty"` + // Uid: Output only. A system-generated, globally unique ID for the metadata + // job. If the metadata job is deleted and then re-created with the same name, + // this ID is different. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The time when the metadata job was 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDataplexV1MetadataJob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1MetadataJob + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1MetadataJobImportJobResult: Results from a metadata +// import job. +type GoogleCloudDataplexV1MetadataJobImportJobResult struct { + // CreatedEntries: Output only. The total number of entries that were created. + CreatedEntries int64 `json:"createdEntries,omitempty,string"` + // DeletedEntries: Output only. The total number of entries that were deleted. + DeletedEntries int64 `json:"deletedEntries,omitempty,string"` + // RecreatedEntries: Output only. The total number of entries that were + // recreated. + RecreatedEntries int64 `json:"recreatedEntries,omitempty,string"` + // UnchangedEntries: Output only. The total number of entries that were + // unchanged. + UnchangedEntries int64 `json:"unchangedEntries,omitempty,string"` + // UpdateTime: Output only. The time when the status was updated. + UpdateTime string `json:"updateTime,omitempty"` + // UpdatedEntries: Output only. The total number of entries that were updated. + UpdatedEntries int64 `json:"updatedEntries,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CreatedEntries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreatedEntries") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDataplexV1MetadataJobImportJobResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1MetadataJobImportJobResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1MetadataJobImportJobSpec: Job specification for a +// metadata import job +type GoogleCloudDataplexV1MetadataJobImportJobSpec struct { + // AspectSyncMode: Required. The sync mode for aspects. Only INCREMENTAL mode + // is supported for aspects. An aspect is modified only if the metadata import + // file includes a reference to the aspect in the update_mask field and the + // aspect_keys field. + // + // Possible values: + // "SYNC_MODE_UNSPECIFIED" - Sync mode unspecified. + // "FULL" - All resources in the job's scope are modified. If a resource + // exists in Dataplex but isn't included in the metadata import file, the + // resource is deleted when you run the metadata job. Use this mode to perform + // a full sync of the set of entries in the job scope. + // "INCREMENTAL" - Only the entries and aspects that are explicitly included + // in the metadata import file are modified. Use this mode to modify a subset + // of resources while leaving unreferenced resources unchanged. + AspectSyncMode string `json:"aspectSyncMode,omitempty"` + // EntrySyncMode: Required. The sync mode for entries. Only FULL mode is + // supported for entries. All entries in the job's scope are modified. If an + // entry exists in Dataplex but isn't included in the metadata import file, the + // entry is deleted when you run the metadata job. + // + // Possible values: + // "SYNC_MODE_UNSPECIFIED" - Sync mode unspecified. + // "FULL" - All resources in the job's scope are modified. If a resource + // exists in Dataplex but isn't included in the metadata import file, the + // resource is deleted when you run the metadata job. Use this mode to perform + // a full sync of the set of entries in the job scope. + // "INCREMENTAL" - Only the entries and aspects that are explicitly included + // in the metadata import file are modified. Use this mode to modify a subset + // of resources while leaving unreferenced resources unchanged. + EntrySyncMode string `json:"entrySyncMode,omitempty"` + // LogLevel: Optional. The level of logs to write to Cloud Logging for this + // job.Debug-level logs provide highly-detailed information for + // troubleshooting, but their increased verbosity could incur additional costs + // (https://cloud.google.com/stackdriver/pricing) that might not be merited for + // all jobs.If unspecified, defaults to INFO. + // + // Possible values: + // "LOG_LEVEL_UNSPECIFIED" - Log level unspecified. + // "DEBUG" - Debug-level logging. Captures detailed logs for each import + // item. Use debug-level logging to troubleshoot issues with specific import + // items. For example, use debug-level logging to identify resources that are + // missing from the job scope, entries or aspects that don't conform to the + // associated entry type or aspect type, or other misconfigurations with the + // metadata import file.Depending on the size of your metadata job and the + // number of logs that are generated, debug-level logging might incur + // additional costs (https://cloud.google.com/stackdriver/pricing). + // "INFO" - Info-level logging. Captures logs at the overall job level. + // Includes aggregate logs about import items, but doesn't specify which import + // item has an error. + LogLevel string `json:"logLevel,omitempty"` + // Scope: Required. A boundary on the scope of impact that the metadata import + // job can have. + Scope *GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope `json:"scope,omitempty"` + // SourceCreateTime: Optional. The time when the process that created the + // metadata import files began. + SourceCreateTime string `json:"sourceCreateTime,omitempty"` + // SourceStorageUri: Optional. The URI of a Cloud Storage bucket or folder + // (beginning with gs:// and ending with /) that contains the metadata import + // files for this job.A metadata import file defines the values to set for each + // of the entries and aspects in a metadata job. For more information about how + // to create a metadata import file and the file requirements, see Metadata + // import file + // (https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).You + // can provide multiple metadata import files in the same metadata job. The + // bucket or folder must contain at least one metadata import file, in JSON + // Lines format (either .json or .jsonl file extension).In FULL entry sync + // mode, don't save the metadata import file in a folder named + // SOURCE_STORAGE_URI/deletions/.Caution: If the metadata import file contains + // no data, all entries and aspects that belong to the job's scope are deleted. + SourceStorageUri string `json:"sourceStorageUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "AspectSyncMode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AspectSyncMode") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDataplexV1MetadataJobImportJobSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1MetadataJobImportJobSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope: A boundary on +// the scope of impact that the metadata import job can have. +type GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope struct { + // AspectTypes: Optional. The aspect types that are in scope for the import + // job, specified as relative resource names in the format + // projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_t + // ype_id}. The job modifies only the aspects that belong to these aspect + // types.If the metadata import file attempts to modify an aspect whose type + // isn't included in this list, the import job is halted before modifying any + // entries or aspects.The location of an aspect type must either match the + // location of the job, or the aspect type must be global. + AspectTypes []string `json:"aspectTypes,omitempty"` + // EntryGroups: Required. The entry group that is in scope for the import job, + // specified as a relative resource name in the format + // projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_gr + // oup_id}. Only entries that belong to the specified entry group are affected + // by the job.Must contain exactly one element. The entry group and the job + // must be in the same location. + EntryGroups []string `json:"entryGroups,omitempty"` + // EntryTypes: Required. The entry types that are in scope for the import job, + // specified as relative resource names in the format + // projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_typ + // e_id}. The job modifies only the entries that belong to these entry types.If + // the metadata import file attempts to modify an entry whose type isn't + // included in this list, the import job is halted before modifying any entries + // or aspects.The location of an entry type must either match the location of + // the job, or the entry type must be global. + EntryTypes []string `json:"entryTypes,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AspectTypes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1MetadataJobStatus: Metadata job status. +type GoogleCloudDataplexV1MetadataJobStatus struct { + // CompletionPercent: Output only. Progress tracking. + CompletionPercent int64 `json:"completionPercent,omitempty"` + // Message: Output only. Message relating to the progression of a metadata job. + Message string `json:"message,omitempty"` + // State: Output only. State of the metadata job. + // + // Possible values: + // "STATE_UNSPECIFIED" - State unspecified. + // "QUEUED" - The job is queued. + // "RUNNING" - The job is running. + // "CANCELING" - The job is being canceled. + // "CANCELED" - The job is canceled. + // "SUCCEEDED" - The job succeeded. + // "FAILED" - The job failed. + // "SUCCEEDED_WITH_ERRORS" - The job completed with some errors. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The time when the status was updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CompletionPercent") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CompletionPercent") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDataplexV1MetadataJobStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1MetadataJobStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDataplexV1OperationMetadata: Represents the metadata of a // long-running operation. type GoogleCloudDataplexV1OperationMetadata struct { @@ -7480,28 +7896,48 @@ func (s GoogleTypeExpr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ProjectsLocationsGetCall struct { +type OrganizationsLocationsEncryptionConfigsGetIamPolicyCall struct { s *Service - name string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets information about a location. +// 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: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *OrganizationsLocationsEncryptionConfigsService) GetIamPolicy(resource string) *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall { + c := &OrganizationsLocationsEncryptionConfigsGetIamPolicyCall{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 *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7509,27 +7945,27 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall) 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 *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -7537,7 +7973,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/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7545,18 +7981,18 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) } 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.get" call. +// Do executes the "dataplex.organizations.locations.encryptionConfigs.getIamPolicy" call. // 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) { +// *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 *OrganizationsLocationsEncryptionConfigsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7575,7 +8011,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationLocation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7588,107 +8024,190 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsEncryptionConfigsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists information about the supported locations for this service. +// 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 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 +// - 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 *OrganizationsLocationsEncryptionConfigsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsLocationsEncryptionConfigsSetIamPolicyCall { + c := &OrganizationsLocationsEncryptionConfigsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest 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) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsLocationsEncryptionConfigsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsEncryptionConfigsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) 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)) +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsLocationsEncryptionConfigsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsEncryptionConfigsSetIamPolicyCall { + c.ctx_ = ctx 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) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsLocationsEncryptionConfigsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsEncryptionConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + 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.organizations.locations.encryptionConfigs.setIamPolicy" call. +// 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 *OrganizationsLocationsEncryptionConfigsSetIamPolicyCall) 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 +} + +type OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall 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 *OrganizationsLocationsEncryptionConfigsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall { + c := &OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } 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/{+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.list" call. +// Do executes the "dataplex.organizations.locations.encryptionConfigs.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a +// *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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { +func (c *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7707,7 +8226,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7720,28 +8239,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsLookupEntryCall struct { +type ProjectsLocationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -7750,68 +8248,19 @@ type ProjectsLocationsLookupEntryCall struct { header_ http.Header } -// LookupEntry: Looks up a single Entry by name using the permission on the -// source system. +// Get: Gets information about a location. // -// - 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)} +// - 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 } -// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects -// returned to the provided aspect types. It only works for CUSTOM view. -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}/entries/{en -// try}. -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. It only works for -// CUSTOM view. -func (c *ProjectsLocationsLookupEntryCall) Paths(paths ...string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - return c -} - -// View sets the optional parameter "view": View to control which parts of an -// entry the service should return. -// -// 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 exceeds 100, the first 100 will be returned. -// -// "ALL" - Returns all aspects. If the number of aspects exceeds 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 // details. -func (c *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupEntryCall { +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7819,27 +8268,27 @@ func (c *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *Project // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLookupEntryCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupEntryCall { +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. -func (c *ProjectsLocationsLookupEntryCall) Context(ctx context.Context) *ProjectsLocationsLookupEntryCall { +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLookupEntryCall) Header() http.Header { +func (c *ProjectsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -7847,7 +8296,7 @@ func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7860,13 +8309,13 @@ func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lookupEntry" call. +// Do executes the "dataplex.projects.locations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +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 { @@ -7885,7 +8334,7 @@ func (c *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleCloudLocationLocation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7898,93 +8347,90 @@ func (c *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsSearchEntriesCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SearchEntries: Searches for Entries matching the given query and scope. +// List: Lists information about the supported locations for this service. // -// - 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)} +// - 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 } -// OrderBy sets the optional parameter "orderBy": Specifies the ordering of -// results. -func (c *ProjectsLocationsSearchEntriesCall) OrderBy(orderBy string) *ProjectsLocationsSearchEntriesCall { - c.urlParams_.Set("orderBy", orderBy) +// 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": Number of results in the -// search page. If <=0, then defaults to 10. Max limit for page_size is 1000. -// Throws an invalid argument for page_size > 1000. -func (c *ProjectsLocationsSearchEntriesCall) PageSize(pageSize int64) *ProjectsLocationsSearchEntriesCall { +// 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": Page token received from -// a previous SearchEntries call. Provide this to retrieve the subsequent page. -func (c *ProjectsLocationsSearchEntriesCall) PageToken(pageToken string) *ProjectsLocationsSearchEntriesCall { +// 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 } -// 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. It must either be organizations/ or projects/. If it is -// unspecified, it defaults 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 // details. -func (c *ProjectsLocationsSearchEntriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchEntriesCall { +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSearchEntriesCall) Context(ctx context.Context) *ProjectsLocationsSearchEntriesCall { +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSearchEntriesCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:searchEntries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -7995,13 +8441,13 @@ func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.searchEntries" call. +// Do executes the "dataplex.projects.locations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1SearchEntriesResponse.ServerResponse.Header or (if a +// *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 *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1SearchEntriesResponse, error) { +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 { @@ -8020,7 +8466,7 @@ func (c *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1SearchEntriesResponse{ + ret := &GoogleCloudLocationListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8036,7 +8482,7 @@ func (c *ProjectsLocationsSearchEntriesCall) 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 *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1SearchEntriesResponse) error) error { +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -8054,94 +8500,132 @@ func (c *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(* } } -type ProjectsLocationsAspectTypesCreateCall struct { - s *Service - parent string - googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLookupEntryCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an AspectType. +// LookupEntry: Looks up a single Entry by name using the permission on the +// source system. // -// - parent: The resource name of the AspectType, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud 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 +// - 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 } -// AspectTypeId sets the optional parameter "aspectTypeId": Required. -// AspectType identifier. -func (c *ProjectsLocationsAspectTypesCreateCall) AspectTypeId(aspectTypeId string) *ProjectsLocationsAspectTypesCreateCall { - c.urlParams_.Set("aspectTypeId", aspectTypeId) +// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects +// returned to the provided aspect types. It only works for CUSTOM view. +func (c *ProjectsLocationsLookupEntryCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) return c } -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsAspectTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// Entry sets the optional parameter "entry": Required. The resource name of +// the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{en +// try}. +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. It only works for +// CUSTOM view. +func (c *ProjectsLocationsLookupEntryCall) Paths(paths ...string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// View sets the optional parameter "view": View to control which parts of an +// entry the service should return. +// +// 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 exceeds 100, the first 100 will be returned. +// +// "ALL" - Returns all aspects. If the number of aspects exceeds 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 // details. -func (c *ProjectsLocationsAspectTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesCreateCall { +func (c *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupEntryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLookupEntryCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupEntryCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesCreateCall { +func (c *ProjectsLocationsLookupEntryCall) Context(ctx context.Context) *ProjectsLocationsLookupEntryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsLookupEntryCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1aspecttype) - if err != nil { - return nil, err +func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lookupEntry") 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.create" call. +// Do executes the "dataplex.projects.locations.lookupEntry" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -8160,7 +8644,7 @@ func (c *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption 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, @@ -8173,7 +8657,7 @@ func (c *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsAspectTypesDeleteCall struct { +type ProjectsLocationsSearchEntriesCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -8181,56 +8665,85 @@ type ProjectsLocationsAspectTypesDeleteCall struct { header_ http.Header } -// Delete: Deletes an AspectType. +// SearchEntries: Searches for Entries matching the given query and scope. // -// - name: The resource name of the AspectType: -// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ -// id}. -func (r *ProjectsLocationsAspectTypesService) Delete(name string) *ProjectsLocationsAspectTypesDeleteCall { - c := &ProjectsLocationsAspectTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } -// 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) +// OrderBy sets the optional parameter "orderBy": Specifies the ordering of +// results. +func (c *ProjectsLocationsSearchEntriesCall) OrderBy(orderBy string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results in the +// search page. If <=0, then defaults to 10. Max limit for page_size is 1000. +// Throws an invalid argument for page_size > 1000. +func (c *ProjectsLocationsSearchEntriesCall) PageSize(pageSize int64) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous SearchEntries call. Provide this to retrieve the subsequent page. +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. It must either be organizations/ or projects/. If it is +// unspecified, it defaults 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 // details. -func (c *ProjectsLocationsAspectTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesDeleteCall { +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. -func (c *ProjectsLocationsAspectTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesDeleteCall { +func (c *ProjectsLocationsSearchEntriesCall) Context(ctx context.Context) *ProjectsLocationsSearchEntriesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAspectTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsSearchEntriesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:searchEntries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -8241,7 +8754,253 @@ func (c *ProjectsLocationsAspectTypesDeleteCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.delete" call. +// Do executes the "dataplex.projects.locations.searchEntries" call. +// 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 +} + +// 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")) + 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 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 Google Cloud 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": The service +// validates the request without performing any 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 +// details. +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. +func (c *ProjectsLocationsAspectTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1aspecttype) + if err != nil { + return nil, err + } + 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. +// 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 +} + +type ProjectsLocationsAspectTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an AspectType. +// +// - name: The resource name of the AspectType: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_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 +// details. +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. +func (c *ProjectsLocationsAspectTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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. // 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 @@ -14115,10 +14874,10 @@ type ProjectsLocationsEntryGroupsPatchCall struct { // Patch: Updates an EntryGroup. // -// - name: Output only. The relative resource name of the EntryGroup, of the -// form: -// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ -// id}. +// - name: Output only. The relative resource name of the EntryGroup, in the +// format +// projects/{project_id_or_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 @@ -14980,9 +15739,9 @@ type ProjectsLocationsEntryGroupsEntriesPatchCall struct { // Patch: Updates an Entry. // -// - name: Identifier. The relative resource name of the Entry, of the form: -// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ -// entry}. +// - name: Identifier. The relative resource name of the entry, in the format +// projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_ +// group_id}/entries/{entry_id}. func (r *ProjectsLocationsEntryGroupsEntriesService) Patch(name string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesPatchCall { c := &ProjectsLocationsEntryGroupsEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -15098,7 +15857,861 @@ func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + 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 +} + +type ProjectsLocationsEntryTypesCreateCall struct { + s *Service + parent string + googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an EntryType. +// +// - parent: The resource name of the EntryType, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud 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": The service +// validates the request without performing any 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 +// details. +func (c *ProjectsLocationsEntryTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntryTypesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryTypesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") + 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.entryTypes.create" call. +// 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 *ProjectsLocationsEntryTypesCreateCall) 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 +} + +type ProjectsLocationsEntryTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an EntryType. +// +// - 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 +// details. +func (c *ProjectsLocationsEntryTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntryTypesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryTypesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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.entryTypes.delete" call. +// 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 *ProjectsLocationsEntryTypesDeleteCall) 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 +} + +type ProjectsLocationsEntryTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an EntryType. +// +// - 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 +// details. +func (c *ProjectsLocationsEntryTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsEntryTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryTypesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntryTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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.entryTypes.get" call. +// 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 *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryType, 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 := &GoogleCloudDataplexV1EntryType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsEntryTypesGetIamPolicyCall 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 *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c := &ProjectsLocationsEntryTypesGetIamPolicyCall{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 *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 +// details. +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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.entryTypes.getIamPolicy" call. +// 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) 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 +} + +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 Google Cloud 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 service supports the following formats: labels.key1 = +// "value1" labels:key1 name = "value"These restrictions can be conjoined 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": Orders the result by name or +// create_time fields. If not specified, the ordering is undefined. +func (c *ProjectsLocationsEntryTypesListCall) OrderBy(orderBy string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// EntryTypes to return. The service may return fewer than this value. If +// unspecified, the service returns at most 10 EntryTypes. 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 +} + +// 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 you 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 +// details. +func (c *ProjectsLocationsEntryTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsEntryTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryTypesListCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntryTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/entryTypes") + 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.entryTypes.list" call. +// 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 { + 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 := &GoogleCloudDataplexV1ListEntryTypesResponse{ + 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 +} + +// 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")) + 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 ProjectsLocationsEntryTypesPatchCall struct { + s *Service + name string + googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an EntryType. +// +// - 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 +} + +// 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": The service +// validates the request without performing any 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 +// details. +func (c *ProjectsLocationsEntryTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntryTypesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryTypesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.entryTypes.patch" call. +// 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 *ProjectsLocationsEntryTypesPatchCall) 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 +} + +type ProjectsLocationsEntryTypesSetIamPolicyCall 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 *ProjectsLocationsEntryTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryTypesSetIamPolicyCall { + c := &ProjectsLocationsEntryTypesSetIamPolicyCall{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 +// details. +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + 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.entryTypes.setIamPolicy" call. +// 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 *ProjectsLocationsEntryTypesSetIamPolicyCall) 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, @@ -15111,75 +16724,65 @@ func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEntryTypesCreateCall struct { - s *Service - parent string - googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an EntryType. +// 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 EntryType, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud 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": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsEntryTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesCreateCall { - 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 *ProjectsLocationsEntryTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryTypesTestIamPermissionsCall { + c := &ProjectsLocationsEntryTypesTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsEntryTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesCreateCall { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesCreateCall { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15187,18 +16790,18 @@ func (c *ProjectsLocationsEntryTypesCreateCall) doRequest(alt string) (*http.Res } 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.entryTypes.create" call. +// Do executes the "dataplex.projects.locations.entryTypes.testIamPermissions" call. // 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 +// *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 *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15217,7 +16820,7 @@ func (c *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) 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, @@ -15230,81 +16833,103 @@ func (c *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlossariesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an EntryType. +// 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 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 +// - 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 *ProjectsLocationsGlossariesService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesGetIamPolicyCall { + c := &ProjectsLocationsGlossariesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource 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) +// 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 *ProjectsLocationsGlossariesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsEntryTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesDeleteCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesDeleteCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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.entryTypes.delete" call. +// Do executes the "dataplex.projects.locations.glossaries.getIamPolicy" call. // 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 *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsGlossariesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15323,7 +16948,7 @@ func (c *ProjectsLocationsEntryTypesDeleteCall) 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, @@ -15336,85 +16961,81 @@ func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlossariesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an EntryType. +// 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 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 +// - 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 *ProjectsLocationsGlossariesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesSetIamPolicyCall { + c := &ProjectsLocationsGlossariesSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsEntryTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetCall { +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsEntryTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetCall { +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.entryTypes.get" call. +// Do executes the "dataplex.projects.locations.glossaries.setIamPolicy" call. // 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 *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryType, error) { +// *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 *ProjectsLocationsGlossariesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15433,7 +17054,7 @@ func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1EntryType{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15446,86 +17067,67 @@ func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsEntryTypesGetIamPolicyCall 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 *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryTypesGetIamPolicyCall { - c := &ProjectsLocationsEntryTypesGetIamPolicyCall{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 *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryTypesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +type ProjectsLocationsGlossariesTestIamPermissionsCall 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 *ProjectsLocationsGlossariesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesTestIamPermissionsCall { + c := &ProjectsLocationsGlossariesTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } 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/{+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 } @@ -15536,13 +17138,13 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.testIamPermissions" call. // 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsGlossariesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15561,7 +17163,7 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15574,64 +17176,48 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEntryTypesListCall struct { +type ProjectsLocationsGovernanceRulesGetIamPolicyCall struct { s *Service - parent string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists EntryType resources in a project and location. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - parent: The resource name of the EntryType location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud 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 service supports the following formats: labels.key1 = -// "value1" labels:key1 name = "value"These restrictions can be conjoined 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": Orders the result by name or -// create_time fields. If not specified, the ordering is undefined. -func (c *ProjectsLocationsEntryTypesListCall) OrderBy(orderBy string) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// EntryTypes to return. The service may return fewer than this value. If -// unspecified, the service returns at most 10 EntryTypes. 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)) +// - 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 *ProjectsLocationsGovernanceRulesService) GetIamPolicy(resource string) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { + c := &ProjectsLocationsGovernanceRulesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// 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 you provided to ListEntryTypes -// must match the call that provided the page token. -func (c *ProjectsLocationsEntryTypesListCall) PageToken(pageToken string) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *ProjectsLocationsGovernanceRulesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsEntryTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesListCall { +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15639,27 +17225,27 @@ func (c *ProjectsLocationsEntryTypesListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsEntryTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesListCall { +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesListCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesListCall { +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesListCall) Header() http.Header { +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15667,7 +17253,7 @@ func (c *ProjectsLocationsEntryTypesListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15675,18 +17261,18 @@ func (c *ProjectsLocationsEntryTypesListCall) doRequest(alt string) (*http.Respo } 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.entryTypes.list" call. +// Do executes the "dataplex.projects.locations.governanceRules.getIamPolicy" call. // 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) { +// *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 *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15705,7 +17291,7 @@ func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEntryTypesResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15718,116 +17304,81 @@ func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsEntryTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryTypesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsEntryTypesPatchCall struct { +type ProjectsLocationsGovernanceRulesSetIamPolicyCall struct { s *Service - name string - googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates an EntryType. +// 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: 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 -} - -// 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": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsEntryTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - 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 *ProjectsLocationsGovernanceRulesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { + c := &ProjectsLocationsGovernanceRulesSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsEntryTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesPatchCall { +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesPatchCall { +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesPatchCall) Header() http.Header { +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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.entryTypes.patch" call. +// Do executes the "dataplex.projects.locations.governanceRules.setIamPolicy" call. // 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 *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15846,7 +17397,7 @@ func (c *ProjectsLocationsEntryTypesPatchCall) 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, @@ -15859,62 +17410,65 @@ func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGovernanceRulesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + 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. +// 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 is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsEntryTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryTypesSetIamPolicyCall { - c := &ProjectsLocationsEntryTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsGovernanceRulesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { + c := &ProjectsLocationsGovernanceRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + 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 // details. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesSetIamPolicyCall { +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesSetIamPolicyCall { +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) if err != nil { return nil, err } 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}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15927,13 +17481,13 @@ func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.governanceRules.testIamPermissions" call. // 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 *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15952,7 +17506,7 @@ func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15965,65 +17519,78 @@ func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEntryTypesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesCreateCall struct { + s *Service + parent string + googleclouddataplexv1lake *GoogleCloudDataplexV1Lake + 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. +// Create: Creates a lake 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 *ProjectsLocationsEntryTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryTypesTestIamPermissionsCall { - c := &ProjectsLocationsEntryTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The resource name of the lake location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a GCP region. +func (r *ProjectsLocationsLakesService) Create(parent string, googleclouddataplexv1lake *GoogleCloudDataplexV1Lake) *ProjectsLocationsLakesCreateCall { + c := &ProjectsLocationsLakesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1lake = googleclouddataplexv1lake + return c +} + +// LakeId sets the optional parameter "lakeId": Required. Lake identifier. This +// ID will be used to generate names such as database and dataset names when +// publishing metadata to Hive Metastore and BigQuery. * 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 *ProjectsLocationsLakesCreateCall) LakeId(lakeId string) *ProjectsLocationsLakesCreateCall { + c.urlParams_.Set("lakeId", lakeId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesCreateCall { + 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 // details. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesTestIamPermissionsCall { +func (c *ProjectsLocationsLakesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesTestIamPermissionsCall { +func (c *ProjectsLocationsLakesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1lake) if err != nil { return nil, err } 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}/lakes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -16031,18 +17598,18 @@ func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) doRequest(alt string } 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.entryTypes.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.create" call. // 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 +// *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 *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsLakesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16061,7 +17628,7 @@ func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) 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, @@ -16074,103 +17641,73 @@ func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsGovernanceRulesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesDeleteCall struct { + s *Service + name string + 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. +// Delete: Deletes a lake resource. All zones within the lake must be deleted +// before the lake can be deleted. // -// - 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 *ProjectsLocationsGovernanceRulesService) GetIamPolicy(resource string) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { - c := &ProjectsLocationsGovernanceRulesGetIamPolicyCall{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 *ProjectsLocationsGovernanceRulesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The resource name of the lake: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesService) Delete(name string) *ProjectsLocationsLakesDeleteCall { + c := &ProjectsLocationsLakesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { +func (c *ProjectsLocationsLakesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { +func (c *ProjectsLocationsLakesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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 := 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{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.governanceRules.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.delete" call. // 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 *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsLakesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16189,7 +17726,7 @@ func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Do(opts ...googleapi. 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, @@ -16202,81 +17739,84 @@ func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsGovernanceRulesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. +// Get: Retrieves a lake resource. // -// - 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 *ProjectsLocationsGovernanceRulesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { - c := &ProjectsLocationsGovernanceRulesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The resource name of the lake: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesService) Get(name string) *ProjectsLocationsLakesGetCall { + c := &ProjectsLocationsLakesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { +func (c *ProjectsLocationsLakesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { +func (c *ProjectsLocationsLakesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.governanceRules.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.get" call. // 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 *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1Lake.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 *ProjectsLocationsLakesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Lake, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16295,7 +17835,7 @@ func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Lake{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16308,67 +17848,86 @@ func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsGovernanceRulesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesGetIamPolicyCall struct { + s *Service + resource 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. +// 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 detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsGovernanceRulesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { - c := &ProjectsLocationsGovernanceRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsLakesService) GetIamPolicy(resource string) *ProjectsLocationsLakesGetIamPolicyCall { + c := &ProjectsLocationsLakesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsLakesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { +func (c *ProjectsLocationsLakesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { +func (c *ProjectsLocationsLakesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:testIamPermissions") + 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 } @@ -16379,13 +17938,13 @@ func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.governanceRules.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.getIamPolicy" call. // 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 *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *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 *ProjectsLocationsLakesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16404,7 +17963,7 @@ func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16417,80 +17976,99 @@ func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsLakesCreateCall struct { - s *Service - parent string - googleclouddataplexv1lake *GoogleCloudDataplexV1Lake - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a lake resource. +// List: Lists lake resources in a project and location. // // - parent: The resource name of the lake location, of the form: // projects/{project_number}/locations/{location_id} where location_id refers // to a GCP region. -func (r *ProjectsLocationsLakesService) Create(parent string, googleclouddataplexv1lake *GoogleCloudDataplexV1Lake) *ProjectsLocationsLakesCreateCall { - c := &ProjectsLocationsLakesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsLakesService) List(parent string) *ProjectsLocationsLakesListCall { + c := &ProjectsLocationsLakesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddataplexv1lake = googleclouddataplexv1lake return c } -// LakeId sets the optional parameter "lakeId": Required. Lake identifier. This -// ID will be used to generate names such as database and dataset names when -// publishing metadata to Hive Metastore and BigQuery. * 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 *ProjectsLocationsLakesCreateCall) LakeId(lakeId string) *ProjectsLocationsLakesCreateCall { - c.urlParams_.Set("lakeId", lakeId) +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsLakesListCall) Filter(filter string) *ProjectsLocationsLakesListCall { + c.urlParams_.Set("filter", filter) return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsLakesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsLakesListCall) OrderBy(orderBy string) *ProjectsLocationsLakesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of Lakes to +// return. The service may return fewer than this value. If unspecified, at +// most 10 lakes will be returned. The maximum value is 1000; values above 1000 +// will be coerced to 1000. +func (c *ProjectsLocationsLakesListCall) PageSize(pageSize int64) *ProjectsLocationsLakesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListLakes call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListLakes must match the +// call that provided the page token. +func (c *ProjectsLocationsLakesListCall) PageToken(pageToken string) *ProjectsLocationsLakesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesCreateCall { +func (c *ProjectsLocationsLakesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesCreateCall { +func (c *ProjectsLocationsLakesListCall) Context(ctx context.Context) *ProjectsLocationsLakesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1lake) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/lakes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -16501,13 +18079,13 @@ func (c *ProjectsLocationsLakesCreateCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.create" call. +// Do executes the "dataplex.projects.locations.lakes.list" call. // 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 +// *GoogleCloudDataplexV1ListLakesResponse.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 *ProjectsLocationsLakesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListLakesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16526,7 +18104,7 @@ func (c *ProjectsLocationsLakesCreateCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1ListLakesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16539,56 +18117,96 @@ func (c *ProjectsLocationsLakesCreateCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsLakesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsLakesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListLakesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsLakesPatchCall struct { + s *Service + name string + googleclouddataplexv1lake *GoogleCloudDataplexV1Lake + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a lake resource. +// +// - name: Output only. The relative resource name of the lake, of the form: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesService) Patch(name string, googleclouddataplexv1lake *GoogleCloudDataplexV1Lake) *ProjectsLocationsLakesPatchCall { + c := &ProjectsLocationsLakesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1lake = googleclouddataplexv1lake + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsLakesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c } -// Delete: Deletes a lake resource. All zones within the lake must be deleted -// before the lake can be deleted. -// -// - name: The resource name of the lake: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesService) Delete(name string) *ProjectsLocationsLakesDeleteCall { - c := &ProjectsLocationsLakesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesPatchCall { + 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 // details. -func (c *ProjectsLocationsLakesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesDeleteCall { +func (c *ProjectsLocationsLakesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesDeleteCall { +func (c *ProjectsLocationsLakesPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsLakesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1lake) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -16599,13 +18217,13 @@ func (c *ProjectsLocationsLakesDeleteCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.delete" call. +// Do executes the "dataplex.projects.locations.lakes.patch" call. // 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 *ProjectsLocationsLakesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16637,84 +18255,81 @@ func (c *ProjectsLocationsLakesDeleteCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsLakesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a lake 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 lake: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesService) Get(name string) *ProjectsLocationsLakesGetCall { - c := &ProjectsLocationsLakesGetCall{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 *ProjectsLocationsLakesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesSetIamPolicyCall { + c := &ProjectsLocationsLakesSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsLakesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesGetCall { +func (c *ProjectsLocationsLakesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesGetCall { +func (c *ProjectsLocationsLakesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.get" call. +// Do executes the "dataplex.projects.locations.lakes.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Lake.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 *ProjectsLocationsLakesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Lake, error) { +// *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 *ProjectsLocationsLakesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16733,7 +18348,7 @@ func (c *ProjectsLocationsLakesGetCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Lake{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16746,86 +18361,67 @@ func (c *ProjectsLocationsLakesGetCall) Do(opts ...googleapi.CallOption) (*Googl return ret, nil } -type ProjectsLocationsLakesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + 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. +// 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 is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsLakesService) GetIamPolicy(resource string) *ProjectsLocationsLakesGetIamPolicyCall { - c := &ProjectsLocationsLakesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsLakesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesTestIamPermissionsCall { + c := &ProjectsLocationsLakesTestIamPermissionsCall{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 *ProjectsLocationsLakesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + 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 // details. -func (c *ProjectsLocationsLakesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesGetIamPolicyCall { +func (c *ProjectsLocationsLakesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesGetIamPolicyCall { +func (c *ProjectsLocationsLakesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } 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/{+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 } @@ -16836,13 +18432,13 @@ func (c *ProjectsLocationsLakesGetIamPolicyCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.testIamPermissions" call. // 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 *ProjectsLocationsLakesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsLakesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16861,7 +18457,7 @@ func (c *ProjectsLocationsLakesGetIamPolicyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16874,7 +18470,7 @@ func (c *ProjectsLocationsLakesGetIamPolicyCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsLakesListCall struct { +type ProjectsLocationsLakesActionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -16883,44 +18479,30 @@ type ProjectsLocationsLakesListCall struct { header_ http.Header } -// List: Lists lake resources in a project and location. +// List: Lists action resources in a lake. // -// - parent: The resource name of the lake location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a GCP region. -func (r *ProjectsLocationsLakesService) List(parent string) *ProjectsLocationsLakesListCall { - c := &ProjectsLocationsLakesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent lake: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesActionsService) List(parent string) *ProjectsLocationsLakesActionsListCall { + c := &ProjectsLocationsLakesActionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsLakesListCall) Filter(filter string) *ProjectsLocationsLakesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsLakesListCall) OrderBy(orderBy string) *ProjectsLocationsLakesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Lakes to -// return. The service may return fewer than this value. If unspecified, at -// most 10 lakes will be returned. The maximum value is 1000; values above 1000 -// will be coerced to 1000. -func (c *ProjectsLocationsLakesListCall) PageSize(pageSize int64) *ProjectsLocationsLakesListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of actions +// to return. The service may return fewer than this value. If unspecified, at +// most 10 actions will be returned. The maximum value is 1000; values above +// 1000 will be coerced to 1000. +func (c *ProjectsLocationsLakesActionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesActionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListLakes call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListLakes must match the -// call that provided the page token. -func (c *ProjectsLocationsLakesListCall) PageToken(pageToken string) *ProjectsLocationsLakesListCall { +// a previous ListLakeActions call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListLakeActions must +// match the call that provided the page token. +func (c *ProjectsLocationsLakesActionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesActionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -16928,7 +18510,7 @@ func (c *ProjectsLocationsLakesListCall) PageToken(pageToken string) *ProjectsLo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesListCall { +func (c *ProjectsLocationsLakesActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesActionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16936,27 +18518,27 @@ func (c *ProjectsLocationsLakesListCall) Fields(s ...googleapi.Field) *ProjectsL // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesListCall { +func (c *ProjectsLocationsLakesActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesActionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesListCall) Context(ctx context.Context) *ProjectsLocationsLakesListCall { +func (c *ProjectsLocationsLakesActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesActionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesListCall) Header() http.Header { +func (c *ProjectsLocationsLakesActionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesActionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16964,7 +18546,7 @@ func (c *ProjectsLocationsLakesListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lakes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/actions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16977,13 +18559,13 @@ func (c *ProjectsLocationsLakesListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.list" call. +// Do executes the "dataplex.projects.locations.lakes.actions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListLakesResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListActionsResponse.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 *ProjectsLocationsLakesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListLakesResponse, error) { +func (c *ProjectsLocationsLakesActionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListActionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17002,7 +18584,7 @@ func (c *ProjectsLocationsLakesListCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListLakesResponse{ + ret := &GoogleCloudDataplexV1ListActionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17018,7 +18600,7 @@ func (c *ProjectsLocationsLakesListCall) Do(opts ...googleapi.CallOption) (*Goog // 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 *ProjectsLocationsLakesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListLakesResponse) error) error { +func (c *ProjectsLocationsLakesActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -17036,36 +18618,29 @@ func (c *ProjectsLocationsLakesListCall) Pages(ctx context.Context, f func(*Goog } } -type ProjectsLocationsLakesPatchCall struct { - s *Service - name string - googleclouddataplexv1lake *GoogleCloudDataplexV1Lake - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentCreateCall struct { + s *Service + parent string + googleclouddataplexv1content *GoogleCloudDataplexV1Content + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a lake resource. +// Create: Create a content. // -// - name: Output only. The relative resource name of the lake, of the form: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesService) Patch(name string, googleclouddataplexv1lake *GoogleCloudDataplexV1Lake) *ProjectsLocationsLakesPatchCall { - c := &ProjectsLocationsLakesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1lake = googleclouddataplexv1lake - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsLakesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesContentService) Create(parent string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentCreateCall { + c := &ProjectsLocationsLakesContentCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1content = googleclouddataplexv1content return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsLakesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesPatchCall { +func (c *ProjectsLocationsLakesContentCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -17073,55 +18648,55 @@ func (c *ProjectsLocationsLakesPatchCall) ValidateOnly(validateOnly bool) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesPatchCall { +func (c *ProjectsLocationsLakesContentCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesPatchCall { +func (c *ProjectsLocationsLakesContentCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesContentCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesPatchCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1lake) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/content") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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.lakes.patch" call. +// Do executes the "dataplex.projects.locations.lakes.content.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesContentCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17140,7 +18715,7 @@ func (c *ProjectsLocationsLakesPatchCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1Content{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17153,81 +18728,198 @@ func (c *ProjectsLocationsLakesPatchCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -type ProjectsLocationsLakesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. +// Delete: Delete a content. // -// - 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 *ProjectsLocationsLakesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesSetIamPolicyCall { - c := &ProjectsLocationsLakesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The resource name of the content: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont +// ent_id}. +func (r *ProjectsLocationsLakesContentService) Delete(name string) *ProjectsLocationsLakesContentDeleteCall { + c := &ProjectsLocationsLakesContentDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesSetIamPolicyCall { +func (c *ProjectsLocationsLakesContentDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesSetIamPolicyCall { +func (c *ProjectsLocationsLakesContentDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesContentDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsLakesContentDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + 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.lakes.content.delete" call. +// 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 *ProjectsLocationsLakesContentDeleteCall) 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 +} + +type ProjectsLocationsLakesContentGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a content resource. +// +// - name: The resource name of the content: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont +// ent_id}. +func (r *ProjectsLocationsLakesContentService) Get(name string) *ProjectsLocationsLakesContentGetCall { + c := &ProjectsLocationsLakesContentGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": Specify content view to make a +// partial request. +// +// Possible values: +// +// "CONTENT_VIEW_UNSPECIFIED" - Content view not specified. Defaults to +// +// BASIC. The API will default to the BASIC view. +// +// "BASIC" - Will not return the data_text field. +// "FULL" - Returns the complete proto. +func (c *ProjectsLocationsLakesContentGetCall) View(view string) *ProjectsLocationsLakesContentGetCall { + 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 +// details. +func (c *ProjectsLocationsLakesContentGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesContentGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsLakesContentGetCall) Context(ctx context.Context) *ProjectsLocationsLakesContentGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsLakesContentGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.content.get" call. // 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 *ProjectsLocationsLakesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17246,7 +18938,7 @@ func (c *ProjectsLocationsLakesSetIamPolicyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Content{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17259,67 +18951,89 @@ func (c *ProjectsLocationsLakesSetIamPolicyCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsLakesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentGetIamPolicyCall struct { + s *Service + resource 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. +// GetIamPolicy: Gets the access control policy for a contentitem resource. A +// NOT_FOUND error is returned if the resource does not exist. An empty policy +// is returned if the resource exists but does not have a policy set on +// it.Caller must have Google IAM dataplex.content.getIamPolicy permission on +// the 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 *ProjectsLocationsLakesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesTestIamPermissionsCall { - c := &ProjectsLocationsLakesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsLakesContentService) GetIamPolicy(resource string) *ProjectsLocationsLakesContentGetIamPolicyCall { + c := &ProjectsLocationsLakesContentGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsLakesContentGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesContentGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsLakesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTestIamPermissionsCall { +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesTestIamPermissionsCall { +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:testIamPermissions") + 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 } @@ -17330,13 +19044,13 @@ func (c *ProjectsLocationsLakesTestIamPermissionsCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.content.getIamPolicy" call. // 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 *ProjectsLocationsLakesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *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 *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17355,7 +19069,7 @@ func (c *ProjectsLocationsLakesTestIamPermissionsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17368,7 +19082,7 @@ func (c *ProjectsLocationsLakesTestIamPermissionsCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsLakesActionsListCall struct { +type ProjectsLocationsLakesContentListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -17377,30 +19091,39 @@ type ProjectsLocationsLakesActionsListCall struct { header_ http.Header } -// List: Lists action resources in a lake. +// List: List content. // // - parent: The resource name of the parent lake: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesActionsService) List(parent string) *ProjectsLocationsLakesActionsListCall { - c := &ProjectsLocationsLakesActionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesContentService) List(parent string) *ProjectsLocationsLakesContentListCall { + c := &ProjectsLocationsLakesContentListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of actions +// Filter sets the optional parameter "filter": Filter request. Filters are +// case-sensitive. The following formats are supported:labels.key1 = "value1" +// labels:key1 type = "NOTEBOOK" type = "SQL_SCRIPT"These restrictions can be +// coinjoined with AND, OR and NOT conjunctions. +func (c *ProjectsLocationsLakesContentListCall) Filter(filter string) *ProjectsLocationsLakesContentListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of content // to return. The service may return fewer than this value. If unspecified, at -// most 10 actions will be returned. The maximum value is 1000; values above +// most 10 content will be returned. The maximum value is 1000; values above // 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesActionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesActionsListCall { +func (c *ProjectsLocationsLakesContentListCall) PageSize(pageSize int64) *ProjectsLocationsLakesContentListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListLakeActions call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListLakeActions must -// match the call that provided the page token. -func (c *ProjectsLocationsLakesActionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesActionsListCall { +// a previous ListContent call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListContent must match the +// call that provided the page token. +func (c *ProjectsLocationsLakesContentListCall) PageToken(pageToken string) *ProjectsLocationsLakesContentListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17408,7 +19131,7 @@ func (c *ProjectsLocationsLakesActionsListCall) PageToken(pageToken string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesActionsListCall { +func (c *ProjectsLocationsLakesContentListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17416,27 +19139,27 @@ func (c *ProjectsLocationsLakesActionsListCall) Fields(s ...googleapi.Field) *Pr // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesActionsListCall { +func (c *ProjectsLocationsLakesContentListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesActionsListCall { +func (c *ProjectsLocationsLakesContentListCall) Context(ctx context.Context) *ProjectsLocationsLakesContentListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesActionsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesActionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17444,7 +19167,7 @@ func (c *ProjectsLocationsLakesActionsListCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/actions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/content") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17457,13 +19180,13 @@ func (c *ProjectsLocationsLakesActionsListCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.actions.list" call. +// Do executes the "dataplex.projects.locations.lakes.content.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListActionsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListContentResponse.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 *ProjectsLocationsLakesActionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListActionsResponse, error) { +func (c *ProjectsLocationsLakesContentListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17482,7 +19205,7 @@ func (c *ProjectsLocationsLakesActionsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListActionsResponse{ + ret := &GoogleCloudDataplexV1ListContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17498,7 +19221,7 @@ func (c *ProjectsLocationsLakesActionsListCall) 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 *ProjectsLocationsLakesActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { +func (c *ProjectsLocationsLakesContentListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListContentResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -17516,29 +19239,37 @@ func (c *ProjectsLocationsLakesActionsListCall) Pages(ctx context.Context, f fun } } -type ProjectsLocationsLakesContentCreateCall struct { +type ProjectsLocationsLakesContentPatchCall struct { s *Service - parent string + name string googleclouddataplexv1content *GoogleCloudDataplexV1Content urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Create a content. +// Patch: Update a content. Only supports full resource update. // -// - parent: The resource name of the parent lake: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesContentService) Create(parent string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentCreateCall { - c := &ProjectsLocationsLakesContentCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Output only. The relative resource name of the content, of the form: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont +// ent_id}. +func (r *ProjectsLocationsLakesContentService) Patch(name string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentPatchCall { + c := &ProjectsLocationsLakesContentPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1content = googleclouddataplexv1content return c } +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsLakesContentPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesContentPatchCall { + 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 *ProjectsLocationsLakesContentCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentCreateCall { +func (c *ProjectsLocationsLakesContentPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -17546,27 +19277,27 @@ func (c *ProjectsLocationsLakesContentCreateCall) ValidateOnly(validateOnly bool // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesContentCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentCreateCall { +func (c *ProjectsLocationsLakesContentPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesContentCreateCall { +func (c *ProjectsLocationsLakesContentPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesContentPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) @@ -17575,26 +19306,26 @@ func (c *ProjectsLocationsLakesContentCreateCall) doRequest(alt string) (*http.R } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/content") + 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.lakes.content.create" call. +// Do executes the "dataplex.projects.locations.lakes.content.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesContentPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17626,72 +19357,81 @@ func (c *ProjectsLocationsLakesContentCreateCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsLakesContentDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete a content. +// SetIamPolicy: Sets the access control policy on the specified contentitem +// resource. Replaces any existing policy.Caller must have Google IAM +// dataplex.content.setIamPolicy permission on the resource. // -// - name: The resource name of the content: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont -// ent_id}. -func (r *ProjectsLocationsLakesContentService) Delete(name string) *ProjectsLocationsLakesContentDeleteCall { - c := &ProjectsLocationsLakesContentDeleteCall{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 *ProjectsLocationsLakesContentService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesContentSetIamPolicyCall { + c := &ProjectsLocationsLakesContentSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsLakesContentDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentDeleteCall { +func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesContentDeleteCall { +func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsLakesContentSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.content.delete" call. +// Do executes the "dataplex.projects.locations.lakes.content.setIamPolicy" call. // 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 *ProjectsLocationsLakesContentDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *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 *ProjectsLocationsLakesContentSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17710,7 +19450,7 @@ func (c *ProjectsLocationsLakesContentDeleteCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17723,101 +19463,85 @@ func (c *ProjectsLocationsLakesContentDeleteCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsLakesContentGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get a content resource. -// -// - name: The resource name of the content: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont -// ent_id}. -func (r *ProjectsLocationsLakesContentService) Get(name string) *ProjectsLocationsLakesContentGetCall { - c := &ProjectsLocationsLakesContentGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsLakesContentTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Specify content view to make a -// partial request. -// -// Possible values: -// -// "CONTENT_VIEW_UNSPECIFIED" - Content view not specified. Defaults to -// -// BASIC. The API will default to the BASIC view. +// TestIamPermissions: Returns the caller's permissions on a resource. If the +// resource does not exist, an empty set of permissions is returned (a +// NOT_FOUND error is not returned).A caller is not required to have Google IAM +// permission to make this request.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" - Will not return the data_text field. -// "FULL" - Returns the complete proto. -func (c *ProjectsLocationsLakesContentGetCall) View(view string) *ProjectsLocationsLakesContentGetCall { - 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 *ProjectsLocationsLakesContentService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesContentTestIamPermissionsCall { + c := &ProjectsLocationsLakesContentTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsLakesContentGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentGetCall { +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesContentGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentGetCall) Context(ctx context.Context) *ProjectsLocationsLakesContentGetCall { +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesContentTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.content.get" call. +// Do executes the "dataplex.projects.locations.lakes.content.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Content.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsLakesContentGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17836,7 +19560,7 @@ func (c *ProjectsLocationsLakesContentGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Content{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17849,106 +19573,85 @@ func (c *ProjectsLocationsLakesContentGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsLakesContentGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentitemsCreateCall struct { + s *Service + parent string + googleclouddataplexv1content *GoogleCloudDataplexV1Content + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a contentitem resource. A -// NOT_FOUND error is returned if the resource does not exist. An empty policy -// is returned if the resource exists but does not have a policy set on -// it.Caller must have Google IAM dataplex.content.getIamPolicy permission on -// the resource. +// Create: Create a content. // -// - 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 *ProjectsLocationsLakesContentService) GetIamPolicy(resource string) *ProjectsLocationsLakesContentGetIamPolicyCall { - c := &ProjectsLocationsLakesContentGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesContentitemsService) Create(parent string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentitemsCreateCall { + c := &ProjectsLocationsLakesContentitemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1content = googleclouddataplexv1content 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 *ProjectsLocationsLakesContentGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesContentGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesContentitemsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsCreateCall { + 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 // details. -func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentGetIamPolicyCall { +func (c *ProjectsLocationsLakesContentitemsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesContentGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentGetIamPolicyCall { +func (c *ProjectsLocationsLakesContentitemsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesContentitemsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) + if err != nil { + return nil, err + } 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}/contentitems") 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.lakes.content.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.create" call. // 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 *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentitemsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17967,7 +19670,7 @@ func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Content{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17980,111 +19683,72 @@ func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsLakesContentListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentitemsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: List content. +// Delete: Delete a content. // -// - parent: The resource name of the parent lake: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesContentService) List(parent string) *ProjectsLocationsLakesContentListCall { - c := &ProjectsLocationsLakesContentListCall{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 type = "NOTEBOOK" type = "SQL_SCRIPT"These restrictions can be -// coinjoined with AND, OR and NOT conjunctions. -func (c *ProjectsLocationsLakesContentListCall) Filter(filter string) *ProjectsLocationsLakesContentListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of content -// to return. The service may return fewer than this value. If unspecified, at -// most 10 content will be returned. The maximum value is 1000; values above -// 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesContentListCall) PageSize(pageSize int64) *ProjectsLocationsLakesContentListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListContent call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListContent must match the -// call that provided the page token. -func (c *ProjectsLocationsLakesContentListCall) PageToken(pageToken string) *ProjectsLocationsLakesContentListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the content: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont +// ent_id}. +func (r *ProjectsLocationsLakesContentitemsService) Delete(name string) *ProjectsLocationsLakesContentitemsDeleteCall { + c := &ProjectsLocationsLakesContentitemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesContentListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentListCall { +func (c *ProjectsLocationsLakesContentitemsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesContentListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentListCall) Context(ctx context.Context) *ProjectsLocationsLakesContentListCall { +func (c *ProjectsLocationsLakesContentitemsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentListCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentitemsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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}/content") + 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.lakes.content.list" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListContentResponse.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 *ProjectsLocationsLakesContentListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListContentResponse, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesContentitemsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18103,7 +19767,7 @@ func (c *ProjectsLocationsLakesContentListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListContentResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18116,97 +19780,84 @@ func (c *ProjectsLocationsLakesContentListCall) Do(opts ...googleapi.CallOption) return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsLakesContentListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListContentResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsLakesContentPatchCall struct { - s *Service - name string - googleclouddataplexv1content *GoogleCloudDataplexV1Content - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentitemsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Update a content. Only supports full resource update. +// Get: Get a content resource. // -// - name: Output only. The relative resource name of the content, of the form: +// - name: The resource name of the content: // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont // ent_id}. -func (r *ProjectsLocationsLakesContentService) Patch(name string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentPatchCall { - c := &ProjectsLocationsLakesContentPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsLakesContentitemsService) Get(name string) *ProjectsLocationsLakesContentitemsGetCall { + c := &ProjectsLocationsLakesContentitemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1content = googleclouddataplexv1content return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsLakesContentPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesContentPatchCall { - 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 *ProjectsLocationsLakesContentPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// View sets the optional parameter "view": Specify content view to make a +// partial request. +// +// Possible values: +// +// "CONTENT_VIEW_UNSPECIFIED" - Content view not specified. Defaults to +// +// BASIC. The API will default to the BASIC view. +// +// "BASIC" - Will not return the data_text field. +// "FULL" - Returns the complete proto. +func (c *ProjectsLocationsLakesContentitemsGetCall) View(view string) *ProjectsLocationsLakesContentitemsGetCall { + 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 // details. -func (c *ProjectsLocationsLakesContentPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentPatchCall { +func (c *ProjectsLocationsLakesContentitemsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesContentitemsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesContentPatchCall { +func (c *ProjectsLocationsLakesContentitemsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentPatchCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesContentitemsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -18217,13 +19868,13 @@ func (c *ProjectsLocationsLakesContentPatchCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.content.patch" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.get" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18255,64 +19906,89 @@ func (c *ProjectsLocationsLakesContentPatchCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsLakesContentSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentitemsGetIamPolicyCall 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 contentitem -// resource. Replaces any existing policy.Caller must have Google IAM -// dataplex.content.setIamPolicy permission on the resource. +// GetIamPolicy: Gets the access control policy for a contentitem resource. A +// NOT_FOUND error is returned if the resource does not exist. An empty policy +// is returned if the resource exists but does not have a policy set on +// it.Caller must have Google IAM dataplex.content.getIamPolicy permission on +// the resource. // -// - resource: REQUIRED: The resource for which the policy is being specified. +// - 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 *ProjectsLocationsLakesContentService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesContentSetIamPolicyCall { - c := &ProjectsLocationsLakesContentSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsLakesContentitemsService) GetIamPolicy(resource string) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { + c := &ProjectsLocationsLakesContentitemsGetIamPolicyCall{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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentSetIamPolicyCall { +func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentSetIamPolicyCall { +func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}: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 } @@ -18323,13 +19999,13 @@ func (c *ProjectsLocationsLakesContentSetIamPolicyCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.content.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.getIamPolicy" call. // 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 *ProjectsLocationsLakesContentSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18361,85 +20037,111 @@ func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsLakesContentTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentitemsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns the caller's permissions on a resource. If the -// resource does not exist, an empty set of permissions is returned (a -// NOT_FOUND error is not returned).A caller is not required to have Google IAM -// permission to make this request.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: List content. // -// - 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 *ProjectsLocationsLakesContentService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesContentTestIamPermissionsCall { - c := &ProjectsLocationsLakesContentTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesContentitemsService) List(parent string) *ProjectsLocationsLakesContentitemsListCall { + c := &ProjectsLocationsLakesContentitemsListCall{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 type = "NOTEBOOK" type = "SQL_SCRIPT"These restrictions can be +// coinjoined with AND, OR and NOT conjunctions. +func (c *ProjectsLocationsLakesContentitemsListCall) Filter(filter string) *ProjectsLocationsLakesContentitemsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of content +// to return. The service may return fewer than this value. If unspecified, at +// most 10 content will be returned. The maximum value is 1000; values above +// 1000 will be coerced to 1000. +func (c *ProjectsLocationsLakesContentitemsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesContentitemsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListContent call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListContent must match the +// call that provided the page token. +func (c *ProjectsLocationsLakesContentitemsListCall) PageToken(pageToken string) *ProjectsLocationsLakesContentitemsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentTestIamPermissionsCall { +func (c *ProjectsLocationsLakesContentitemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesContentitemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesContentTestIamPermissionsCall { +func (c *ProjectsLocationsLakesContentitemsListCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesContentitemsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contentitems") 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.lakes.content.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListContentResponse.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 *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18458,7 +20160,7 @@ func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudDataplexV1ListContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18471,29 +20173,58 @@ func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsLakesContentitemsCreateCall struct { +// 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 *ProjectsLocationsLakesContentitemsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListContentResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsLakesContentitemsPatchCall struct { s *Service - parent string + name string googleclouddataplexv1content *GoogleCloudDataplexV1Content urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Create a content. +// Patch: Update a content. Only supports full resource update. // -// - parent: The resource name of the parent lake: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesContentitemsService) Create(parent string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentitemsCreateCall { - c := &ProjectsLocationsLakesContentitemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Output only. The relative resource name of the content, of the form: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont +// ent_id}. +func (r *ProjectsLocationsLakesContentitemsService) Patch(name string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentitemsPatchCall { + c := &ProjectsLocationsLakesContentitemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1content = googleclouddataplexv1content return c } +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsLakesContentitemsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesContentitemsPatchCall { + 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 *ProjectsLocationsLakesContentitemsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsCreateCall { +func (c *ProjectsLocationsLakesContentitemsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -18501,27 +20232,27 @@ func (c *ProjectsLocationsLakesContentitemsCreateCall) ValidateOnly(validateOnly // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesContentitemsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsCreateCall { +func (c *ProjectsLocationsLakesContentitemsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentitemsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsCreateCall { +func (c *ProjectsLocationsLakesContentitemsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentitemsCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesContentitemsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) @@ -18530,26 +20261,26 @@ func (c *ProjectsLocationsLakesContentitemsCreateCall) doRequest(alt string) (*h } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contentitems") + 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.lakes.contentitems.create" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudDataplexV1Content.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 *ProjectsLocationsLakesContentitemsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18581,72 +20312,81 @@ func (c *ProjectsLocationsLakesContentitemsCreateCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsLakesContentitemsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesContentitemsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete a content. +// SetIamPolicy: Sets the access control policy on the specified contentitem +// resource. Replaces any existing policy.Caller must have Google IAM +// dataplex.content.setIamPolicy permission on the resource. // -// - name: The resource name of the content: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont -// ent_id}. -func (r *ProjectsLocationsLakesContentitemsService) Delete(name string) *ProjectsLocationsLakesContentitemsDeleteCall { - c := &ProjectsLocationsLakesContentitemsDeleteCall{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 *ProjectsLocationsLakesContentitemsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { + c := &ProjectsLocationsLakesContentitemsSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsLakesContentitemsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsDeleteCall { +func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentitemsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsDeleteCall { +func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentitemsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.contentitems.delete" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.setIamPolicy" call. // 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 *ProjectsLocationsLakesContentitemsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *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 *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18665,7 +20405,7 @@ func (c *ProjectsLocationsLakesContentitemsDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18678,101 +20418,85 @@ func (c *ProjectsLocationsLakesContentitemsDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsLakesContentitemsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get a content resource. -// -// - name: The resource name of the content: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont -// ent_id}. -func (r *ProjectsLocationsLakesContentitemsService) Get(name string) *ProjectsLocationsLakesContentitemsGetCall { - c := &ProjectsLocationsLakesContentitemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsLakesContentitemsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Specify content view to make a -// partial request. -// -// Possible values: -// -// "CONTENT_VIEW_UNSPECIFIED" - Content view not specified. Defaults to -// -// BASIC. The API will default to the BASIC view. +// TestIamPermissions: Returns the caller's permissions on a resource. If the +// resource does not exist, an empty set of permissions is returned (a +// NOT_FOUND error is not returned).A caller is not required to have Google IAM +// permission to make this request.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" - Will not return the data_text field. -// "FULL" - Returns the complete proto. -func (c *ProjectsLocationsLakesContentitemsGetCall) View(view string) *ProjectsLocationsLakesContentitemsGetCall { - 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 *ProjectsLocationsLakesContentitemsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { + c := &ProjectsLocationsLakesContentitemsTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsLakesContentitemsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsGetCall { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesContentitemsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentitemsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsGetCall { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentitemsGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.contentitems.get" call. +// Do executes the "dataplex.projects.locations.lakes.contentitems.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Content.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18791,7 +20515,7 @@ func (c *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Content{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18804,106 +20528,94 @@ func (c *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsLakesContentitemsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesEnvironmentsCreateCall struct { + s *Service + parent string + googleclouddataplexv1environment *GoogleCloudDataplexV1Environment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a contentitem resource. A -// NOT_FOUND error is returned if the resource does not exist. An empty policy -// is returned if the resource exists but does not have a policy set on -// it.Caller must have Google IAM dataplex.content.getIamPolicy permission on -// the resource. +// Create: Create an environment 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 *ProjectsLocationsLakesContentitemsService) GetIamPolicy(resource string) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { - c := &ProjectsLocationsLakesContentitemsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesEnvironmentsService) Create(parent string, googleclouddataplexv1environment *GoogleCloudDataplexV1Environment) *ProjectsLocationsLakesEnvironmentsCreateCall { + c := &ProjectsLocationsLakesEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1environment = googleclouddataplexv1environment 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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// EnvironmentId sets the optional parameter "environmentId": Required. +// Environment 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 lake. +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) EnvironmentId(environmentId string) *ProjectsLocationsLakesEnvironmentsCreateCall { + c.urlParams_.Set("environmentId", environmentId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesEnvironmentsCreateCall { + 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 // details. -func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsGetIamPolicyCall { +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1environment) + if err != nil { + return nil, err + } 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}/environments") 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.lakes.contentitems.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.environments.create" call. // 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 *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsLakesEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18922,7 +20634,7 @@ func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Do(opts ...googleap 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, @@ -18935,111 +20647,74 @@ func (c *ProjectsLocationsLakesContentitemsGetIamPolicyCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsLakesContentitemsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesEnvironmentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: List content. +// Delete: Delete the environment resource. All the child resources must have +// been deleted before environment deletion can be initiated. // -// - parent: The resource name of the parent lake: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesContentitemsService) List(parent string) *ProjectsLocationsLakesContentitemsListCall { - c := &ProjectsLocationsLakesContentitemsListCall{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 type = "NOTEBOOK" type = "SQL_SCRIPT"These restrictions can be -// coinjoined with AND, OR and NOT conjunctions. -func (c *ProjectsLocationsLakesContentitemsListCall) Filter(filter string) *ProjectsLocationsLakesContentitemsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of content -// to return. The service may return fewer than this value. If unspecified, at -// most 10 content will be returned. The maximum value is 1000; values above -// 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesContentitemsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesContentitemsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListContent call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListContent must match the -// call that provided the page token. -func (c *ProjectsLocationsLakesContentitemsListCall) PageToken(pageToken string) *ProjectsLocationsLakesContentitemsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the environment: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/ +// {environment_id}. +func (r *ProjectsLocationsLakesEnvironmentsService) Delete(name string) *ProjectsLocationsLakesEnvironmentsDeleteCall { + c := &ProjectsLocationsLakesEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesContentitemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsListCall { +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesContentitemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentitemsListCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsListCall { +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentitemsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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}/contentitems") + 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.lakes.contentitems.list" call. +// Do executes the "dataplex.projects.locations.lakes.environments.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListContentResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListContentResponse, error) { +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19058,7 +20733,7 @@ func (c *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListContentResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19071,97 +20746,68 @@ func (c *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOp return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsLakesContentitemsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListContentResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsLakesContentitemsPatchCall struct { - s *Service - name string - googleclouddataplexv1content *GoogleCloudDataplexV1Content - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Update a content. Only supports full resource update. -// -// - name: Output only. The relative resource name of the content, of the form: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{cont -// ent_id}. -func (r *ProjectsLocationsLakesContentitemsService) Patch(name string, googleclouddataplexv1content *GoogleCloudDataplexV1Content) *ProjectsLocationsLakesContentitemsPatchCall { - c := &ProjectsLocationsLakesContentitemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1content = googleclouddataplexv1content - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsLakesContentitemsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesContentitemsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c +type ProjectsLocationsLakesEnvironmentsGetCall 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 *ProjectsLocationsLakesContentitemsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// Get: Get environment resource. +// +// - name: The resource name of the environment: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/ +// {environment_id}. +func (r *ProjectsLocationsLakesEnvironmentsService) Get(name string) *ProjectsLocationsLakesEnvironmentsGetCall { + c := &ProjectsLocationsLakesEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesContentitemsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsPatchCall { +func (c *ProjectsLocationsLakesEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentitemsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsPatchCall { +func (c *ProjectsLocationsLakesEnvironmentsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentitemsPatchCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -19172,13 +20818,13 @@ func (c *ProjectsLocationsLakesContentitemsPatchCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.contentitems.patch" call. +// Do executes the "dataplex.projects.locations.lakes.environments.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Content.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1Environment.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 *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, error) { +func (c *ProjectsLocationsLakesEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Environment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19197,7 +20843,7 @@ func (c *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Content{ + ret := &GoogleCloudDataplexV1Environment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19210,64 +20856,86 @@ func (c *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsLakesContentitemsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesEnvironmentsGetIamPolicyCall 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 contentitem -// resource. Replaces any existing policy.Caller must have Google IAM -// dataplex.content.setIamPolicy permission on the resource. +// 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. +// - 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 *ProjectsLocationsLakesContentitemsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { - c := &ProjectsLocationsLakesContentitemsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsLakesEnvironmentsService) GetIamPolicy(resource string) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { + c := &ProjectsLocationsLakesEnvironmentsGetIamPolicyCall{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 *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsSetIamPolicyCall { +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}: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 } @@ -19278,13 +20946,13 @@ func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.contentitems.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.environments.getIamPolicy" call. // 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 *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19316,85 +20984,115 @@ func (c *ProjectsLocationsLakesContentitemsSetIamPolicyCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsLakesContentitemsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesEnvironmentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns the caller's permissions on a resource. If the -// resource does not exist, an empty set of permissions is returned (a -// NOT_FOUND error is not returned).A caller is not required to have Google IAM -// permission to make this request.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 environments under the given lake. // -// - 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 *ProjectsLocationsLakesContentitemsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { - c := &ProjectsLocationsLakesContentitemsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The resource name of the parent lake: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesEnvironmentsService) List(parent string) *ProjectsLocationsLakesEnvironmentsListCall { + c := &ProjectsLocationsLakesEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsLakesEnvironmentsListCall) Filter(filter string) *ProjectsLocationsLakesEnvironmentsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsLakesEnvironmentsListCall) OrderBy(orderBy string) *ProjectsLocationsLakesEnvironmentsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// environments to return. The service may return fewer than this value. If +// unspecified, at most 10 environments will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsLakesEnvironmentsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesEnvironmentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListEnvironments call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListEnvironments +// must match the call that provided the page token. +func (c *ProjectsLocationsLakesEnvironmentsListCall) PageToken(pageToken string) *ProjectsLocationsLakesEnvironmentsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { +func (c *ProjectsLocationsLakesEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsTestIamPermissionsCall { +func (c *ProjectsLocationsLakesEnvironmentsListCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesEnvironmentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") 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.lakes.contentitems.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.environments.list" call. // 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 +// *GoogleCloudDataplexV1ListEnvironmentsResponse.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 *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsLakesEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEnvironmentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19413,7 +21111,7 @@ func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudDataplexV1ListEnvironmentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19423,41 +21121,62 @@ func (c *ProjectsLocationsLakesContentitemsTestIamPermissionsCall) Do(opts ...go if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesEnvironmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEnvironmentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -type ProjectsLocationsLakesEnvironmentsCreateCall struct { +type ProjectsLocationsLakesEnvironmentsPatchCall struct { s *Service - parent string + name string googleclouddataplexv1environment *GoogleCloudDataplexV1Environment urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Create an environment resource. +// Patch: Update the environment resource. // -// - parent: The resource name of the parent lake: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesEnvironmentsService) Create(parent string, googleclouddataplexv1environment *GoogleCloudDataplexV1Environment) *ProjectsLocationsLakesEnvironmentsCreateCall { - c := &ProjectsLocationsLakesEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Output only. The relative resource name of the environment, of the +// form: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{ +// environment_id}. +func (r *ProjectsLocationsLakesEnvironmentsService) Patch(name string, googleclouddataplexv1environment *GoogleCloudDataplexV1Environment) *ProjectsLocationsLakesEnvironmentsPatchCall { + c := &ProjectsLocationsLakesEnvironmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1environment = googleclouddataplexv1environment return c } -// EnvironmentId sets the optional parameter "environmentId": Required. -// Environment 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 lake. -func (c *ProjectsLocationsLakesEnvironmentsCreateCall) EnvironmentId(environmentId string) *ProjectsLocationsLakesEnvironmentsCreateCall { - c.urlParams_.Set("environmentId", environmentId) +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesEnvironmentsPatchCall { + 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 *ProjectsLocationsLakesEnvironmentsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesEnvironmentsCreateCall { +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesEnvironmentsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -19465,27 +21184,27 @@ func (c *ProjectsLocationsLakesEnvironmentsCreateCall) ValidateOnly(validateOnly // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsCreateCall { +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsCreateCall { +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1environment) @@ -19494,26 +21213,26 @@ func (c *ProjectsLocationsLakesEnvironmentsCreateCall) doRequest(alt string) (*h } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") + 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.lakes.environments.create" call. +// Do executes the "dataplex.projects.locations.lakes.environments.patch" call. // 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 *ProjectsLocationsLakesEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19545,74 +21264,81 @@ func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsLakesEnvironmentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesEnvironmentsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete the environment resource. All the child resources must have -// been deleted before environment deletion can be initiated. +// 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 environment: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/ -// {environment_id}. -func (r *ProjectsLocationsLakesEnvironmentsService) Delete(name string) *ProjectsLocationsLakesEnvironmentsDeleteCall { - c := &ProjectsLocationsLakesEnvironmentsDeleteCall{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 *ProjectsLocationsLakesEnvironmentsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall { + c := &ProjectsLocationsLakesEnvironmentsSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsDeleteCall { +func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsDeleteCall { +func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.environments.delete" call. +// Do executes the "dataplex.projects.locations.lakes.environments.setIamPolicy" call. // 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 *ProjectsLocationsLakesEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19631,7 +21357,7 @@ func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Do(opts ...googleapi.Call 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, @@ -19644,85 +21370,84 @@ func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsLakesEnvironmentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get environment resource. +// 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. // -// - name: The resource name of the environment: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/ -// {environment_id}. -func (r *ProjectsLocationsLakesEnvironmentsService) Get(name string) *ProjectsLocationsLakesEnvironmentsGetCall { - c := &ProjectsLocationsLakesEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsLakesEnvironmentsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall { + c := &ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsLakesEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsGetCall { +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsGetCall { +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.environments.get" call. +// Do executes the "dataplex.projects.locations.lakes.environments.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Environment.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsLakesEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Environment, error) { +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19741,7 +21466,7 @@ func (c *ProjectsLocationsLakesEnvironmentsGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Environment{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19754,48 +21479,60 @@ func (c *ProjectsLocationsLakesEnvironmentsGetCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsLakesEnvironmentsGetIamPolicyCall struct { +type ProjectsLocationsLakesEnvironmentsSessionsListCall struct { s *Service - resource string + parent 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. +// List: Lists session resources in an environment. // -// - 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 *ProjectsLocationsLakesEnvironmentsService) GetIamPolicy(resource string) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { - c := &ProjectsLocationsLakesEnvironmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the parent environment: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environme +// nt/{environment_id}. +func (r *ProjectsLocationsLakesEnvironmentsSessionsService) List(parent string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { + c := &ProjectsLocationsLakesEnvironmentsSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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 *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Filter sets the optional parameter "filter": Filter request. The following +// mode filter is supported to return only the sessions belonging to the +// requester when the mode is USER and return sessions of all the users when +// the mode is ADMIN. When no filter is sent default to USER mode. NOTE: When +// the mode is ADMIN, the requester should have +// dataplex.environments.listAllSessions permission to list all sessions, in +// absence of the permission, the request fails.mode = ADMIN | USER +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Filter(filter string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of sessions +// to return. The service may return fewer than this value. If unspecified, at +// most 10 sessions will be returned. The maximum value is 1000; values above +// 1000 will be coerced to 1000. +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesEnvironmentsSessionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListSessions call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListSessions must match +// the call that provided the page token. +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19803,27 +21540,27 @@ func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Fields(s ...googlea // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19831,7 +21568,7 @@ func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) doRequest(alt strin 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/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19839,18 +21576,18 @@ func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) doRequest(alt strin } 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.lakes.environments.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.environments.sessions.list" call. // 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 *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1ListSessionsResponse.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 *ProjectsLocationsLakesEnvironmentsSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19869,7 +21606,7 @@ func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1ListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19882,98 +21619,95 @@ func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsLakesEnvironmentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsLakesEnvironmentsSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListSessionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// List: Lists environments under the given lake. +type ProjectsLocationsLakesTasksCreateCall struct { + s *Service + parent string + googleclouddataplexv1task *GoogleCloudDataplexV1Task + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a task resource within a lake. // // - parent: The resource name of the parent lake: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesEnvironmentsService) List(parent string) *ProjectsLocationsLakesEnvironmentsListCall { - c := &ProjectsLocationsLakesEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesTasksService) Create(parent string, googleclouddataplexv1task *GoogleCloudDataplexV1Task) *ProjectsLocationsLakesTasksCreateCall { + c := &ProjectsLocationsLakesTasksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googleclouddataplexv1task = googleclouddataplexv1task return c } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsLakesEnvironmentsListCall) Filter(filter string) *ProjectsLocationsLakesEnvironmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsLakesEnvironmentsListCall) OrderBy(orderBy string) *ProjectsLocationsLakesEnvironmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// environments to return. The service may return fewer than this value. If -// unspecified, at most 10 environments will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesEnvironmentsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesEnvironmentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// TaskId sets the optional parameter "taskId": Required. Task identifier. +func (c *ProjectsLocationsLakesTasksCreateCall) TaskId(taskId string) *ProjectsLocationsLakesTasksCreateCall { + c.urlParams_.Set("taskId", taskId) return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListEnvironments call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListEnvironments -// must match the call that provided the page token. -func (c *ProjectsLocationsLakesEnvironmentsListCall) PageToken(pageToken string) *ProjectsLocationsLakesEnvironmentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesTasksCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesTasksCreateCall { + 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 // details. -func (c *ProjectsLocationsLakesEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsListCall { +func (c *ProjectsLocationsLakesTasksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsListCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsListCall { +func (c *ProjectsLocationsLakesTasksCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesTasksCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1task) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tasks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -19984,13 +21718,13 @@ func (c *ProjectsLocationsLakesEnvironmentsListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.environments.list" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListEnvironmentsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsLakesEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEnvironmentsResponse, error) { +func (c *ProjectsLocationsLakesTasksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20009,7 +21743,7 @@ func (c *ProjectsLocationsLakesEnvironmentsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEnvironmentsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20022,98 +21756,56 @@ func (c *ProjectsLocationsLakesEnvironmentsListCall) Do(opts ...googleapi.CallOp return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsLakesEnvironmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEnvironmentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsLakesEnvironmentsPatchCall struct { - s *Service - name string - googleclouddataplexv1environment *GoogleCloudDataplexV1Environment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTasksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Update the environment resource. +// Delete: Delete the task resource. // -// - name: Output only. The relative resource name of the environment, of the -// form: -// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{ -// environment_id}. -func (r *ProjectsLocationsLakesEnvironmentsService) Patch(name string, googleclouddataplexv1environment *GoogleCloudDataplexV1Environment) *ProjectsLocationsLakesEnvironmentsPatchCall { - c := &ProjectsLocationsLakesEnvironmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the task: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{tas +// k_id}. +func (r *ProjectsLocationsLakesTasksService) Delete(name string) *ProjectsLocationsLakesTasksDeleteCall { + c := &ProjectsLocationsLakesTasksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1environment = googleclouddataplexv1environment - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsLakesEnvironmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesEnvironmentsPatchCall { - 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 *ProjectsLocationsLakesEnvironmentsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesEnvironmentsPatchCall { - 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 // details. -func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsPatchCall { +func (c *ProjectsLocationsLakesTasksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsPatchCall { +func (c *ProjectsLocationsLakesTasksDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsLakesTasksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1environment) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -20124,13 +21816,13 @@ func (c *ProjectsLocationsLakesEnvironmentsPatchCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.environments.patch" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.delete" call. // 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 *ProjectsLocationsLakesEnvironmentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesTasksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20162,81 +21854,85 @@ func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsLakesEnvironmentsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTasksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. +// Get: Get task resource. // -// - 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 *ProjectsLocationsLakesEnvironmentsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall { - c := &ProjectsLocationsLakesEnvironmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The resource name of the task: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{ta +// sks_id}. +func (r *ProjectsLocationsLakesTasksService) Get(name string) *ProjectsLocationsLakesTasksGetCall { + c := &ProjectsLocationsLakesTasksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall { +func (c *ProjectsLocationsLakesTasksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesTasksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall { +func (c *ProjectsLocationsLakesTasksGetCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesTasksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.environments.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.get" call. // 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 *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1Task.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 *ProjectsLocationsLakesTasksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Task, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20255,7 +21951,7 @@ func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Task{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20268,67 +21964,86 @@ func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTasksGetIamPolicyCall struct { + s *Service + resource 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. +// 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 detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsLakesEnvironmentsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall { - c := &ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsLakesTasksService) GetIamPolicy(resource string) *ProjectsLocationsLakesTasksGetIamPolicyCall { + c := &ProjectsLocationsLakesTasksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsLakesTasksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesTasksGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall { +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall { +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:testIamPermissions") + 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 } @@ -20339,13 +22054,13 @@ func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.environments.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.getIamPolicy" call. // 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 *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *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 *ProjectsLocationsLakesTasksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20364,7 +22079,7 @@ func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20377,7 +22092,7 @@ func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Do(opts ...go return ret, nil } -type ProjectsLocationsLakesEnvironmentsSessionsListCall struct { +type ProjectsLocationsLakesTasksListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -20386,43 +22101,43 @@ type ProjectsLocationsLakesEnvironmentsSessionsListCall struct { header_ http.Header } -// List: Lists session resources in an environment. +// List: Lists tasks under the given lake. // -// - parent: The resource name of the parent environment: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environme -// nt/{environment_id}. -func (r *ProjectsLocationsLakesEnvironmentsSessionsService) List(parent string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { - c := &ProjectsLocationsLakesEnvironmentsSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent lake: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesTasksService) List(parent string) *ProjectsLocationsLakesTasksListCall { + c := &ProjectsLocationsLakesTasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. The following -// mode filter is supported to return only the sessions belonging to the -// requester when the mode is USER and return sessions of all the users when -// the mode is ADMIN. When no filter is sent default to USER mode. NOTE: When -// the mode is ADMIN, the requester should have -// dataplex.environments.listAllSessions permission to list all sessions, in -// absence of the permission, the request fails.mode = ADMIN | USER -func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Filter(filter string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsLakesTasksListCall) Filter(filter string) *ProjectsLocationsLakesTasksListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of sessions -// to return. The service may return fewer than this value. If unspecified, at -// most 10 sessions will be returned. The maximum value is 1000; values above -// 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesEnvironmentsSessionsListCall { +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsLakesTasksListCall) OrderBy(orderBy string) *ProjectsLocationsLakesTasksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of tasks to +// return. The service may return fewer than this value. If unspecified, at +// most 10 tasks will be returned. The maximum value is 1000; values above 1000 +// will be coerced to 1000. +func (c *ProjectsLocationsLakesTasksListCall) PageSize(pageSize int64) *ProjectsLocationsLakesTasksListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListSessions call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListSessions must match -// the call that provided the page token. -func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { +// a previous ListZones call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListZones must match the +// call that provided the page token. +func (c *ProjectsLocationsLakesTasksListCall) PageToken(pageToken string) *ProjectsLocationsLakesTasksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20430,7 +22145,7 @@ func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsSessionsListCall { +func (c *ProjectsLocationsLakesTasksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20438,27 +22153,27 @@ func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Fields(s ...googlea // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { +func (c *ProjectsLocationsLakesTasksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsSessionsListCall { +func (c *ProjectsLocationsLakesTasksListCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesTasksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20466,7 +22181,7 @@ func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) doRequest(alt strin var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tasks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20479,13 +22194,13 @@ func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.environments.sessions.list" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListSessionsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListTasksResponse.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 *ProjectsLocationsLakesEnvironmentsSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListSessionsResponse, error) { +func (c *ProjectsLocationsLakesTasksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListTasksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20504,7 +22219,7 @@ func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListSessionsResponse{ + ret := &GoogleCloudDataplexV1ListTasksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20520,7 +22235,7 @@ func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Do(opts ...googleap // 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 *ProjectsLocationsLakesEnvironmentsSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListSessionsResponse) error) error { +func (c *ProjectsLocationsLakesTasksListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListTasksResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20538,35 +22253,37 @@ func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Pages(ctx context.C } } -type ProjectsLocationsLakesTasksCreateCall struct { +type ProjectsLocationsLakesTasksPatchCall struct { s *Service - parent string + name string googleclouddataplexv1task *GoogleCloudDataplexV1Task urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a task resource within a lake. +// Patch: Update the task resource. // -// - parent: The resource name of the parent lake: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesTasksService) Create(parent string, googleclouddataplexv1task *GoogleCloudDataplexV1Task) *ProjectsLocationsLakesTasksCreateCall { - c := &ProjectsLocationsLakesTasksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Output only. The relative resource name of the task, of the form: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ +// tasks/{task_id}. +func (r *ProjectsLocationsLakesTasksService) Patch(name string, googleclouddataplexv1task *GoogleCloudDataplexV1Task) *ProjectsLocationsLakesTasksPatchCall { + c := &ProjectsLocationsLakesTasksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1task = googleclouddataplexv1task return c } -// TaskId sets the optional parameter "taskId": Required. Task identifier. -func (c *ProjectsLocationsLakesTasksCreateCall) TaskId(taskId string) *ProjectsLocationsLakesTasksCreateCall { - c.urlParams_.Set("taskId", taskId) +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsLakesTasksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesTasksPatchCall { + 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 *ProjectsLocationsLakesTasksCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesTasksCreateCall { +func (c *ProjectsLocationsLakesTasksPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesTasksPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -20574,27 +22291,27 @@ func (c *ProjectsLocationsLakesTasksCreateCall) ValidateOnly(validateOnly bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesTasksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksCreateCall { +func (c *ProjectsLocationsLakesTasksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksCreateCall { +func (c *ProjectsLocationsLakesTasksPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesTasksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1task) @@ -20603,26 +22320,26 @@ func (c *ProjectsLocationsLakesTasksCreateCall) doRequest(alt string) (*http.Res } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tasks") + 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.lakes.tasks.create" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.patch" call. // 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 *ProjectsLocationsLakesTasksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesTasksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20654,56 +22371,62 @@ func (c *ProjectsLocationsLakesTasksCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsLakesTasksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTasksRunCall struct { + s *Service + name string + googleclouddataplexv1runtaskrequest *GoogleCloudDataplexV1RunTaskRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete the task resource. +// Run: Run an on demand execution of a Task. // // - name: The resource name of the task: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{tas -// k_id}. -func (r *ProjectsLocationsLakesTasksService) Delete(name string) *ProjectsLocationsLakesTasksDeleteCall { - c := &ProjectsLocationsLakesTasksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{ta +// sk_id}. +func (r *ProjectsLocationsLakesTasksService) Run(name string, googleclouddataplexv1runtaskrequest *GoogleCloudDataplexV1RunTaskRequest) *ProjectsLocationsLakesTasksRunCall { + c := &ProjectsLocationsLakesTasksRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddataplexv1runtaskrequest = googleclouddataplexv1runtaskrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesTasksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksDeleteCall { +func (c *ProjectsLocationsLakesTasksRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksRunCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksDeleteCall { +func (c *ProjectsLocationsLakesTasksRunCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksRunCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksRunCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsLakesTasksRunCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1runtaskrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -20714,13 +22437,13 @@ func (c *ProjectsLocationsLakesTasksDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.tasks.delete" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.run" call. // 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 +// *GoogleCloudDataplexV1RunTaskResponse.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 *ProjectsLocationsLakesTasksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesTasksRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunTaskResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20739,7 +22462,7 @@ func (c *ProjectsLocationsLakesTasksDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1RunTaskResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20752,85 +22475,81 @@ func (c *ProjectsLocationsLakesTasksDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsLakesTasksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTasksSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get task 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 task: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{ta -// sks_id}. -func (r *ProjectsLocationsLakesTasksService) Get(name string) *ProjectsLocationsLakesTasksGetCall { - c := &ProjectsLocationsLakesTasksGetCall{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 *ProjectsLocationsLakesTasksService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesTasksSetIamPolicyCall { + c := &ProjectsLocationsLakesTasksSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsLakesTasksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksGetCall { +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesTasksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksGetCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksGetCall { +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.tasks.get" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Task.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 *ProjectsLocationsLakesTasksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Task, error) { +// *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 *ProjectsLocationsLakesTasksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20849,7 +22568,7 @@ func (c *ProjectsLocationsLakesTasksGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Task{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20862,86 +22581,67 @@ func (c *ProjectsLocationsLakesTasksGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsLakesTasksGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTasksTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + 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. +// 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 is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsLakesTasksService) GetIamPolicy(resource string) *ProjectsLocationsLakesTasksGetIamPolicyCall { - c := &ProjectsLocationsLakesTasksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsLakesTasksService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesTasksTestIamPermissionsCall { + c := &ProjectsLocationsLakesTasksTestIamPermissionsCall{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 *ProjectsLocationsLakesTasksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesTasksGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + 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 // details. -func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksGetIamPolicyCall { +func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksGetIamPolicyCall { +func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } 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/{+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 } @@ -20952,13 +22652,13 @@ func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.tasks.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.testIamPermissions" call. // 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 *ProjectsLocationsLakesTasksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsLakesTasksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20977,7 +22677,7 @@ func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20990,115 +22690,78 @@ func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsLakesTasksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists tasks under the given lake. -// -// - parent: The resource name of the parent lake: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesTasksService) List(parent string) *ProjectsLocationsLakesTasksListCall { - c := &ProjectsLocationsLakesTasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsLakesTasksListCall) Filter(filter string) *ProjectsLocationsLakesTasksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsLakesTasksListCall) OrderBy(orderBy string) *ProjectsLocationsLakesTasksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of tasks to -// return. The service may return fewer than this value. If unspecified, at -// most 10 tasks will be returned. The maximum value is 1000; values above 1000 -// will be coerced to 1000. -func (c *ProjectsLocationsLakesTasksListCall) PageSize(pageSize int64) *ProjectsLocationsLakesTasksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsLakesTasksJobsCancelCall struct { + s *Service + name string + googleclouddataplexv1canceljobrequest *GoogleCloudDataplexV1CancelJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListZones call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListZones must match the -// call that provided the page token. -func (c *ProjectsLocationsLakesTasksListCall) PageToken(pageToken string) *ProjectsLocationsLakesTasksListCall { - c.urlParams_.Set("pageToken", pageToken) +// Cancel: Cancel jobs running for the task resource. +// +// - name: The resource name of the job: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{tas +// k_id}/job/{job_id}. +func (r *ProjectsLocationsLakesTasksJobsService) Cancel(name string, googleclouddataplexv1canceljobrequest *GoogleCloudDataplexV1CancelJobRequest) *ProjectsLocationsLakesTasksJobsCancelCall { + c := &ProjectsLocationsLakesTasksJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1canceljobrequest = googleclouddataplexv1canceljobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesTasksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksListCall { +func (c *ProjectsLocationsLakesTasksJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesTasksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksListCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksListCall { +func (c *ProjectsLocationsLakesTasksJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksListCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesTasksJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1canceljobrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tasks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.tasks.list" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.jobs.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListTasksResponse.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 *ProjectsLocationsLakesTasksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListTasksResponse, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesTasksJobsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21117,7 +22780,7 @@ func (c *ProjectsLocationsLakesTasksListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListTasksResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21130,97 +22793,68 @@ func (c *ProjectsLocationsLakesTasksListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsLakesTasksListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListTasksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsLakesTasksPatchCall struct { - s *Service - name string - googleclouddataplexv1task *GoogleCloudDataplexV1Task - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTasksJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Update the task resource. +// Get: Get job resource. // -// - name: Output only. The relative resource name of the task, of the form: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ -// tasks/{task_id}. -func (r *ProjectsLocationsLakesTasksService) Patch(name string, googleclouddataplexv1task *GoogleCloudDataplexV1Task) *ProjectsLocationsLakesTasksPatchCall { - c := &ProjectsLocationsLakesTasksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the job: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{ta +// sk_id}/jobs/{job_id}. +func (r *ProjectsLocationsLakesTasksJobsService) Get(name string) *ProjectsLocationsLakesTasksJobsGetCall { + c := &ProjectsLocationsLakesTasksJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1task = googleclouddataplexv1task - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsLakesTasksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesTasksPatchCall { - 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 *ProjectsLocationsLakesTasksPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesTasksPatchCall { - 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 // details. -func (c *ProjectsLocationsLakesTasksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksPatchCall { +func (c *ProjectsLocationsLakesTasksJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesTasksJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksPatchCall { +func (c *ProjectsLocationsLakesTasksJobsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksPatchCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1task) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesTasksJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -21231,13 +22865,13 @@ func (c *ProjectsLocationsLakesTasksPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.tasks.patch" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.jobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Job.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 *ProjectsLocationsLakesTasksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesTasksJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Job, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21256,7 +22890,7 @@ func (c *ProjectsLocationsLakesTasksPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1Job{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21269,79 +22903,103 @@ func (c *ProjectsLocationsLakesTasksPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsLakesTasksRunCall struct { - s *Service - name string - googleclouddataplexv1runtaskrequest *GoogleCloudDataplexV1RunTaskRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesTasksJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Run: Run an on demand execution of a Task. +// List: Lists Jobs under the given task. // -// - name: The resource name of the task: +// - parent: The resource name of the parent environment: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{ta // sk_id}. -func (r *ProjectsLocationsLakesTasksService) Run(name string, googleclouddataplexv1runtaskrequest *GoogleCloudDataplexV1RunTaskRequest) *ProjectsLocationsLakesTasksRunCall { - c := &ProjectsLocationsLakesTasksRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1runtaskrequest = googleclouddataplexv1runtaskrequest +func (r *ProjectsLocationsLakesTasksJobsService) List(parent string) *ProjectsLocationsLakesTasksJobsListCall { + c := &ProjectsLocationsLakesTasksJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of jobs to +// return. The service may return fewer than this value. If unspecified, at +// most 10 jobs will be returned. The maximum value is 1000; values above 1000 +// will be coerced to 1000. +func (c *ProjectsLocationsLakesTasksJobsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesTasksJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListJobs call. Provide this to retrieve the subsequent page. When +// paginating, all other parameters provided to ListJobs must match the call +// that provided the page token. +func (c *ProjectsLocationsLakesTasksJobsListCall) PageToken(pageToken string) *ProjectsLocationsLakesTasksJobsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesTasksRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksRunCall { +func (c *ProjectsLocationsLakesTasksJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesTasksJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksRunCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksRunCall { +func (c *ProjectsLocationsLakesTasksJobsListCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksRunCall) Header() http.Header { +func (c *ProjectsLocationsLakesTasksJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksRunCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1runtaskrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesTasksJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:run") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.tasks.run" call. +// Do executes the "dataplex.projects.locations.lakes.tasks.jobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1RunTaskResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListJobsResponse.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 *ProjectsLocationsLakesTasksRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunTaskResponse, error) { +func (c *ProjectsLocationsLakesTasksJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21360,7 +23018,7 @@ func (c *ProjectsLocationsLakesTasksRunCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1RunTaskResponse{ + ret := &GoogleCloudDataplexV1ListJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21370,65 +23028,102 @@ func (c *ProjectsLocationsLakesTasksRunCall) Do(opts ...googleapi.CallOption) (* if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesTasksJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -type ProjectsLocationsLakesTasksSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesCreateCall struct { + s *Service + parent string + googleclouddataplexv1zone *GoogleCloudDataplexV1Zone + 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 a zone resource within a lake. // -// - 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 *ProjectsLocationsLakesTasksService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesTasksSetIamPolicyCall { - c := &ProjectsLocationsLakesTasksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - parent: The resource name of the parent lake: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesZonesService) Create(parent string, googleclouddataplexv1zone *GoogleCloudDataplexV1Zone) *ProjectsLocationsLakesZonesCreateCall { + c := &ProjectsLocationsLakesZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1zone = googleclouddataplexv1zone + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesZonesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// ZoneId sets the optional parameter "zoneId": Required. Zone identifier. This +// ID will be used to generate names such as database and dataset names when +// publishing metadata to Hive Metastore and BigQuery. * 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 across all lakes from all locations in a project. * Must not be one +// of the reserved IDs (i.e. "default", "global-temp") +func (c *ProjectsLocationsLakesZonesCreateCall) ZoneId(zoneId string) *ProjectsLocationsLakesZonesCreateCall { + c.urlParams_.Set("zoneId", zoneId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksSetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksSetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1zone) if err != nil { return nil, err } 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}/zones") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21436,18 +23131,18 @@ func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) doRequest(alt string) (*ht } 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.lakes.tasks.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.zones.create" call. // 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 *ProjectsLocationsLakesTasksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsLakesZonesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21466,7 +23161,7 @@ func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) 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, @@ -21479,84 +23174,74 @@ func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsLakesTasksTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesDeleteCall struct { + s *Service + name string + 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. +// Delete: Deletes a zone resource. All assets within a zone must be deleted +// before the zone can be deleted. // -// - 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 *ProjectsLocationsLakesTasksService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesTasksTestIamPermissionsCall { - c := &ProjectsLocationsLakesTasksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: The resource name of the zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}. +func (r *ProjectsLocationsLakesZonesService) Delete(name string) *ProjectsLocationsLakesZonesDeleteCall { + c := &ProjectsLocationsLakesZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksTestIamPermissionsCall { +func (c *ProjectsLocationsLakesZonesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksTestIamPermissionsCall { +func (c *ProjectsLocationsLakesZonesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsLakesZonesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } 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.lakes.tasks.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.zones.delete" call. // 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 +// *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 *ProjectsLocationsLakesTasksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsLakesZonesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21575,7 +23260,7 @@ func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) 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, @@ -21588,62 +23273,68 @@ func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsLakesTasksJobsCancelCall struct { - s *Service - name string - googleclouddataplexv1canceljobrequest *GoogleCloudDataplexV1CancelJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Cancel jobs running for the task resource. +// Get: Retrieves a zone resource. // -// - name: The resource name of the job: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{tas -// k_id}/job/{job_id}. -func (r *ProjectsLocationsLakesTasksJobsService) Cancel(name string, googleclouddataplexv1canceljobrequest *GoogleCloudDataplexV1CancelJobRequest) *ProjectsLocationsLakesTasksJobsCancelCall { - c := &ProjectsLocationsLakesTasksJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}. +func (r *ProjectsLocationsLakesZonesService) Get(name string) *ProjectsLocationsLakesZonesGetCall { + c := &ProjectsLocationsLakesZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1canceljobrequest = googleclouddataplexv1canceljobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesTasksJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsCancelCall { +func (c *ProjectsLocationsLakesZonesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesZonesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsCancelCall { +func (c *ProjectsLocationsLakesZonesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1canceljobrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesZonesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -21654,12 +23345,13 @@ func (c *ProjectsLocationsLakesTasksJobsCancelCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.tasks.jobs.cancel" call. +// Do executes the "dataplex.projects.locations.lakes.zones.get" call. // 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 *ProjectsLocationsLakesTasksJobsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *GoogleCloudDataplexV1Zone.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 *ProjectsLocationsLakesZonesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Zone, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21678,7 +23370,7 @@ func (c *ProjectsLocationsLakesTasksJobsCancelCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleCloudDataplexV1Zone{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21691,30 +23383,48 @@ func (c *ProjectsLocationsLakesTasksJobsCancelCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsLakesTasksJobsGetCall struct { +type ProjectsLocationsLakesZonesGetIamPolicyCall struct { s *Service - name string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Get job resource. +// 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 job: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{ta -// sk_id}/jobs/{job_id}. -func (r *ProjectsLocationsLakesTasksJobsService) Get(name string) *ProjectsLocationsLakesTasksJobsGetCall { - c := &ProjectsLocationsLakesTasksJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsLakesZonesService) GetIamPolicy(resource string) *ProjectsLocationsLakesZonesGetIamPolicyCall { + c := &ProjectsLocationsLakesZonesGetIamPolicyCall{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 *ProjectsLocationsLakesZonesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesZonesGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsLakesTasksJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsGetCall { +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21722,27 +23432,27 @@ func (c *ProjectsLocationsLakesTasksJobsGetCall) Fields(s ...googleapi.Field) *P // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesTasksJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksJobsGetCall { +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksJobsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsGetCall { +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21750,7 +23460,7 @@ func (c *ProjectsLocationsLakesTasksJobsGetCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21758,18 +23468,18 @@ func (c *ProjectsLocationsLakesTasksJobsGetCall) doRequest(alt string) (*http.Re } 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.lakes.tasks.jobs.get" call. +// Do executes the "dataplex.projects.locations.lakes.zones.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Job.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 *ProjectsLocationsLakesTasksJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Job, error) { +// *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 *ProjectsLocationsLakesZonesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21788,7 +23498,7 @@ func (c *ProjectsLocationsLakesTasksJobsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Job{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21801,7 +23511,7 @@ func (c *ProjectsLocationsLakesTasksJobsGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsLakesTasksJobsListCall struct { +type ProjectsLocationsLakesZonesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -21810,31 +23520,43 @@ type ProjectsLocationsLakesTasksJobsListCall struct { header_ http.Header } -// List: Lists Jobs under the given task. +// List: Lists zone resources in a lake. // -// - parent: The resource name of the parent environment: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{ta -// sk_id}. -func (r *ProjectsLocationsLakesTasksJobsService) List(parent string) *ProjectsLocationsLakesTasksJobsListCall { - c := &ProjectsLocationsLakesTasksJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent lake: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. +func (r *ProjectsLocationsLakesZonesService) List(parent string) *ProjectsLocationsLakesZonesListCall { + c := &ProjectsLocationsLakesZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of jobs to +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsLakesZonesListCall) Filter(filter string) *ProjectsLocationsLakesZonesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsLakesZonesListCall) OrderBy(orderBy string) *ProjectsLocationsLakesZonesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of zones to // return. The service may return fewer than this value. If unspecified, at -// most 10 jobs will be returned. The maximum value is 1000; values above 1000 +// most 10 zones will be returned. The maximum value is 1000; values above 1000 // will be coerced to 1000. -func (c *ProjectsLocationsLakesTasksJobsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesTasksJobsListCall { +func (c *ProjectsLocationsLakesZonesListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListJobs call. Provide this to retrieve the subsequent page. When -// paginating, all other parameters provided to ListJobs must match the call -// that provided the page token. -func (c *ProjectsLocationsLakesTasksJobsListCall) PageToken(pageToken string) *ProjectsLocationsLakesTasksJobsListCall { +// a previous ListZones call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListZones must match the +// call that provided the page token. +func (c *ProjectsLocationsLakesZonesListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21842,7 +23564,7 @@ func (c *ProjectsLocationsLakesTasksJobsListCall) PageToken(pageToken string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesTasksJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsListCall { +func (c *ProjectsLocationsLakesZonesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21850,27 +23572,27 @@ func (c *ProjectsLocationsLakesTasksJobsListCall) Fields(s ...googleapi.Field) * // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesTasksJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksJobsListCall { +func (c *ProjectsLocationsLakesZonesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesTasksJobsListCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsListCall { +func (c *ProjectsLocationsLakesZonesListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesTasksJobsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesTasksJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21878,7 +23600,7 @@ func (c *ProjectsLocationsLakesTasksJobsListCall) 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}/jobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/zones") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21891,13 +23613,13 @@ func (c *ProjectsLocationsLakesTasksJobsListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.tasks.jobs.list" call. +// Do executes the "dataplex.projects.locations.lakes.zones.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListJobsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListZonesResponse.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 *ProjectsLocationsLakesTasksJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListJobsResponse, error) { +func (c *ProjectsLocationsLakesZonesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListZonesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21916,7 +23638,7 @@ func (c *ProjectsLocationsLakesTasksJobsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListJobsResponse{ + ret := &GoogleCloudDataplexV1ListZonesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21932,7 +23654,7 @@ func (c *ProjectsLocationsLakesTasksJobsListCall) 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 *ProjectsLocationsLakesTasksJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListJobsResponse) error) error { +func (c *ProjectsLocationsLakesZonesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListZonesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -21950,69 +23672,65 @@ func (c *ProjectsLocationsLakesTasksJobsListCall) Pages(ctx context.Context, f f } } -type ProjectsLocationsLakesZonesCreateCall struct { +type ProjectsLocationsLakesZonesPatchCall struct { s *Service - parent string + name string googleclouddataplexv1zone *GoogleCloudDataplexV1Zone urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a zone resource within a lake. +// Patch: Updates a zone resource. // -// - parent: The resource name of the parent lake: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesZonesService) Create(parent string, googleclouddataplexv1zone *GoogleCloudDataplexV1Zone) *ProjectsLocationsLakesZonesCreateCall { - c := &ProjectsLocationsLakesZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Output only. The relative resource name of the zone, of the form: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}. +func (r *ProjectsLocationsLakesZonesService) Patch(name string, googleclouddataplexv1zone *GoogleCloudDataplexV1Zone) *ProjectsLocationsLakesZonesPatchCall { + c := &ProjectsLocationsLakesZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1zone = googleclouddataplexv1zone return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsLakesZonesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsLakesZonesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesZonesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } -// ZoneId sets the optional parameter "zoneId": Required. Zone identifier. This -// ID will be used to generate names such as database and dataset names when -// publishing metadata to Hive Metastore and BigQuery. * 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 across all lakes from all locations in a project. * Must not be one -// of the reserved IDs (i.e. "default", "global-temp") -func (c *ProjectsLocationsLakesZonesCreateCall) ZoneId(zoneId string) *ProjectsLocationsLakesZonesCreateCall { - c.urlParams_.Set("zoneId", zoneId) +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesZonesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesPatchCall { + 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 // details. -func (c *ProjectsLocationsLakesZonesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesCreateCall { +func (c *ProjectsLocationsLakesZonesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesCreateCall { +func (c *ProjectsLocationsLakesZonesPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1zone) @@ -22021,26 +23739,26 @@ func (c *ProjectsLocationsLakesZonesCreateCall) doRequest(alt string) (*http.Res } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/zones") + 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.lakes.zones.create" call. +// Do executes the "dataplex.projects.locations.lakes.zones.patch" call. // 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 *ProjectsLocationsLakesZonesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesZonesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22072,74 +23790,81 @@ func (c *ProjectsLocationsLakesZonesCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsLakesZonesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a zone resource. All assets within a zone must be deleted -// before the zone can be deleted. +// 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 zone: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}. -func (r *ProjectsLocationsLakesZonesService) Delete(name string) *ProjectsLocationsLakesZonesDeleteCall { - c := &ProjectsLocationsLakesZonesDeleteCall{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 *ProjectsLocationsLakesZonesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesZonesSetIamPolicyCall { + c := &ProjectsLocationsLakesZonesSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsLakesZonesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesDeleteCall { +func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesDeleteCall { +func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.zones.delete" call. +// Do executes the "dataplex.projects.locations.lakes.zones.setIamPolicy" call. // 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 *ProjectsLocationsLakesZonesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsLakesZonesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22158,7 +23883,7 @@ func (c *ProjectsLocationsLakesZonesDeleteCall) 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, @@ -22171,85 +23896,84 @@ func (c *ProjectsLocationsLakesZonesDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsLakesZonesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a zone resource. +// 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. // -// - name: The resource name of the zone: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}. -func (r *ProjectsLocationsLakesZonesService) Get(name string) *ProjectsLocationsLakesZonesGetCall { - c := &ProjectsLocationsLakesZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsLakesZonesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesZonesTestIamPermissionsCall { + c := &ProjectsLocationsLakesZonesTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsLakesZonesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesGetCall { +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesGetCall { +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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.lakes.zones.get" call. +// Do executes the "dataplex.projects.locations.lakes.zones.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Zone.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsLakesZonesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Zone, error) { +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22268,7 +23992,7 @@ func (c *ProjectsLocationsLakesZonesGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Zone{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22281,48 +24005,48 @@ func (c *ProjectsLocationsLakesZonesGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsLakesZonesGetIamPolicyCall struct { +type ProjectsLocationsLakesZonesActionsListCall struct { s *Service - resource string + parent 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. +// List: Lists action resources in a zone. // -// - 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 *ProjectsLocationsLakesZonesService) GetIamPolicy(resource string) *ProjectsLocationsLakesZonesGetIamPolicyCall { - c := &ProjectsLocationsLakesZonesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the parent zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}. +func (r *ProjectsLocationsLakesZonesActionsService) List(parent string) *ProjectsLocationsLakesZonesActionsListCall { + c := &ProjectsLocationsLakesZonesActionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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 *ProjectsLocationsLakesZonesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesZonesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// PageSize sets the optional parameter "pageSize": Maximum number of actions +// to return. The service may return fewer than this value. If unspecified, at +// most 10 actions will be returned. The maximum value is 1000; values above +// 1000 will be coerced to 1000. +func (c *ProjectsLocationsLakesZonesActionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesActionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListZoneActions call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListZoneActions must +// match the call that provided the page token. +func (c *ProjectsLocationsLakesZonesActionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesActionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesGetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesActionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22330,27 +24054,27 @@ func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesGetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesActionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesGetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesActionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesActionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesActionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22358,7 +24082,7 @@ func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) doRequest(alt string) (*ht 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/{+parent}/actions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22366,18 +24090,18 @@ func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) doRequest(alt string) (*ht } 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.lakes.zones.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.zones.actions.list" call. // 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 *ProjectsLocationsLakesZonesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1ListActionsResponse.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 *ProjectsLocationsLakesZonesActionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListActionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22396,7 +24120,7 @@ func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1ListActionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22409,98 +24133,101 @@ func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsLakesZonesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists zone resources in a lake. -// -// - parent: The resource name of the parent lake: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}. -func (r *ProjectsLocationsLakesZonesService) List(parent string) *ProjectsLocationsLakesZonesListCall { - c := &ProjectsLocationsLakesZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - 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 *ProjectsLocationsLakesZonesActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsLakesZonesListCall) Filter(filter string) *ProjectsLocationsLakesZonesListCall { - c.urlParams_.Set("filter", filter) - return c +type ProjectsLocationsLakesZonesAssetsCreateCall struct { + s *Service + parent string + googleclouddataplexv1asset *GoogleCloudDataplexV1Asset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsLakesZonesListCall) OrderBy(orderBy string) *ProjectsLocationsLakesZonesListCall { - c.urlParams_.Set("orderBy", orderBy) +// Create: Creates an asset resource. +// +// - parent: The resource name of the parent zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}. +func (r *ProjectsLocationsLakesZonesAssetsService) Create(parent string, googleclouddataplexv1asset *GoogleCloudDataplexV1Asset) *ProjectsLocationsLakesZonesAssetsCreateCall { + c := &ProjectsLocationsLakesZonesAssetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1asset = googleclouddataplexv1asset return c } -// PageSize sets the optional parameter "pageSize": Maximum number of zones to -// return. The service may return fewer than this value. If unspecified, at -// most 10 zones will be returned. The maximum value is 1000; values above 1000 -// will be coerced to 1000. -func (c *ProjectsLocationsLakesZonesListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// AssetId sets the optional parameter "assetId": Required. Asset identifier. +// This ID will be used to generate names such as table names when publishing +// metadata to Hive Metastore and BigQuery. * 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 zone. +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) AssetId(assetId string) *ProjectsLocationsLakesZonesAssetsCreateCall { + c.urlParams_.Set("assetId", assetId) return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListZones call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListZones must match the -// call that provided the page token. -func (c *ProjectsLocationsLakesZonesListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesListCall { - c.urlParams_.Set("pageToken", pageToken) +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesAssetsCreateCall { + 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 // details. -func (c *ProjectsLocationsLakesZonesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesListCall { +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesListCall { +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesListCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1asset) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/zones") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -22511,13 +24238,13 @@ func (c *ProjectsLocationsLakesZonesListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.list" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListZonesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsLakesZonesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListZonesResponse, error) { +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22536,7 +24263,7 @@ func (c *ProjectsLocationsLakesZonesListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListZonesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22548,98 +24275,58 @@ func (c *ProjectsLocationsLakesZonesListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil } - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsLakesZonesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListZonesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsLakesZonesPatchCall struct { - s *Service - name string - googleclouddataplexv1zone *GoogleCloudDataplexV1Zone - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + +type ProjectsLocationsLakesZonesAssetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a zone resource. +// Delete: Deletes an asset resource. The referenced storage resource is +// detached (default) or deleted based on the associated Lifecycle policy. // -// - name: Output only. The relative resource name of the zone, of the form: +// - name: The resource name of the asset: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}. -func (r *ProjectsLocationsLakesZonesService) Patch(name string, googleclouddataplexv1zone *GoogleCloudDataplexV1Zone) *ProjectsLocationsLakesZonesPatchCall { - c := &ProjectsLocationsLakesZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ne_id}/assets/{asset_id}. +func (r *ProjectsLocationsLakesZonesAssetsService) Delete(name string) *ProjectsLocationsLakesZonesAssetsDeleteCall { + c := &ProjectsLocationsLakesZonesAssetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1zone = googleclouddataplexv1zone - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsLakesZonesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesZonesPatchCall { - 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 *ProjectsLocationsLakesZonesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesPatchCall { - 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 // details. -func (c *ProjectsLocationsLakesZonesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesPatchCall { +func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesPatchCall { +func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesPatchCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1zone) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -22650,13 +24337,13 @@ func (c *ProjectsLocationsLakesZonesPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.patch" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.delete" call. // 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 *ProjectsLocationsLakesZonesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22688,81 +24375,85 @@ func (c *ProjectsLocationsLakesZonesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsLakesZonesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesAssetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. +// Get: Retrieves an asset resource. // -// - 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 *ProjectsLocationsLakesZonesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesZonesSetIamPolicyCall { - c := &ProjectsLocationsLakesZonesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The resource name of the asset: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}/assets/{asset_id}. +func (r *ProjectsLocationsLakesZonesAssetsService) Get(name string) *ProjectsLocationsLakesZonesAssetsGetCall { + c := &ProjectsLocationsLakesZonesAssetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesSetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesAssetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesZonesAssetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesSetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesAssetsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesZonesAssetsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.get" call. // 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 *ProjectsLocationsLakesZonesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1Asset.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 *ProjectsLocationsLakesZonesAssetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Asset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22781,7 +24472,7 @@ func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Asset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22794,67 +24485,86 @@ func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsLakesZonesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesAssetsGetIamPolicyCall struct { + s *Service + resource 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. +// 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 detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsLakesZonesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesZonesTestIamPermissionsCall { - c := &ProjectsLocationsLakesZonesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsLakesZonesAssetsService) GetIamPolicy(resource string) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { + c := &ProjectsLocationsLakesZonesAssetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesTestIamPermissionsCall { +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesTestIamPermissionsCall { +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:testIamPermissions") + 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 } @@ -22865,13 +24575,13 @@ func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.getIamPolicy" call. // 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 *ProjectsLocationsLakesZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *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 *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22890,7 +24600,7 @@ func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22903,7 +24613,7 @@ func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsLakesZonesActionsListCall struct { +type ProjectsLocationsLakesZonesAssetsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -22912,31 +24622,44 @@ type ProjectsLocationsLakesZonesActionsListCall struct { header_ http.Header } -// List: Lists action resources in a zone. +// List: Lists asset resources in a zone. // // - parent: The resource name of the parent zone: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo // ne_id}. -func (r *ProjectsLocationsLakesZonesActionsService) List(parent string) *ProjectsLocationsLakesZonesActionsListCall { - c := &ProjectsLocationsLakesZonesActionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsLakesZonesAssetsService) List(parent string) *ProjectsLocationsLakesZonesAssetsListCall { + c := &ProjectsLocationsLakesZonesAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of actions -// to return. The service may return fewer than this value. If unspecified, at -// most 10 actions will be returned. The maximum value is 1000; values above +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsLakesZonesAssetsListCall) Filter(filter string) *ProjectsLocationsLakesZonesAssetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsLakesZonesAssetsListCall) OrderBy(orderBy string) *ProjectsLocationsLakesZonesAssetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of asset to +// return. The service may return fewer than this value. If unspecified, at +// most 10 assets will be returned. The maximum value is 1000; values above // 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesZonesActionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesActionsListCall { +func (c *ProjectsLocationsLakesZonesAssetsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesAssetsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListZoneActions call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListZoneActions must -// match the call that provided the page token. -func (c *ProjectsLocationsLakesZonesActionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesActionsListCall { +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListAssets call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListAssets must match the +// call that provided the page token. +func (c *ProjectsLocationsLakesZonesAssetsListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesAssetsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -22944,7 +24667,7 @@ func (c *ProjectsLocationsLakesZonesActionsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesActionsListCall { +func (c *ProjectsLocationsLakesZonesAssetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22952,27 +24675,27 @@ func (c *ProjectsLocationsLakesZonesActionsListCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesActionsListCall { +func (c *ProjectsLocationsLakesZonesAssetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesActionsListCall { +func (c *ProjectsLocationsLakesZonesAssetsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesActionsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesActionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesAssetsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22980,7 +24703,7 @@ func (c *ProjectsLocationsLakesZonesActionsListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/actions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22993,13 +24716,13 @@ func (c *ProjectsLocationsLakesZonesActionsListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.actions.list" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListActionsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListAssetsResponse.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 *ProjectsLocationsLakesZonesActionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListActionsResponse, error) { +func (c *ProjectsLocationsLakesZonesAssetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListAssetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23018,7 +24741,7 @@ func (c *ProjectsLocationsLakesZonesActionsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListActionsResponse{ + ret := &GoogleCloudDataplexV1ListAssetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23034,7 +24757,7 @@ func (c *ProjectsLocationsLakesZonesActionsListCall) Do(opts ...googleapi.CallOp // 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 *ProjectsLocationsLakesZonesActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { +func (c *ProjectsLocationsLakesZonesAssetsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListAssetsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23052,41 +24775,37 @@ func (c *ProjectsLocationsLakesZonesActionsListCall) Pages(ctx context.Context, } } -type ProjectsLocationsLakesZonesAssetsCreateCall struct { +type ProjectsLocationsLakesZonesAssetsPatchCall struct { s *Service - parent string + name string googleclouddataplexv1asset *GoogleCloudDataplexV1Asset urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates an asset resource. +// Patch: Updates an asset resource. // -// - parent: The resource name of the parent zone: +// - name: Output only. The relative resource name of the asset, of the form: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}. -func (r *ProjectsLocationsLakesZonesAssetsService) Create(parent string, googleclouddataplexv1asset *GoogleCloudDataplexV1Asset) *ProjectsLocationsLakesZonesAssetsCreateCall { - c := &ProjectsLocationsLakesZonesAssetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// ne_id}/assets/{asset_id}. +func (r *ProjectsLocationsLakesZonesAssetsService) Patch(name string, googleclouddataplexv1asset *GoogleCloudDataplexV1Asset) *ProjectsLocationsLakesZonesAssetsPatchCall { + c := &ProjectsLocationsLakesZonesAssetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1asset = googleclouddataplexv1asset return c } -// AssetId sets the optional parameter "assetId": Required. Asset identifier. -// This ID will be used to generate names such as table names when publishing -// metadata to Hive Metastore and BigQuery. * 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 zone. -func (c *ProjectsLocationsLakesZonesAssetsCreateCall) AssetId(assetId string) *ProjectsLocationsLakesZonesAssetsCreateCall { - c.urlParams_.Set("assetId", assetId) +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesZonesAssetsPatchCall { + 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 *ProjectsLocationsLakesZonesAssetsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesAssetsCreateCall { +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesAssetsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -23094,27 +24813,27 @@ func (c *ProjectsLocationsLakesZonesAssetsCreateCall) ValidateOnly(validateOnly // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsCreateCall { +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsCreateCall { +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesAssetsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1asset) @@ -23123,26 +24842,26 @@ func (c *ProjectsLocationsLakesZonesAssetsCreateCall) doRequest(alt string) (*ht } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets") + 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.lakes.zones.assets.create" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.patch" call. // 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 *ProjectsLocationsLakesZonesAssetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23174,184 +24893,81 @@ func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsLakesZonesAssetsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesAssetsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an asset resource. The referenced storage resource is -// detached (default) or deleted based on the associated Lifecycle policy. +// 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 asset: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/assets/{asset_id}. -func (r *ProjectsLocationsLakesZonesAssetsService) Delete(name string) *ProjectsLocationsLakesZonesAssetsDeleteCall { - c := &ProjectsLocationsLakesZonesAssetsDeleteCall{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 *ProjectsLocationsLakesZonesAssetsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall { + c := &ProjectsLocationsLakesZonesAssetsSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsDeleteCall { +func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsDeleteCall { +func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 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.lakes.zones.assets.delete" call. -// 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 *ProjectsLocationsLakesZonesAssetsDeleteCall) 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) 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 -} - -type ProjectsLocationsLakesZonesAssetsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves an asset resource. -// -// - name: The resource name of the asset: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/assets/{asset_id}. -func (r *ProjectsLocationsLakesZonesAssetsService) Get(name string) *ProjectsLocationsLakesZonesAssetsGetCall { - c := &ProjectsLocationsLakesZonesAssetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsLakesZonesAssetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesAssetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLakesZonesAssetsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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 := 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.lakes.zones.assets.get" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Asset.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 *ProjectsLocationsLakesZonesAssetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Asset, error) { +// *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 *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23370,7 +24986,7 @@ func (c *ProjectsLocationsLakesZonesAssetsGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Asset{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23378,91 +24994,72 @@ func (c *ProjectsLocationsLakesZonesAssetsGetCall) Do(opts ...googleapi.CallOpti } target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsLakesZonesAssetsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + return nil, err + } + return ret, nil } -// 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 *ProjectsLocationsLakesZonesAssetsService) GetIamPolicy(resource string) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { - c := &ProjectsLocationsLakesZonesAssetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c +type ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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 *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// 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 *ProjectsLocationsLakesZonesAssetsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall { + c := &ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } 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/{+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 } @@ -23473,13 +25070,13 @@ func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.assets.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.testIamPermissions" call. // 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 *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23498,7 +25095,7 @@ func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23511,7 +25108,7 @@ func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsLakesZonesAssetsListCall struct { +type ProjectsLocationsLakesZonesAssetsActionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -23520,44 +25117,31 @@ type ProjectsLocationsLakesZonesAssetsListCall struct { header_ http.Header } -// List: Lists asset resources in a zone. +// List: Lists action resources in an asset. // -// - parent: The resource name of the parent zone: +// - parent: The resource name of the parent asset: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}. -func (r *ProjectsLocationsLakesZonesAssetsService) List(parent string) *ProjectsLocationsLakesZonesAssetsListCall { - c := &ProjectsLocationsLakesZonesAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ne_id}/assets/{asset_id}. +func (r *ProjectsLocationsLakesZonesAssetsActionsService) List(parent string) *ProjectsLocationsLakesZonesAssetsActionsListCall { + c := &ProjectsLocationsLakesZonesAssetsActionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsLakesZonesAssetsListCall) Filter(filter string) *ProjectsLocationsLakesZonesAssetsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsLakesZonesAssetsListCall) OrderBy(orderBy string) *ProjectsLocationsLakesZonesAssetsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of asset to -// return. The service may return fewer than this value. If unspecified, at -// most 10 assets will be returned. The maximum value is 1000; values above +// PageSize sets the optional parameter "pageSize": Maximum number of actions +// to return. The service may return fewer than this value. If unspecified, at +// most 10 actions will be returned. The maximum value is 1000; values above // 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesZonesAssetsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesAssetsListCall { +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesAssetsActionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListAssets call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListAssets must match the -// call that provided the page token. -func (c *ProjectsLocationsLakesZonesAssetsListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesAssetsListCall { +// a previous ListAssetActions call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListAssetActions +// must match the call that provided the page token. +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesAssetsActionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -23565,7 +25149,7 @@ func (c *ProjectsLocationsLakesZonesAssetsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesAssetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsListCall { +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsActionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23573,27 +25157,27 @@ func (c *ProjectsLocationsLakesZonesAssetsListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesAssetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsListCall { +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsActionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsListCall { +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsActionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesAssetsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23601,7 +25185,7 @@ func (c *ProjectsLocationsLakesZonesAssetsListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/actions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23614,13 +25198,13 @@ func (c *ProjectsLocationsLakesZonesAssetsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.assets.list" call. +// Do executes the "dataplex.projects.locations.lakes.zones.assets.actions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListAssetsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListActionsResponse.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 *ProjectsLocationsLakesZonesAssetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListAssetsResponse, error) { +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListActionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23639,7 +25223,7 @@ func (c *ProjectsLocationsLakesZonesAssetsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListAssetsResponse{ + ret := &GoogleCloudDataplexV1ListActionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23655,7 +25239,7 @@ func (c *ProjectsLocationsLakesZonesAssetsListCall) Do(opts ...googleapi.CallOpt // 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 *ProjectsLocationsLakesZonesAssetsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListAssetsResponse) error) error { +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23673,37 +25257,30 @@ func (c *ProjectsLocationsLakesZonesAssetsListCall) Pages(ctx context.Context, f } } -type ProjectsLocationsLakesZonesAssetsPatchCall struct { - s *Service - name string - googleclouddataplexv1asset *GoogleCloudDataplexV1Asset - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesEntitiesCreateCall struct { + s *Service + parent string + googleclouddataplexv1entity *GoogleCloudDataplexV1Entity + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an asset resource. +// Create: Create a metadata entity. // -// - name: Output only. The relative resource name of the asset, of the form: +// - parent: The resource name of the parent zone: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/assets/{asset_id}. -func (r *ProjectsLocationsLakesZonesAssetsService) Patch(name string, googleclouddataplexv1asset *GoogleCloudDataplexV1Asset) *ProjectsLocationsLakesZonesAssetsPatchCall { - c := &ProjectsLocationsLakesZonesAssetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1asset = googleclouddataplexv1asset - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsLakesZonesAssetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLakesZonesAssetsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// ne_id}. +func (r *ProjectsLocationsLakesZonesEntitiesService) Create(parent string, googleclouddataplexv1entity *GoogleCloudDataplexV1Entity) *ProjectsLocationsLakesZonesEntitiesCreateCall { + c := &ProjectsLocationsLakesZonesEntitiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1entity = googleclouddataplexv1entity return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsLakesZonesAssetsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesAssetsPatchCall { +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesEntitiesCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -23711,55 +25288,55 @@ func (c *ProjectsLocationsLakesZonesAssetsPatchCall) ValidateOnly(validateOnly b // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsPatchCall { +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsPatchCall { +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesAssetsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1asset) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entity) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entities") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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.lakes.zones.assets.patch" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Entity.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 *ProjectsLocationsLakesZonesAssetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entity, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23778,7 +25355,7 @@ func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1Entity{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23791,81 +25368,79 @@ func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsLakesZonesAssetsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesEntitiesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. +// Delete: Delete a metadata entity. // -// - 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 *ProjectsLocationsLakesZonesAssetsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall { - c := &ProjectsLocationsLakesZonesAssetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The resource name of the entity: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}/entities/{entity_id}. +func (r *ProjectsLocationsLakesZonesEntitiesService) Delete(name string) *ProjectsLocationsLakesZonesEntitiesDeleteCall { + c := &ProjectsLocationsLakesZonesEntitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": Required. The etag associated with +// the entity, which can be retrieved with a GetEntity request. +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Etag(etag string) *ProjectsLocationsLakesZonesEntitiesDeleteCall { + 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 // details. -func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall { +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.assets.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.delete" call. // 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 *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23884,7 +25459,7 @@ func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23897,84 +25472,101 @@ func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesEntitiesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// Get: Get a metadata entity. // -// - 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 *ProjectsLocationsLakesZonesAssetsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall { - c := &ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: The resource name of the entity: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}/entities/{entity_id}. +func (r *ProjectsLocationsLakesZonesEntitiesService) Get(name string) *ProjectsLocationsLakesZonesEntitiesGetCall { + c := &ProjectsLocationsLakesZonesEntitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": Used to select the subset of entity +// information to return. Defaults to BASIC. +// +// Possible values: +// +// "ENTITY_VIEW_UNSPECIFIED" - The API will default to the BASIC view. +// "BASIC" - Minimal view that does not include the schema. +// "SCHEMA" - Include basic information and schema. +// "FULL" - Include everything. Currently, this is the same as the SCHEMA +// +// view. +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) View(view string) *ProjectsLocationsLakesZonesEntitiesGetCall { + 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 // details. -func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall { +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall { +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.assets.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.get" call. // 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 +// *GoogleCloudDataplexV1Entity.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 *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entity, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23993,7 +25585,7 @@ func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudDataplexV1Entity{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24006,7 +25598,7 @@ func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsLakesZonesAssetsActionsListCall struct { +type ProjectsLocationsLakesZonesEntitiesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -24015,39 +25607,66 @@ type ProjectsLocationsLakesZonesAssetsActionsListCall struct { header_ http.Header } -// List: Lists action resources in an asset. +// List: List metadata entities in a zone. // -// - parent: The resource name of the parent asset: +// - parent: The resource name of the parent zone: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/assets/{asset_id}. -func (r *ProjectsLocationsLakesZonesAssetsActionsService) List(parent string) *ProjectsLocationsLakesZonesAssetsActionsListCall { - c := &ProjectsLocationsLakesZonesAssetsActionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ne_id}. +func (r *ProjectsLocationsLakesZonesEntitiesService) List(parent string) *ProjectsLocationsLakesZonesEntitiesListCall { + c := &ProjectsLocationsLakesZonesEntitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of actions -// to return. The service may return fewer than this value. If unspecified, at -// most 10 actions will be returned. The maximum value is 1000; values above -// 1000 will be coerced to 1000. -func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesAssetsActionsListCall { +// Filter sets the optional parameter "filter": The following filter parameters +// can be added to the URL to limit the entities returned by the API: Entity +// ID: ?filter="id=entityID" Asset ID: ?filter="asset=assetID" Data path +// ?filter="data_path=gs://my-bucket" Is HIVE compatible: +// ?filter="hive_compatible=true" Is BigQuery compatible: +// ?filter="bigquery_compatible=true" +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Filter(filter string) *ProjectsLocationsLakesZonesEntitiesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of entities +// to return. The service may return fewer than this value. If unspecified, 100 +// entities will be returned by default. The maximum value is 500; larger +// values will will be truncated to 500. +func (c *ProjectsLocationsLakesZonesEntitiesListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesEntitiesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListAssetActions call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListAssetActions -// must match the call that provided the page token. -func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesAssetsActionsListCall { +// a previous ListEntities call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListEntities must match +// the call that provided the page token. +func (c *ProjectsLocationsLakesZonesEntitiesListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesEntitiesListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// View sets the optional parameter "view": Required. Specify the entity view +// to make a partial list request. +// +// Possible values: +// +// "ENTITY_VIEW_UNSPECIFIED" - The default unset value. Return both table and +// +// fileset entities if unspecified. +// +// "TABLES" - Only list table entities. +// "FILESETS" - Only list fileset entities. +func (c *ProjectsLocationsLakesZonesEntitiesListCall) View(view string) *ProjectsLocationsLakesZonesEntitiesListCall { + 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 // details. -func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsActionsListCall { +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24055,27 +25674,27 @@ func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsActionsListCall { +func (c *ProjectsLocationsLakesZonesEntitiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsActionsListCall { +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesEntitiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24083,7 +25702,7 @@ func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) 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}/actions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entities") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24096,13 +25715,13 @@ func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.assets.actions.list" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListActionsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListEntitiesResponse.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 *ProjectsLocationsLakesZonesAssetsActionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListActionsResponse, error) { +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntitiesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24121,7 +25740,7 @@ func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListActionsResponse{ + ret := &GoogleCloudDataplexV1ListEntitiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24137,7 +25756,7 @@ func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) 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 *ProjectsLocationsLakesZonesAssetsActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntitiesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -24155,30 +25774,30 @@ func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Pages(ctx context.Con } } -type ProjectsLocationsLakesZonesEntitiesCreateCall struct { +type ProjectsLocationsLakesZonesEntitiesUpdateCall struct { s *Service - parent string + name string googleclouddataplexv1entity *GoogleCloudDataplexV1Entity urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Create a metadata entity. +// Update: Update a metadata entity. Only supports full resource update. // -// - parent: The resource name of the parent zone: +// - name: Output only. The resource name of the entity, of the form: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}. -func (r *ProjectsLocationsLakesZonesEntitiesService) Create(parent string, googleclouddataplexv1entity *GoogleCloudDataplexV1Entity) *ProjectsLocationsLakesZonesEntitiesCreateCall { - c := &ProjectsLocationsLakesZonesEntitiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// ne_id}/entities/{id}. +func (r *ProjectsLocationsLakesZonesEntitiesService) Update(name string, googleclouddataplexv1entity *GoogleCloudDataplexV1Entity) *ProjectsLocationsLakesZonesEntitiesUpdateCall { + c := &ProjectsLocationsLakesZonesEntitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1entity = googleclouddataplexv1entity return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesEntitiesCreateCall { +func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesEntitiesUpdateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -24186,27 +25805,27 @@ func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) ValidateOnly(validateOnl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesCreateCall { +func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesCreateCall { +func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entity) @@ -24215,26 +25834,26 @@ func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) doRequest(alt string) (* } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entities") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", 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.lakes.zones.entities.create" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.update" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudDataplexV1Entity.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 *ProjectsLocationsLakesZonesEntitiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entity, error) { +func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entity, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24266,79 +25885,86 @@ func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsLakesZonesEntitiesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall struct { + s *Service + parent string + googleclouddataplexv1partition *GoogleCloudDataplexV1Partition + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete a metadata entity. +// Create: Create a metadata partition. // -// - name: The resource name of the entity: +// - parent: The resource name of the parent zone: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/entities/{entity_id}. -func (r *ProjectsLocationsLakesZonesEntitiesService) Delete(name string) *ProjectsLocationsLakesZonesEntitiesDeleteCall { - c := &ProjectsLocationsLakesZonesEntitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// ne_id}/entities/{entity_id}. +func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) Create(parent string, googleclouddataplexv1partition *GoogleCloudDataplexV1Partition) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { + c := &ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1partition = googleclouddataplexv1partition return c } -// Etag sets the optional parameter "etag": Required. The etag associated with -// the entity, which can be retrieved with a GetEntity request. -func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Etag(etag string) *ProjectsLocationsLakesZonesEntitiesDeleteCall { - c.urlParams_.Set("etag", etag) +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { + 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 // details. -func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesDeleteCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesDeleteCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1partition) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/partitions") 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.lakes.zones.entities.delete" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.partitions.create" call. // 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 *ProjectsLocationsLakesZonesEntitiesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *GoogleCloudDataplexV1Partition.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 *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Partition, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24357,7 +25983,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleCloudDataplexV1Partition{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24370,84 +25996,65 @@ func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsLakesZonesEntitiesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get a metadata entity. +// Delete: Delete a metadata partition. // -// - name: The resource name of the entity: +// - name: The resource name of the partition. format: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/entities/{entity_id}. -func (r *ProjectsLocationsLakesZonesEntitiesService) Get(name string) *ProjectsLocationsLakesZonesEntitiesGetCall { - c := &ProjectsLocationsLakesZonesEntitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ne_id}/entities/{entity_id}/partitions/{partition_value_path}. The +// {partition_value_path} segment consists of an ordered sequence of +// partition values separated by "/". All values must be provided. +func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) Delete(name string) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { + c := &ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// View sets the optional parameter "view": Used to select the subset of entity -// information to return. Defaults to BASIC. -// -// Possible values: -// -// "ENTITY_VIEW_UNSPECIFIED" - The API will default to the BASIC view. -// "BASIC" - Minimal view that does not include the schema. -// "SCHEMA" - Include basic information and schema. -// "FULL" - Include everything. Currently, this is the same as the SCHEMA -// -// view. -func (c *ProjectsLocationsLakesZonesEntitiesGetCall) View(view string) *ProjectsLocationsLakesZonesEntitiesGetCall { - c.urlParams_.Set("view", view) +// Etag sets the optional parameter "etag": The etag associated with the +// partition. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Etag(etag string) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { + 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 // details. -func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesGetCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesEntitiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesGetCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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 } @@ -24458,13 +26065,12 @@ func (c *ProjectsLocationsLakesZonesEntitiesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.entities.get" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.partitions.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entity.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 *ProjectsLocationsLakesZonesEntitiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entity, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24483,7 +26089,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entity{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24496,75 +26102,32 @@ func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsLakesZonesEntitiesListCall struct { +type ProjectsLocationsLakesZonesEntitiesPartitionsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: List metadata entities in a zone. +// Get: Get a metadata partition of an entity. // -// - parent: The resource name of the parent zone: +// - name: The resource name of the partition: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}. -func (r *ProjectsLocationsLakesZonesEntitiesService) List(parent string) *ProjectsLocationsLakesZonesEntitiesListCall { - c := &ProjectsLocationsLakesZonesEntitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The following filter parameters -// can be added to the URL to limit the entities returned by the API: Entity -// ID: ?filter="id=entityID" Asset ID: ?filter="asset=assetID" Data path -// ?filter="data_path=gs://my-bucket" Is HIVE compatible: -// ?filter="hive_compatible=true" Is BigQuery compatible: -// ?filter="bigquery_compatible=true" -func (c *ProjectsLocationsLakesZonesEntitiesListCall) Filter(filter string) *ProjectsLocationsLakesZonesEntitiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of entities -// to return. The service may return fewer than this value. If unspecified, 100 -// entities will be returned by default. The maximum value is 500; larger -// values will will be truncated to 500. -func (c *ProjectsLocationsLakesZonesEntitiesListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesEntitiesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListEntities call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListEntities must match -// the call that provided the page token. -func (c *ProjectsLocationsLakesZonesEntitiesListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesEntitiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// View sets the optional parameter "view": Required. Specify the entity view -// to make a partial list request. -// -// Possible values: -// -// "ENTITY_VIEW_UNSPECIFIED" - The default unset value. Return both table and -// -// fileset entities if unspecified. -// -// "TABLES" - Only list table entities. -// "FILESETS" - Only list fileset entities. -func (c *ProjectsLocationsLakesZonesEntitiesListCall) View(view string) *ProjectsLocationsLakesZonesEntitiesListCall { - c.urlParams_.Set("view", view) +// ne_id}/entities/{entity_id}/partitions/{partition_value_path}. The +// {partition_value_path} segment consists of an ordered sequence of +// partition values separated by "/". All values must be provided. +func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) Get(name string) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { + c := &ProjectsLocationsLakesZonesEntitiesPartitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesEntitiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesListCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24572,27 +26135,27 @@ func (c *ProjectsLocationsLakesZonesEntitiesListCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesEntitiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesListCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesListCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesListCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24600,7 +26163,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesListCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entities") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24608,18 +26171,18 @@ func (c *ProjectsLocationsLakesZonesEntitiesListCall) doRequest(alt string) (*ht } 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.lakes.zones.entities.list" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.partitions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListEntitiesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1Partition.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 *ProjectsLocationsLakesZonesEntitiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntitiesResponse, error) { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Partition, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24638,7 +26201,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEntitiesResponse{ + ret := &GoogleCloudDataplexV1Partition{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24651,107 +26214,118 @@ func (c *ProjectsLocationsLakesZonesEntitiesListCall) Do(opts ...googleapi.CallO return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsLakesZonesEntitiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntitiesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +type ProjectsLocationsLakesZonesEntitiesPartitionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsLakesZonesEntitiesUpdateCall struct { - s *Service - name string - googleclouddataplexv1entity *GoogleCloudDataplexV1Entity - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// List: List metadata partitions of an entity. +// +// - parent: The resource name of the parent entity: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo +// ne_id}/entities/{entity_id}. +func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) List(parent string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { + c := &ProjectsLocationsLakesZonesEntitiesPartitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter the partitions returned +// to the caller using a key value pair expression. Supported operators and +// syntax: logic operators: AND, OR comparison operators: <, >, >=, <= ,=, != +// LIKE operators: The right hand of a LIKE operator supports "." and "*" for +// wildcard searches, for example "value1 LIKE ".*oo.*" parenthetical grouping: +// ( )Sample filter expression: `?filter="key1 < value1 OR key2 > value2"Notes: +// Keys to the left of operators are case insensitive. Partition results are +// sorted first by creation time, then by lexicographic order. Up to 20 key +// value filter pairs are allowed, but due to performance considerations, only +// the first 10 will be used as a filter. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Filter(filter string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { + c.urlParams_.Set("filter", filter) + return c } -// Update: Update a metadata entity. Only supports full resource update. -// -// - name: Output only. The resource name of the entity, of the form: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/entities/{id}. -func (r *ProjectsLocationsLakesZonesEntitiesService) Update(name string, googleclouddataplexv1entity *GoogleCloudDataplexV1Entity) *ProjectsLocationsLakesZonesEntitiesUpdateCall { - c := &ProjectsLocationsLakesZonesEntitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1entity = googleclouddataplexv1entity +// PageSize sets the optional parameter "pageSize": Maximum number of +// partitions to return. The service may return fewer than this value. If +// unspecified, 100 partitions will be returned by default. The maximum page +// size is 500; larger values will will be truncated to 500. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesEntitiesUpdateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListPartitions call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListPartitions must +// match the call that provided the page token. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesUpdateCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesUpdateCall { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Header() http.Header { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entity) - if err != nil { - return nil, err +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/partitions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.entities.update" call. +// Do executes the "dataplex.projects.locations.lakes.zones.entities.partitions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entity.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListPartitionsResponse.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 *ProjectsLocationsLakesZonesEntitiesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entity, error) { +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListPartitionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24770,7 +26344,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entity{ + ret := &GoogleCloudDataplexV1ListPartitionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24783,67 +26357,84 @@ func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall struct { - s *Service - parent string - googleclouddataplexv1partition *GoogleCloudDataplexV1Partition - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListPartitionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Create: Create a metadata partition. -// -// - parent: The resource name of the parent zone: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/entities/{entity_id}. -func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) Create(parent string, googleclouddataplexv1partition *GoogleCloudDataplexV1Partition) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { - c := &ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1partition = googleclouddataplexv1partition - return c +type ProjectsLocationsMetadataJobsCancelCall struct { + s *Service + name string + googleclouddataplexv1cancelmetadatajobrequest *GoogleCloudDataplexV1CancelMetadataJobRequest + urlParams_ gensupport.URLParams + 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 *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// Cancel: Cancels a metadata job.If you cancel a metadata import job that is +// in progress, the changes in the job might be partially applied. We recommend +// that you reset the state of the entry groups in your project by running +// another metadata job that reverts the changes from the canceled job. +// +// - name: The resource name of the job, in the format +// projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metad +// ata_job_id}. +func (r *ProjectsLocationsMetadataJobsService) Cancel(name string, googleclouddataplexv1cancelmetadatajobrequest *GoogleCloudDataplexV1CancelMetadataJobRequest) *ProjectsLocationsMetadataJobsCancelCall { + c := &ProjectsLocationsMetadataJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1cancelmetadatajobrequest = googleclouddataplexv1cancelmetadatajobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { +func (c *ProjectsLocationsMetadataJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { +func (c *ProjectsLocationsMetadataJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataJobsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1partition) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1cancelmetadatajobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/partitions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24851,18 +26442,17 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) doRequest(alt } 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.lakes.zones.entities.partitions.create" call. +// Do executes the "dataplex.projects.locations.metadataJobs.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Partition.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 *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Partition, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsMetadataJobsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24881,7 +26471,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Partition{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24894,81 +26484,87 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataJobsCreateCall struct { + s *Service + parent string + googleclouddataplexv1metadatajob *GoogleCloudDataplexV1MetadataJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete a metadata partition. +// Create: Creates a metadata job. For example, use a metadata job to import +// Dataplex Catalog entries and aspects from a third-party system into +// Dataplex. // -// - name: The resource name of the partition. format: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/entities/{entity_id}/partitions/{partition_value_path}. The -// {partition_value_path} segment consists of an ordered sequence of -// partition values separated by "/". All values must be provided. -func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) Delete(name string) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { - c := &ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the parent location, in the format +// projects/{project_id_or_number}/locations/{location_id}. +func (r *ProjectsLocationsMetadataJobsService) Create(parent string, googleclouddataplexv1metadatajob *GoogleCloudDataplexV1MetadataJob) *ProjectsLocationsMetadataJobsCreateCall { + c := &ProjectsLocationsMetadataJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1metadatajob = googleclouddataplexv1metadatajob return c } -// Etag sets the optional parameter "etag": The etag associated with the -// partition. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Etag(etag string) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { - c.urlParams_.Set("etag", etag) +// MetadataJobId sets the optional parameter "metadataJobId": The metadata job +// ID. If not provided, a unique ID is generated with the prefix metadata-job-. +func (c *ProjectsLocationsMetadataJobsCreateCall) MetadataJobId(metadataJobId string) *ProjectsLocationsMetadataJobsCreateCall { + c.urlParams_.Set("metadataJobId", metadataJobId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { +func (c *ProjectsLocationsMetadataJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { +func (c *ProjectsLocationsMetadataJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsMetadataJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1metadatajob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataJobs") 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.lakes.zones.entities.partitions.delete" call. +// Do executes the "dataplex.projects.locations.metadataJobs.create" call. // 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 *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *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 *ProjectsLocationsMetadataJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24987,7 +26583,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25000,7 +26596,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsLakesZonesEntitiesPartitionsGetCall struct { +type ProjectsLocationsMetadataJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -25009,15 +26605,13 @@ type ProjectsLocationsLakesZonesEntitiesPartitionsGetCall struct { header_ http.Header } -// Get: Get a metadata partition of an entity. +// Get: Gets a metadata job. // -// - name: The resource name of the partition: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/entities/{entity_id}/partitions/{partition_value_path}. The -// {partition_value_path} segment consists of an ordered sequence of -// partition values separated by "/". All values must be provided. -func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) Get(name string) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { - c := &ProjectsLocationsLakesZonesEntitiesPartitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the metadata job, in the format +// projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metad +// ata_job_id}. +func (r *ProjectsLocationsMetadataJobsService) Get(name string) *ProjectsLocationsMetadataJobsGetCall { + c := &ProjectsLocationsMetadataJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -25025,7 +26619,7 @@ func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { +func (c *ProjectsLocationsMetadataJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25033,27 +26627,27 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { +func (c *ProjectsLocationsMetadataJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { +func (c *ProjectsLocationsMetadataJobsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25074,13 +26668,13 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.entities.partitions.get" call. +// Do executes the "dataplex.projects.locations.metadataJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Partition.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1MetadataJob.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 *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Partition, error) { +func (c *ProjectsLocationsMetadataJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1MetadataJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25099,7 +26693,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Partition{ + ret := &GoogleCloudDataplexV1MetadataJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25112,7 +26706,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsLakesZonesEntitiesPartitionsListCall struct { +type ProjectsLocationsMetadataJobsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -25121,46 +26715,47 @@ type ProjectsLocationsLakesZonesEntitiesPartitionsListCall struct { header_ http.Header } -// List: List metadata partitions of an entity. +// List: Lists metadata jobs. // -// - parent: The resource name of the parent entity: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zo -// ne_id}/entities/{entity_id}. -func (r *ProjectsLocationsLakesZonesEntitiesPartitionsService) List(parent string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { - c := &ProjectsLocationsLakesZonesEntitiesPartitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent location, in the format +// projects/{project_id_or_number}/locations/{location_id}. +func (r *ProjectsLocationsMetadataJobsService) List(parent string) *ProjectsLocationsMetadataJobsListCall { + c := &ProjectsLocationsMetadataJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter the partitions returned -// to the caller using a key value pair expression. Supported operators and -// syntax: logic operators: AND, OR comparison operators: <, >, >=, <= ,=, != -// LIKE operators: The right hand of a LIKE operator supports "." and "*" for -// wildcard searches, for example "value1 LIKE ".*oo.*" parenthetical grouping: -// ( )Sample filter expression: `?filter="key1 < value1 OR key2 > value2"Notes: -// Keys to the left of operators are case insensitive. Partition results are -// sorted first by creation time, then by lexicographic order. Up to 20 key -// value filter pairs are allowed, but due to performance considerations, only -// the first 10 will be used as a filter. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Filter(filter string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { +// Filter sets the optional parameter "filter": Filter request. Filters are +// case-sensitive. The service supports the following formats: labels.key1 = +// "value1" labels:key1 name = "value"You can combine filters with AND, OR, and +// NOT operators. +func (c *ProjectsLocationsMetadataJobsListCall) Filter(filter string) *ProjectsLocationsMetadataJobsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// partitions to return. The service may return fewer than this value. If -// unspecified, 100 partitions will be returned by default. The maximum page -// size is 500; larger values will will be truncated to 500. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) PageSize(pageSize int64) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { +// OrderBy sets the optional parameter "orderBy": The field to sort the results +// by, either name or create_time. If not specified, the ordering is undefined. +func (c *ProjectsLocationsMetadataJobsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// metadata jobs to return. The service might return fewer jobs than this +// value. If unspecified, at most 10 jobs are returned. The maximum value is +// 1,000. +func (c *ProjectsLocationsMetadataJobsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListPartitions call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListPartitions must -// match the call that provided the page token. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) PageToken(pageToken string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { +// PageToken sets the optional parameter "pageToken": The page token received +// from a previous ListMetadataJobs call. Provide this token to retrieve the +// subsequent page of results. When paginating, all other parameters that are +// provided to the ListMetadataJobs request must match the call that provided +// the page token. +func (c *ProjectsLocationsMetadataJobsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -25168,7 +26763,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { +func (c *ProjectsLocationsMetadataJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25176,27 +26771,27 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { +func (c *ProjectsLocationsMetadataJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { +func (c *ProjectsLocationsMetadataJobsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25204,7 +26799,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/partitions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25217,13 +26812,13 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lakes.zones.entities.partitions.list" call. +// Do executes the "dataplex.projects.locations.metadataJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListPartitionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListMetadataJobsResponse.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 *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListPartitionsResponse, error) { +func (c *ProjectsLocationsMetadataJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListMetadataJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25242,7 +26837,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListPartitionsResponse{ + ret := &GoogleCloudDataplexV1ListMetadataJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25258,7 +26853,7 @@ func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Do(opts ...googl // 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 *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListPartitionsResponse) error) error { +func (c *ProjectsLocationsMetadataJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListMetadataJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 702affa7418..036af5d8803 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -881,6 +881,47 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Lists Connections in a parent. Use SearchConnections to see all connections within an organization.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/connections", + "httpMethod": "GET", + "id": "dlp.organizations.locations.connections.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Number of results per page, max 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token from a previous page to return the next set of results. If set, all other request fields must match the original request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/connections", + "response": { + "$ref": "GooglePrivacyDlpV2ListConnectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Update a Connection.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/connections/{connectionsId}", @@ -935,7 +976,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent name, typically an organization, without location. For example: `organizations/12345678`.", + "description": "Required. Resource name of the organization or project with a wildcard location, for example `organizations/433245324/locations/-` or `projects/project-id/locations/-`.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -3224,7 +3265,7 @@ ] }, "list": { - "description": "Lists Connections in a parent.", + "description": "Lists Connections in a parent. Use SearchConnections to see all connections within an organization.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", "httpMethod": "GET", "id": "dlp.projects.locations.connections.list", @@ -3249,7 +3290,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent name, for example: `projects/project-id/locations/global`.", + "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3318,7 +3359,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent name, typically an organization, without location. For example: `organizations/12345678`.", + "description": "Required. Resource name of the organization or project with a wildcard location, for example `organizations/433245324/locations/-` or `projects/project-id/locations/-`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4974,7 +5015,7 @@ } } }, - "revision": "20240707", + "revision": "20240721", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -7497,6 +7538,22 @@ "$ref": "GooglePrivacyDlpV2DiscoveryInspectTemplateModifiedCadence", "description": "Governs when to update data profiles when the inspection rules defined by the `InspectTemplate` change. If not set, changing the template will not cause a data profile to update." }, + "refreshFrequency": { + "description": "Frequency to update profiles regardless of whether the underlying resource has changed. Defaults to never.", + "enum": [ + "UPDATE_FREQUENCY_UNSPECIFIED", + "UPDATE_FREQUENCY_NEVER", + "UPDATE_FREQUENCY_DAILY", + "UPDATE_FREQUENCY_MONTHLY" + ], + "enumDescriptions": [ + "Unspecified.", + "After the data profile is created, it will never be updated.", + "The data profile can be updated up to once every 24 hours.", + "The data profile can be updated up to once every 30 days. Default." + ], + "type": "string" + }, "schemaModifiedCadence": { "$ref": "GooglePrivacyDlpV2DiscoverySchemaModifiedCadence", "description": "Governs when to update data profiles when a schema is modified." diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 2e2a88ecfc3..a3410f7efe4 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -4179,6 +4179,18 @@ type GooglePrivacyDlpV2DiscoveryGenerationCadence struct { // the inspection rules defined by the `InspectTemplate` change. If not set, // changing the template will not cause a data profile to update. InspectTemplateModifiedCadence *GooglePrivacyDlpV2DiscoveryInspectTemplateModifiedCadence `json:"inspectTemplateModifiedCadence,omitempty"` + // RefreshFrequency: Frequency to update profiles regardless of whether the + // underlying resource has changed. Defaults to never. + // + // Possible values: + // "UPDATE_FREQUENCY_UNSPECIFIED" - Unspecified. + // "UPDATE_FREQUENCY_NEVER" - After the data profile is created, it will + // never be updated. + // "UPDATE_FREQUENCY_DAILY" - The data profile can be updated up to once + // every 24 hours. + // "UPDATE_FREQUENCY_MONTHLY" - The data profile can be updated up to once + // every 30 days. Default. + RefreshFrequency string `json:"refreshFrequency,omitempty"` // SchemaModifiedCadence: Governs when to update data profiles when a schema is // modified. SchemaModifiedCadence *GooglePrivacyDlpV2DiscoverySchemaModifiedCadence `json:"schemaModifiedCadence,omitempty"` @@ -12458,6 +12470,160 @@ func (c *OrganizationsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOpti return ret, nil } +type OrganizationsLocationsConnectionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Connections in a parent. Use SearchConnections to see all +// connections within an organization. +// +// - parent: Resource name of the organization or project, for example +// `organizations/433245324/locations/europe` or +// `projects/project-id/locations/asia`. +func (r *OrganizationsLocationsConnectionsService) List(parent string) *OrganizationsLocationsConnectionsListCall { + c := &OrganizationsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Supported field/value: `state` +// - MISSING|AVAILABLE|ERROR +func (c *OrganizationsLocationsConnectionsListCall) Filter(filter string) *OrganizationsLocationsConnectionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results per page, +// max 1000. +func (c *OrganizationsLocationsConnectionsListCall) PageSize(pageSize int64) *OrganizationsLocationsConnectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token from a +// previous page to return the next set of results. If set, all other request +// fields must match the original request. +func (c *OrganizationsLocationsConnectionsListCall) PageToken(pageToken string) *OrganizationsLocationsConnectionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsConnectionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *OrganizationsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsConnectionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsLocationsConnectionsListCall) Context(ctx context.Context) *OrganizationsLocationsConnectionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsLocationsConnectionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsConnectionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/connections") + 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 "dlp.organizations.locations.connections.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GooglePrivacyDlpV2ListConnectionsResponse.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 *OrganizationsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListConnectionsResponse, 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 := &GooglePrivacyDlpV2ListConnectionsResponse{ + 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 +} + +// 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 *OrganizationsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + type OrganizationsLocationsConnectionsPatchCall struct { s *Service name string @@ -12572,8 +12738,9 @@ type OrganizationsLocationsConnectionsSearchCall struct { // Search: Searches for Connections in a parent. // -// - parent: Parent name, typically an organization, without location. For -// example: `organizations/12345678`. +// - parent: Resource name of the organization or project with a wildcard +// location, for example `organizations/433245324/locations/-` or +// `projects/project-id/locations/-`. func (r *OrganizationsLocationsConnectionsService) Search(parent string) *OrganizationsLocationsConnectionsSearchCall { c := &OrganizationsLocationsConnectionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -21336,9 +21503,12 @@ type ProjectsLocationsConnectionsListCall struct { header_ http.Header } -// List: Lists Connections in a parent. +// List: Lists Connections in a parent. Use SearchConnections to see all +// connections within an organization. // -// - parent: Parent name, for example: `projects/project-id/locations/global`. +// - parent: Resource name of the organization or project, for example +// `organizations/433245324/locations/europe` or +// `projects/project-id/locations/asia`. func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall { c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -21592,8 +21762,9 @@ type ProjectsLocationsConnectionsSearchCall struct { // Search: Searches for Connections in a parent. // -// - parent: Parent name, typically an organization, without location. For -// example: `organizations/12345678`. +// - parent: Resource name of the organization or project with a wildcard +// location, for example `organizations/433245324/locations/-` or +// `projects/project-id/locations/-`. func (r *ProjectsLocationsConnectionsService) Search(parent string) *ProjectsLocationsConnectionsSearchCall { c := &ProjectsLocationsConnectionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index a3d4f4ed980..c7f8c380522 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -2812,7 +2812,7 @@ } } }, - "revision": "20240618", + "revision": "20240717", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptHubSpokeRequest": { @@ -4926,7 +4926,7 @@ "type": "array" }, "serviceClass": { - "description": "The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.", + "description": "The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp or google-cloud. For example, gcp-memorystore-redis or google-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.", "type": "string" }, "updateTime": { diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index df92ff7b813..25e9e741598 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -2880,8 +2880,9 @@ type ServiceConnectionPolicy struct { // ServiceClass: The service class identifier for which this // ServiceConnectionPolicy is for. The service class identifier is a unique, // symbolic representation of a ServiceClass. It is provided by the Service - // Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. - // 3rd party services do not. For example, test-service-a3dfcx. + // Producer. Google services have a prefix of gcp or google-cloud. For example, + // gcp-memorystore-redis or google-cloud-sql. 3rd party services do not. For + // example, test-service-a3dfcx. ServiceClass string `json:"serviceClass,omitempty"` // UpdateTime: Output only. Time when the ServiceConnectionMap was updated. UpdateTime string `json:"updateTime,omitempty"` diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index fba564cd565..bf41c1984d1 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240612", + "revision": "20240718", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1702,6 +1702,10 @@ "description": "URI of a Compute Engine network.", "type": "string" }, + "pscNetworkAttachmentUri": { + "description": "URI of the PSC network attachment the NIC is attached to (if relevant).", + "type": "string" + }, "serviceAccount": { "deprecated": true, "description": "Service account authorized for the instance.", diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 2ec9e5c5853..ccb36a75c97 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -1510,6 +1510,9 @@ type InstanceInfo struct { NetworkTags []string `json:"networkTags,omitempty"` // NetworkUri: URI of a Compute Engine network. NetworkUri string `json:"networkUri,omitempty"` + // PscNetworkAttachmentUri: URI of the PSC network attachment the NIC is + // attached to (if relevant). + PscNetworkAttachmentUri string `json:"pscNetworkAttachmentUri,omitempty"` // ServiceAccount: Service account authorized for the instance. ServiceAccount string `json:"serviceAccount,omitempty"` // Uri: URI of a Compute Engine instance. diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 8060af572c1..c4d2c6a975a 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240612", + "revision": "20240718", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1707,6 +1707,10 @@ "description": "URI of a Compute Engine network.", "type": "string" }, + "pscNetworkAttachmentUri": { + "description": "URI of the PSC network attachment the NIC is attached to (if relevant).", + "type": "string" + }, "serviceAccount": { "deprecated": true, "description": "Service account authorized for the instance.", diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 8433c4bbcb9..7c1b4e6048d 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -1514,6 +1514,9 @@ type InstanceInfo struct { NetworkTags []string `json:"networkTags,omitempty"` // NetworkUri: URI of a Compute Engine network. NetworkUri string `json:"networkUri,omitempty"` + // PscNetworkAttachmentUri: URI of the PSC network attachment the NIC is + // attached to (if relevant). + PscNetworkAttachmentUri string `json:"pscNetworkAttachmentUri,omitempty"` // ServiceAccount: Service account authorized for the instance. ServiceAccount string `json:"serviceAccount,omitempty"` // Uri: URI of a Compute Engine instance. diff --git a/playintegrity/v1/playintegrity-api.json b/playintegrity/v1/playintegrity-api.json index 7eeb8458814..91f9cee8b6d 100644 --- a/playintegrity/v1/playintegrity-api.json +++ b/playintegrity/v1/playintegrity-api.json @@ -170,7 +170,7 @@ } } }, - "revision": "20240711", + "revision": "20240725", "rootUrl": "https://playintegrity.googleapis.com/", "schemas": { "AccountActivity": { @@ -370,6 +370,10 @@ "description": "Contains the device attestation information. Next tag: 4", "id": "DeviceIntegrity", "properties": { + "deviceRecall": { + "$ref": "DeviceRecall", + "description": "Details about the device recall bits set by the developer." + }, "deviceRecognitionVerdict": { "description": "Details about the integrity of the device the app is running on.", "items": { @@ -398,6 +402,21 @@ }, "type": "object" }, + "DeviceRecall": { + "description": "Contains the recall bits per device set by the developer. Next tag: 3", + "id": "DeviceRecall", + "properties": { + "values": { + "$ref": "Values", + "description": "Required. Contains the recall bits values." + }, + "writeDates": { + "$ref": "WriteDates", + "description": "Required. Contains the recall bits write dates." + } + }, + "type": "object" + }, "EnvironmentDetails": { "description": "Contains information about the environment Play Integrity API runs in, e.g. Play Protect verdict.", "id": "EnvironmentDetails", @@ -543,6 +562,28 @@ }, "type": "object" }, + "WriteDates": { + "description": "Contains the recall bits write dates.", + "id": "WriteDates", + "properties": { + "yyyymmFirst": { + "description": "Optional. Write time in YYYYMM format (in UTC, e.g. 202402) for the first bit. Note that this value won't be set if the first bit is false.", + "format": "int32", + "type": "integer" + }, + "yyyymmSecond": { + "description": "Optional. Write time in YYYYMM format (in UTC, e.g. 202402) for the second bit. Note that this value won't be set if the second bit is false.", + "format": "int32", + "type": "integer" + }, + "yyyymmThird": { + "description": "Optional. Write time in YYYYMM format (in UTC, e.g. 202402) for the third bit. Note that this value won't be set if the third bit is false.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "WriteDeviceRecallRequest": { "description": "Request to write device recall bits.", "id": "WriteDeviceRecallRequest", diff --git a/playintegrity/v1/playintegrity-gen.go b/playintegrity/v1/playintegrity-gen.go index 6b695b29b5a..eddf6faa50c 100644 --- a/playintegrity/v1/playintegrity-gen.go +++ b/playintegrity/v1/playintegrity-gen.go @@ -430,6 +430,8 @@ func (s DecodeIntegrityTokenResponse) MarshalJSON() ([]byte, error) { // DeviceIntegrity: Contains the device attestation information. Next tag: 4 type DeviceIntegrity struct { + // DeviceRecall: Details about the device recall bits set by the developer. + DeviceRecall *DeviceRecall `json:"deviceRecall,omitempty"` // DeviceRecognitionVerdict: Details about the integrity of the device the app // is running on. // @@ -450,15 +452,15 @@ type DeviceIntegrity struct { // RecentDeviceActivity: Details about the device activity of the device the // app is running on. RecentDeviceActivity *RecentDeviceActivity `json:"recentDeviceActivity,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeviceRecognitionVerdict") - // to unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "DeviceRecall") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeviceRecognitionVerdict") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "DeviceRecall") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -468,6 +470,31 @@ func (s DeviceIntegrity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DeviceRecall: Contains the recall bits per device set by the developer. Next +// tag: 3 +type DeviceRecall struct { + // Values: Required. Contains the recall bits values. + Values *Values `json:"values,omitempty"` + // WriteDates: Required. Contains the recall bits write dates. + WriteDates *WriteDates `json:"writeDates,omitempty"` + // ForceSendFields is a list of field names (e.g. "Values") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Values") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DeviceRecall) MarshalJSON() ([]byte, error) { + type NoMethod DeviceRecall + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // EnvironmentDetails: Contains information about the environment Play // Integrity API runs in, e.g. Play Protect verdict. type EnvironmentDetails struct { @@ -661,6 +688,36 @@ func (s Values) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// WriteDates: Contains the recall bits write dates. +type WriteDates struct { + // YyyymmFirst: Optional. Write time in YYYYMM format (in UTC, e.g. 202402) for + // the first bit. Note that this value won't be set if the first bit is false. + YyyymmFirst int64 `json:"yyyymmFirst,omitempty"` + // YyyymmSecond: Optional. Write time in YYYYMM format (in UTC, e.g. 202402) + // for the second bit. Note that this value won't be set if the second bit is + // false. + YyyymmSecond int64 `json:"yyyymmSecond,omitempty"` + // YyyymmThird: Optional. Write time in YYYYMM format (in UTC, e.g. 202402) for + // the third bit. Note that this value won't be set if the third bit is false. + YyyymmThird int64 `json:"yyyymmThird,omitempty"` + // ForceSendFields is a list of field names (e.g. "YyyymmFirst") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "YyyymmFirst") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s WriteDates) MarshalJSON() ([]byte, error) { + type NoMethod WriteDates + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // WriteDeviceRecallRequest: Request to write device recall bits. type WriteDeviceRecallRequest struct { // IntegrityToken: Required. Integrity token obtained from calling Play diff --git a/run/v1/run-api.json b/run/v1/run-api.json index e631b6c2944..885486d5aae 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2614,7 +2614,7 @@ } } }, - "revision": "20240712", + "revision": "20240719", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -5381,7 +5381,7 @@ "additionalProperties": { "type": "string" }, - "description": "Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision . * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/default-url-disabled`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.", + "description": "Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/base-images`: Revision, Service. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/build-environment-variables`: Service. * `run.googleapis.com/build-id`: Service. * `run.googleapis.com/build-service-account`: Service. * `run.googleapis.com/build-worker-pool`: Service. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision . * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/default-url-disabled`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/function-target`: Service. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/source-location`: Service. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.", "type": "object" }, "clusterName": { diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index c9d8e21e6f7..f4fcabbd309 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -3913,8 +3913,13 @@ type ObjectMeta struct { // restricted, and the accepted annotations will be different depending on the // resource type. * `autoscaling.knative.dev/maxScale`: Revision. * // `autoscaling.knative.dev/minScale`: Revision. * + // `run.googleapis.com/base-images`: Revision, Service. * // `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * // `run.googleapis.com/binary-authorization`: Service, Job, Execution. * + // `run.googleapis.com/build-environment-variables`: Service. * + // `run.googleapis.com/build-id`: Service. * + // `run.googleapis.com/build-service-account`: Service. * + // `run.googleapis.com/build-worker-pool`: Service. * // `run.googleapis.com/client-name`: All resources. * // `run.googleapis.com/cloudsql-instances`: Revision, Execution. * // `run.googleapis.com/container-dependencies`: Revision . * @@ -3925,6 +3930,7 @@ type ObjectMeta struct { // `run.googleapis.com/encryption-key-shutdown-hours`: Revision * // `run.googleapis.com/encryption-key`: Revision, Execution. * // `run.googleapis.com/execution-environment`: Revision, Execution. * + // `run.googleapis.com/function-target`: Service. * // `run.googleapis.com/gc-traffic-tags`: Service. * // `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: // Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * @@ -3933,6 +3939,7 @@ type ObjectMeta struct { // `run.googleapis.com/secrets`: Revision, Execution. * // `run.googleapis.com/secure-session-agent`: Revision. * // `run.googleapis.com/sessionAffinity`: Revision. * + // `run.googleapis.com/source-location`: Service. * // `run.googleapis.com/startup-cpu-boost`: Revision. * // `run.googleapis.com/vpc-access-connector`: Revision, Execution. * // `run.googleapis.com/vpc-access-egress`: Revision, Execution. diff --git a/workspaceevents/v1/workspaceevents-api.json b/workspaceevents/v1/workspaceevents-api.json index a68fb91ffa2..406f5af3f2b 100644 --- a/workspaceevents/v1/workspaceevents-api.json +++ b/workspaceevents/v1/workspaceevents-api.json @@ -6,25 +6,25 @@ "description": "Private Service: https://www.googleapis.com/auth/chat.bot" }, "https://www.googleapis.com/auth/chat.memberships": { - "description": "View, add, update, and remove members from conversations in Google Chat" + "description": "See, add, update, and remove members from conversations and spaces in Google Chat" }, "https://www.googleapis.com/auth/chat.memberships.readonly": { "description": "View members in Google Chat conversations." }, "https://www.googleapis.com/auth/chat.messages": { - "description": "View, compose, send, update, and delete messages, and add, view, and delete reactions to messages." + "description": "See, compose, send, update, and delete messages and their associated attachments, and add, see, and delete reactions to messages." }, "https://www.googleapis.com/auth/chat.messages.reactions": { - "description": "View, add, and delete reactions to messages in Google Chat" + "description": "See, add, and delete reactions to messages in Google Chat" }, "https://www.googleapis.com/auth/chat.messages.reactions.readonly": { "description": "View reactions to messages in Google Chat" }, "https://www.googleapis.com/auth/chat.messages.readonly": { - "description": "View messages and reactions in Google Chat" + "description": "See messages and their associated reactions and attachments in Google Chat" }, "https://www.googleapis.com/auth/chat.spaces": { - "description": "Create conversations and spaces and see or edit metadata (including history settings and access settings) in Google Chat" + "description": "Create conversations and spaces and see or update metadata (including history settings and access settings) in Google Chat" }, "https://www.googleapis.com/auth/chat.spaces.readonly": { "description": "View chat and spaces in Google Chat" @@ -424,7 +424,7 @@ } } }, - "revision": "20240430", + "revision": "20240723", "rootUrl": "https://workspaceevents.googleapis.com/", "schemas": { "ListSubscriptionsResponse": { diff --git a/workspaceevents/v1/workspaceevents-gen.go b/workspaceevents/v1/workspaceevents-gen.go index 16fe2bd4916..85556a43137 100644 --- a/workspaceevents/v1/workspaceevents-gen.go +++ b/workspaceevents/v1/workspaceevents-gen.go @@ -103,27 +103,28 @@ const ( // Private Service: https://www.googleapis.com/auth/chat.bot ChatBotScope = "https://www.googleapis.com/auth/chat.bot" - // View, add, update, and remove members from conversations in Google Chat + // See, add, update, and remove members from conversations and spaces in Google + // Chat ChatMembershipsScope = "https://www.googleapis.com/auth/chat.memberships" // View members in Google Chat conversations. ChatMembershipsReadonlyScope = "https://www.googleapis.com/auth/chat.memberships.readonly" - // View, compose, send, update, and delete messages, and add, view, and delete - // reactions to messages. + // See, compose, send, update, and delete messages and their associated + // attachments, and add, see, and delete reactions to messages. ChatMessagesScope = "https://www.googleapis.com/auth/chat.messages" - // View, add, and delete reactions to messages in Google Chat + // See, add, and delete reactions to messages in Google Chat ChatMessagesReactionsScope = "https://www.googleapis.com/auth/chat.messages.reactions" // View reactions to messages in Google Chat ChatMessagesReactionsReadonlyScope = "https://www.googleapis.com/auth/chat.messages.reactions.readonly" - // View messages and reactions in Google Chat + // See messages and their associated reactions and attachments in Google Chat ChatMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.messages.readonly" - // Create conversations and spaces and see or edit metadata (including history - // settings and access settings) in Google Chat + // Create conversations and spaces and see or update metadata (including + // history settings and access settings) in Google Chat ChatSpacesScope = "https://www.googleapis.com/auth/chat.spaces" // View chat and spaces in Google Chat